The hosts

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.

HostSystemsObjectsPagesRuntime JITGeneral registersFlagsMemory order against Arm's
x86-64Linux, Windows, FreeBSD, Solaris, AndroidELF, COFF on Windows4 KiBYes, on Windows from 10 180316Yes, with the carry of a subtraction inverted against Arm's CStronger (TSO)
AArch64Linux, Android, iOS, macOS, WindowsELF, a Mach-O dylib with an ad hoc signature on Apple systems, COFF on Windows4 KiB on most Linux and Android, 16 KiB on Apple siliconYes. macOS through MAP_JIT, iOS only with a debugger attached31, the guest's ownNZCV, the guest's ownThe same
PowerPC64, little and big endianLinuxELF, ELFv1 or ELFv264 KiB on most ppc64le kernelsYes32, less r1, r2 and r13Condition register fields and the carry in XERWeaker: not multi-copy atomic
RISC-V 64LinuxELF4 KiBNo32, less zero, sp, gp and tpNo integer flagsClose (RVWMO)
LoongArch 64LinuxELFSet by the kernelNo32, less zero, tp, sp and r21No integer flagsWeak, still to be compared with Arm's
MIPS64, little and big endianLinuxELF, n64 with the ABI's GOT4, 16 or 64 KiB, set by the kernelNo32, less zero, at, k0, k1, gp and spNo integer flagsWeak, still to be compared with Arm's
s390x (IBM Z), big endianLinuxELF4 KiBNo16, less r15 (sp)A 2-bit condition codeStronger, 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.