code wiki / (root) / riscv_fp_test.nx

riscv_fp_test.nx

buildroot/runtime/riscv_fp_test.nx

10484 B266 linesdepth 6pulls 14 transitivereach 0 importersview sourcekind gate/prooftopic riscv
docsdependenciesstructsconstsfunctions

about

riscv_fp_test.nx -- self-test for rv_emit_fbinop (F-extension). Sanity-check emit_fbinop_mnem and rv_emit_fbinop by hand-building a minimal FADD instruction and checking the emitted asm contains the expected fadd.s mnemonic and register operands. Does NOT attempt to link or execute the fp code path -- the allocator doesn't yet assign f-register homes, so full end-to-end verification waits on the f-reg regalloc commit.

dependencies 6 imports · 0 importers

syscalls.nx types.nx ir.nx outbuf.nx regalloc.nx riscv.nx riscv_fp_test.nx

imports: syscalls.nxtypes.nxir.nxoutbuf.nxregalloc.nxriscv.nx

imported by: nobody (leaf or entry point)

call flow from main pre-order; caps 40 nodes / depth 6 declared; ↻ = already shown

main out_new sys_mmap emit_fbinop_mnem out_str out_char buf_contains ir_function_new sys_mmap ↻ ir_type_i64 alloc_type sys_mmap ↻ ir_block_new nx_assert_ptr sys_write nx_puts_err sys_write ↻ nx_assert sys_write ↻ nx_puts_err ↻ nx_assert_lt sys_write ↻ nx_puti_err sys_mmap ↻ sys_write ↻ nx_puts_err ↻ alloc_value nx_assert_ptr ↻ nx_assert ↻ nx_assert_lt ↻ ir_emit_binop nx_assert_ptr ↻ nx_assert ↻ alloc_instr nx_assert_ptr ↻ nx_assert ↻ nx_assert_lt ↻ alloc_value ↻ append_instr loc_at

structs

none

consts

none

functions

18func buf_contains(buf: *u8, n: i64, needle: *u8) -> i64 {
called by 1: main
36func main() -> i64 {