callee_save_test.nx
buildroot/runtime/callee_save_test.nx
about
callee_save_test.nx -- exercise emit_function's save_mask > 0 path.
Hand-crafts a mask that claims s0 + s3 were used by regalloc, then
calls emit_function and verifies the asm output contains:
* prologue saves for s0 and s3
* an epilogue label .L<fn>_epi:
* epilogue restores + ld ra + addi + ret
* the RETURN instruction emits `j .L<fn>_epi` instead of inline
Confirms mask == 0 path stays inline-return (no epilogue label
present in that output -- absence check).
dependencies 5 imports · 0 importers
imports: syscalls.nxtypes.nxir.nxoutbuf.nxriscv.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
| 19 | func buf_contains(buf: *u8, n: i64, needle: *u8) -> i64 {
called by 1: main |
| 37 | func main() -> i64 { |