code wiki / (root) / _self_host_or_shift_test.nx

_self_host_or_shift_test.nx source

↩ module page · 10 lines · 268 B

1// Bisect: does `expr | (expr << N)` work in self-host? 2// expect_exit: 11 3// Expected: (1 & 0xFF) | ((2 & 0xFF) << 8) = 0x0201 = 513. 513 % 251 = 11. 4 5import "nx_syscalls.nx" 6 7func main() -> i64 { 8 let r: i64 = (1 & 0xFF) | ((2 & 0xFF) << 8) 9 return r % 251 10}