This could bode quite well for the future of Arm devices.
@[email protected]
link
fedilink
English
104M

it’s transpiling the x86 code to ARM on the fly. I honestly would have thought it wasn’t possible

Apple’s been doing it for years. They try to do ahead of time transpiling wherever they can but they also do it on-the-fly for things like JITed code.

@[email protected]
link
fedilink
English
14M

I thought FAT binaries don’t work like that - they included multiple instruction sets with a header pointing to the sections (68k, PPC, and x86)

Rosetta to the best of my understanding did something similar - but relied on some custom microcode support that isn’t rooted in ARM instructions. Do you have a link that explains a bit more in depth on how they did that?

@[email protected]
link
fedilink
English
8
edit-2
4M

Fat binaries contain both ARM and x86 code, but I was referring to Rosetta, which is used for x86-only binaries.

Rosetta does translation of x86 to ARM, both AOT and JIT. It does translate to normal ARM code, the only dependency on a Apple-specific custom ARM extension is that the M-series processors have a special mode that implements x86-like strong memory ordering. This means Rosetta does not have to figure out where to place memory barriers, this allows for much better performance.

So when running translated code Apple Silicon is basically an ARM CPU with an x86 memory model.

@[email protected]
link
fedilink
English
14M

That makes a lot of sense - I wonder if they also do the SIGSEGV trick like HotSpot to know when they need to JIT the next chunk of instructions

Create a post

Welcome to the largest gaming community on Lemmy! Discussion for all kinds of games. Video games, tabletop games, card games etc.

Weekly Threads:

What Are You Playing?

The Weekly Discussion Topic

Rules:

  1. Submissions have to be related to games

  2. No bigotry or harassment, be civil

  3. No excessive self-promotion

  4. Stay on-topic; no memes, funny videos, giveaways, reposts, or low-effort posts

  5. Mark Spoilers and NSFW

  6. No linking to piracy

More information about the community rules can be found here.

  • 1 user online
  • 186 users / day
  • 791 users / week
  • 2.3K users / month
  • 6.32K users / 6 months
  • 1 subscriber
  • 4.88K Posts
  • 101K Comments
  • Modlog