code wiki / _hdl_build / nx_mulh_diag.nx
nx_mulh_diag.nx
buildroot/runtime/_hdl_build/nx_mulh_diag.nx
about
nx_mulh_diag.nx -- decisive: compute mulh(0xffffffff86129b49, 0x00c50021) on the golden sim's ALU AND my fast
interpreter's mulh64. QEMU says the answer is -1 (0xffffffffffffffff). Whichever gives -1 is correct. expect_exit:0
dependencies 6 imports · 0 importers
imports: nx_syscalls.nxnx_g_puts_lib.nxnishi_hdl_primitives.nxrv64im_min_decoder.nxrv64im_min_alu.nxnx_rv64_fast.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
| 10 | func g_ph16(v: i64) -> i64 { g_puts("0x" as *u8); let b: *u8=sys_mmap(20); var i: i64=15; while i>=0 { let nib: i64=(v>>(i*4))&15; if nib<10 { b[15-i]=(48+nib) as u8 } else { b[15-i]=(87+nib) as u8 } i=i-1 } b[16]=10 as u8; sys_write(1,b,17); return 0 } |
| 12 | func main() -> i64 |