holey-bytes/hblang/tests/son_tests_loops.txt

32 lines
577 B
Plaintext
Raw Normal View History

2024-09-05 19:42:07 -05:00
main:
2024-09-08 05:00:07 -05:00
ADDI64 r254, r254, -16d
ST r31, r254, 0a, 16h
LI64 r32, 10d
CP r2, r32
2024-09-05 19:42:07 -05:00
JAL r31, r0, :fib
2024-09-08 05:00:07 -05:00
LD r31, r254, 0a, 16h
ADDI64 r254, r254, 16d
2024-09-05 19:42:07 -05:00
JALA r0, r31, 0a
fib:
ADDI64 r254, r254, -56d
ST r31, r254, 0a, 56h
2024-09-05 19:42:07 -05:00
CP r32, r2
CP r33, r32
LI64 r34, 0d
CP r1, r34
LI64 r35, 1d
CP r36, r35
2: JNE r33, r34, :0
JMP :1
0: SUB64 r33, r33, r35
ADD64 r37, r1, r36
2024-09-05 19:42:07 -05:00
CP r1, r36
CP r36, r37
2024-09-05 19:42:07 -05:00
JMP :2
1: LD r31, r254, 0a, 56h
ADDI64 r254, r254, 56d
2024-09-05 19:42:07 -05:00
JALA r0, r31, 0a
2024-09-08 05:00:07 -05:00
code size: 207
2024-09-05 19:42:07 -05:00
ret: 55
status: Ok(())