nx_x86_64_arith_test.nx
buildroot/runtime/nx_x86_64_arith_test.nx
about
nx_x86_64_arith_test.nx -- session 4 smoke for mul/div/shift/bitwise.
Computes ((7 * 6) - 30) / 4 = 3 entirely on the x86_64 stack
machine, ASCII-encodes the result (0x30 + 3 = '3') and writes
one byte to stdout. Validates imulq + subq + cqo + idivq.
Then ALSO does:
(0xFF & 0x0F) | 0x40 = 0x4F = 'O' -- and/or
(5 ^ 3) << 1 = 12 -> '<' -- xor/shlq_imm
not(~0xFFFFFFFFFFFFFFFB) = 5 -> '5' -- notq + neg
But the SMOKE asserts ONLY the first one to keep things minimal.
Stdout: "3" (one byte 0x33).
dependencies 3 imports · 0 importers
imports: syscalls.nxnx_outbuf.nxnx_x86_64.nx
imported by: nobody (leaf or entry point)
call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown
structs
| none |
consts
| none |
functions
| 18 | func main() -> i64 |