holey-bytes/lang/tests/son_tests_null_check_test.txt

24 lines
419 B
Plaintext
Raw Normal View History

get_ptr:
2024-11-13 03:28:16 -06:00
CP r1, r0
JALA r0, r31, 0a
main:
2024-11-13 03:28:16 -06:00
ADDI64 r254, r254, -32d
ST r31, r254, 0a, 32h
JAL r31, r0, :get_ptr
2024-11-13 03:28:16 -06:00
JNE r1, r0, :0
CP r1, r0
JMP :1
2024-11-13 03:28:16 -06:00
0: LI64 r32, 10d
CP r33, r1
2: LD r1, r33, 0a, 8h
JEQ r1, r32, :1
ADDI64 r34, r1, 1d
ST r34, r33, 0a, 8h
JMP :2
2024-11-13 03:28:16 -06:00
1: LD r31, r254, 0a, 32h
ADDI64 r254, r254, 32d
JALA r0, r31, 0a
2024-11-13 03:28:16 -06:00
code size: 161
ret: 0
status: Ok(())