code wiki / (root) / _self_host_shift_arith_matrix.nx

_self_host_shift_arith_matrix.nx

buildroot/runtime/_self_host_shift_arith_matrix.nx

2722 B86 linesdepth 2pulls 2 transitivereach 0 importersview sourcekind tooltopic self
docsdependenciesstructsconstsfunctions

about

Regression matrix: every shift + funct7-discriminated arith op must give the right semantic answer when run through nxasm. Born from the srai-aliased-to-srli bug (2026-05-16): nxasm's dispatch had `srai` -> same encoding as `srli`, silently returning the zero-fill (logical) shift instead of sign-fill (arithmetic). This smoke pins each mnemonic to a value that would FAIL if the dispatch ever aliased again. Exit code = case number of failure (0 = all PASS).

dependencies 1 imports · 0 importers

nx_syscalls.nx _self_host_shift_arith_matrix.

imports: nx_syscalls.nx

imported by: nobody (leaf or entry point)

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

main test_srli_logical test_sra_arith_negative test_sub_not_add test_sub_negative_result test_slli_high_shift test_srai_long_chain

structs

none

consts

none

functions

13func test_srli_logical() -> i64 {
called by 1: main
25func test_sra_arith_negative() -> i64 {
called by 1: main
34func test_sub_not_add() -> i64 {
called by 1: main
43func test_sub_negative_result() -> i64 {
called by 1: main
52func test_slli_high_shift() -> i64 {
called by 1: main
62func test_srai_long_chain() -> i64 {
called by 1: main
72func main() -> i64 {