nx_emu_s390x.nx
buildroot/runtime/nx_emu_s390x.nx
about
nx_emu_s390x.nx -- sovereign IBM Z (s390x) interpreter (NX-EMU).
64-bit big-endian, 16 GPRs, VARIABLE-LENGTH instructions (length from the top 2
bits of byte0: 00->2, 01/10->4, 11->6). Decodes the subset nxc2's s390x backend
emits: BCR(br) RI(aghi/lghi) RRE(agr/lgr/msgr/sgr) RX(la) RXY(lg/stg) RSY(lmg/stmg)
RIL(brasl) + SVC. Linux s390x: svc <imm>=number, args r2.., exit=1 (code in r2).
NO qemu. license_tier: ORIGINAL
dependencies 1 imports · 0 importers
imports: nx_syscalls_x86_64.nx
imported by: nobody (leaf or entry point)
structs
| none |
consts
| 9 | const SZ_GUEST: i64 = 16777216 |
| 10 | const SZ_SYS_EXIT: i64 = 1 |
functions
| 12 | func sz_ld(mem: *u8, va: i64, width: i64) -> i64 { var v: i64 = 0; var i: i64 = 0; while i < width { v = (v << 8) | (mem[va + i] & 0xff); i = i + 1 } return v } // big-endian called by 1: emu_s390x_run_mem |
| 13 | func sz_st(mem: *u8, va: i64, width: i64, val: i64) -> i64 { var i: i64 = 0; while i < width { mem[va + (width - 1 - i)] = (val >> (i * 8)) & 0xff; i = i + 1 } return 0 } called by 1: emu_s390x_run_mem |
| 14 | func sz_sx(v: i64, bits: i64) -> i64 { let m: i64 = 1 << (bits - 1); if (v & m) != 0 { return v - (1 << bits) } return v } called by 1: emu_s390x_run_mem |
| 16 | func emu_s390x_run_mem(mem: *u8, mem_size: i64, entry: i64, sp0: i64) -> i64 |
| 133 | func emu_s390x_run(code: *u8, code_len: i64) -> i64 calls 1: emu_s390x_run_mem |