code wiki / (root) / _self_host_li_test.nx

_self_host_li_test.nx source

↩ module page · 10 lines · 293 B

1// Test that the self-host can load a 49-bit constant correctly. 2// expect_exit: 1 3import "nx_syscalls.nx" 4 5func main() -> i64 { 6 let x: i64 = 0x0001000100010001 7 // 0x0001000100010001 = 281479271743489 8 // Cast lowest 16 bits: should be 1. Use as exit code. 9 return x & 0xFFFF 10}