Posts

Showing posts from June, 2020

Rosetta 2 explained

Image
(This is my assumption on how Apple's new Rosetta 2 works.) Rosetta 2 is not an emulator. It is a compiler that translates from one instruction set to another. This translation is part of the process where code and libraries are loaded into caches. Most likely Rosetta 2 is integrated into the dynamic linker dyld. The compiled code should execute at nearly native speed. Microsoft has a similar system for its Windows 10 ARM version. It works both ways; ARM apps can be executed on Intel PCs. The translation maps instructions and registers from one instruction set architecture to another. It is easy to compile from a limited instruction set to a more advanced instruction set. The Windows 10 implementation is good at translation 32-bit x86 and ARM core to 64-bit processors. It may not be able to translate 64-bit code. Apple has depreciated 32-bit apps, so I believe Rosetta 2 should be able to handle 64-bit code. One way of making this possible might be to limit compiler output to a comm