nx_rw_shift56.nx source
↩ module page · 20 lines · 627 B
1// nx_rw_shift56.nx -- DELIBERATE TRAP WITNESS (pack-rules vet). Tactic under test: an IMMEDIATE
2// shift count > 31 on a variable (documented 2026-07-06: blanks the .s; fix = variable-shift).
3// Exit 0 iff `one << 56` equals the loop-computed 2^56. While ACTIVE this is EXPECTED TO FAIL
4// THE LANE (empty .s). Not a defect.
5// license_tier: ORIGINAL
6import "nx_syscalls.nx"
7
8func main(argc: i64, argv: *i64) -> i64 {
9 let one: i64 = 1
10 let v: i64 = one << 56
11 var e: i64 = 1
12 var i: i64 = 0
13 while i < 56 {
14 e = e * 2
15 i = i + 1
16 }
17 if v == e { sys_exit(0) }
18 sys_exit(1)
19 return 0
20}