code wiki / (root) / nx_emu_arm64.nx

nx_emu_arm64.nx

buildroot/runtime/nx_emu_arm64.nx

18408 B425 linesdepth 3pulls 3 transitivereach 5 importersview sourcekind librarytopic emu
docsdependenciesstructsconstsfunctions

about

nx_emu_arm64.nx -- sovereign aarch64 (A64) interpreter (NX-EMU). Mirror of nx_emu_rv64.nx for the third architecture. Flat guest RAM (vaddr==offset), NZCV flag engine, Linux aarch64 syscall surface (exit/write/read). NO qemu -- decode/execute is pure NishiLang per the Arm A64 ISA (the spec is the oracle). Register model: X0..X30 in x[], SP + PC as scalars, reg field 31 = XZR (read 0 / write discard). genealogy_id: arm_a64_isa_ddi0487 + linux_arm64_abi lineage_id: nishi_nx_emu_arm64_m6 license_tier: ORIGINAL

dependencies 1 imports · 5 importers

nx_syscalls_x86_64.nx nx_emu_arm64.nx nx_arm64_e2e_test.nx nx_emu_arm64_main.nx nx_isa_spec_test.nx nx_superopt_general_test.nx nx_superopt_machinecode_test.nx

imports: nx_syscalls_x86_64.nx

imported by: nx_arm64_e2e_test.nxnx_emu_arm64_main.nxnx_isa_spec_test.nxnx_superopt_general_test.nxnx_superopt_machinecode_test.nx

structs

none

consts

13const A64_MAGIC_200000000: i64 = 200000000
15const A64_GUEST_SIZE: i64 = 16777216
16const A64_SYS_READ: i64 = 63
17const A64_SYS_WRITE: i64 = 64
18const A64_SYS_EXIT: i64 = 93
19const A64_SYS_EXITG: i64 = 94
20const A64E_UNSUPPORTED: i64 = -1
21const A64E_FAULT: i64 = -3

functions

24func a64e_srl(v: i64, n: i64) -> i64
29func a64e_ltu(a: i64, b: i64) -> i64
36func a64e_udiv(a: i64, b: i64) -> i64
called by 1: emu_arm64_run_mem calls 2: a64e_srla64e_ltu
47func a64e_g_ld(mem: *u8, va: i64, width: i64, signd: i64) -> i64
59func a64e_g_st(mem: *u8, va: i64, width: i64, val: i64) -> i64
64func a64e_rd(x: *i64, r: i64) -> i64
called by 1: emu_arm64_run_mem
68func a64e_wr(x: *i64, r: i64, v: i64) -> i64
called by 1: emu_arm64_run_mem
73func a64e_subs(a: i64, b: i64, f: *i64) -> i64
called by 1: emu_arm64_run_mem calls 1: a64e_ltu
87func a64e_adds(a: i64, b: i64, f: *i64) -> i64
called by 1: emu_arm64_run_mem calls 1: a64e_ltu
103func a64e_cond(cc: i64, nf: i64, zf: i64, cf: i64, vf: i64) -> i64
called by 1: emu_arm64_run_mem
120func a64e_shiftreg(val: i64, typ: i64, amt: i64) -> i64
called by 1: emu_arm64_run_mem calls 1: a64e_srl
128func emu_arm64_run_mem(mem: *u8, mem_size: i64, entry: i64, sp0: i64) -> i64
396func emu_arm64_run(code: *u8, code_len: i64) -> i64
403func emu_arm64_load_elf(buf: *u8, len: i64) -> i64