10 ms·
M1 uses the ARM64[1] instruction set and a lot of compilers started working on ARM64 years ago so in many cases compilers were already ready before M1 was annou
by wmf 5y ago
M1 uses the ARM64[1] instruction set and a lot of compilers started working on ARM64 years ago so in many cases compilers were already ready before M1 was announced. Creating a macOS/ARM64 toolchain is mostly a combination of existing features from Linux/ARM64 and macOS/x86-64. For example, Linux uses ELF but macOS needs a Mach-O linker but most languages already had Mach-O support anyway. Once you have the toolchain it's a matter of recompiling and fixing any non-portable assumptions in the code. Fortunately x86-64 and ARM64 are both 64-bit little-endian so porting is fairly easy but the memory consistency models are different which can expose bugs in poorly-written code.
[1] The official name is something else but it's dumb