The NX's fixups over a64.sail, each with why: what Horizon's EL0 makes of the architecture where it chooses, and where ScarletNX's CPU keeps the registers. sailgen reads this file after a64.sail (--overlay), and a definition here takes the place of a64.sail's of the same name; a top-level let is a constant the generated code folds. a64.roots stops the extraction at the names defined here, so a64.sail holds only sail-arm's own text ScarletNX's CPU keeps the general-purpose registers in one array of 32 (cpu.h's CPU.x): X0 to X30, then the stack pointer. sail-arm has 31 registers R0 to R30, which get_R and set_R pick by a match on the number; here they are GPR's elements, by that number, which the back end loads and stores where the CPU keeps them (sg_GPR_read)
register GPR : vector(32, bits(64))
Made from ScarletNX's Sail at 166ad3910f80. sail-arm's definitions are Arm's ASL in Sail (BSD 3-Clause Clear, license); ScarletNX's fixups are GPL-3.0-or-later.