3 ms·
If I had to guess it's because Rosetta isn't fully emulating an x86_64 instruction set but rather dynamically translating API calls for the most part.
by unicornfinder 6y ago
If I had to guess it's because Rosetta isn't fully emulating an x86_64 instruction set but rather dynamically translating API calls for the most part.
- mkl 6y agoI think it's neither of those things. The x86_64 machine code instructions are translated into ARM instructions, so there's no emulation and the API calls don't need to change.
- monocasa 6y ago> The x86_64 machine code instructions are translated into ARM instructions, so there's no emulation That's what emulation is.
- mkl 6y agoI think emulation would be interpreting the instructions one by one and doing what they say in software (a bit like Python's byte code interpreter). Rosetta translates the binary to another (now native) binary, and then runs it like normal, and much of the time this will be an ahead-of-time once off translation.
- monocasa 6y agoRecompilation is a valid emulation strategy. You're just amortizing client instruction decode by doing it ahead of time. Last time I checked, that's how RPCS3 worked for instance, since PS3's GameOS didn't generally allow JITs anyway.