Rosetta 2 targets one host whose hardware Apple extended for it. ScarletNX's hosts differ in what they give an A64 guest for free, and each part below notes where that matters.
| Host | Systems | Objects | Pages | Runtime JIT | General registers | Flags | Memory order against Arm's |
|---|---|---|---|---|---|---|---|
| x86-64 | Linux, Windows, FreeBSD, Solaris, Android | ELF, COFF on Windows | 4 KiB | Yes, on Windows from 10 1803 | 16 | Yes, with the carry of a subtraction inverted against Arm's C | Stronger (TSO) |
| AArch64 | Linux, Android, iOS, macOS, Windows | ELF, a Mach-O dylib with an ad hoc signature on Apple systems, COFF on Windows | 4 KiB on most Linux and Android, 16 KiB on Apple silicon | Yes. macOS through MAP_JIT, iOS only with a debugger attached | 31, the guest's own | NZCV, the guest's own | The same |
| PowerPC64, little and big endian | Linux | ELF, ELFv1 or ELFv2 | 64 KiB on most ppc64le kernels | Yes | 32, less r1, r2 and r13 | Condition register fields and the carry in XER | Weaker: not multi-copy atomic |
| RISC-V 64 | Linux | ELF | 4 KiB | No | 32, less zero, sp, gp and tp | No integer flags | Close (RVWMO) |
| LoongArch 64 | Linux | ELF | Set by the kernel | No | 32, less zero, tp, sp and r21 | No integer flags | Weak, still to be compared with Arm's |
| MIPS64, little and big endian | Linux | ELF, n64 with the ABI's GOT | 4, 16 or 64 KiB, set by the kernel | No | 32, less zero, at, k0, k1, gp and sp | No integer flags | Weak, still to be compared with Arm's |
| s390x (IBM Z), big endian | Linux | ELF | 4 KiB | No | 16, less r15 (sp) | A 2-bit condition code | Stronger, close to TSO |
The object formats, page sizes and JIT support come from docs/dev/architecture.md, docs/hosts/apple.md, docs/hosts/ppc64.md,
docs/hosts/riscv-loongarch.md, docs/hosts/mips64.md, docs/hosts/s390x.md and HOST_MACHINE in
src/common/cpu/recompiler/loader/code_loader.c. docs/user/install.md says the PowerPC64, RISC-V and LoongArch builds are
cross-built, that big-endian PowerPC64 has not run on a big-endian machine, and that no game runs on macOS yet.
docs/hosts/riscv-loongarch.md says no real RISC-V or LoongArch machine has run them, docs/hosts/mips64.md no MIPS machine and
docs/hosts/s390x.md no IBM Z.
Two rows matter most for this plan. x86-64 and s390x are the hosts with 16 general registers, so they are the ones
where guest registers cannot all live in host registers. RISC-V, LoongArch, MIPS64 and s390x have no runtime JIT, so a
function the recompile missed cannot run there at all, and the game ends with the reason (rt_miss in
src/nx/runtime/rtapi.c).
Made from docs/layers/cpu/plan.md at 69237645142c. GPL-3.0-or-later.