holey-bytes/lang/tests/son_tests_struct_patterns.txt

49 lines
879 B
Plaintext
Raw Normal View History

fib:
ADDI64 r254, r254, -32d
ST r31, r254, 0a, 32h
CP r32, r2
LI64 r33, 2d
2024-10-25 07:51:33 -05:00
JLTU r2, r33, :0
CP r34, r32
ADDI64 r2, r34, -1d
JAL r31, r0, :fib
CP r2, r32
CP r34, r1
SUB64 r2, r2, r33
JAL r31, r0, :fib
ADD64 r1, r1, r34
JMP :1
0: CP r1, r32
1: LD r31, r254, 0a, 32h
ADDI64 r254, r254, 32d
JALA r0, r31, 0a
fib_iter:
2024-11-13 03:28:16 -06:00
LI64 r6, 1d
CP r7, r0
CP r1, r7
CP r12, r6
2: JNE r2, r7, :0
JMP :1
2024-11-13 03:28:16 -06:00
0: ADD64 r3, r12, r1
SUB64 r2, r2, r6
CP r1, r12
CP r12, r3
JMP :2
1: JALA r0, r31, 0a
main:
2024-10-29 04:31:52 -05:00
ADDI64 r254, r254, -24d
ST r31, r254, 0a, 24h
LI64 r32, 10d
CP r2, r32
JAL r31, r0, :fib
2024-10-29 04:31:52 -05:00
CP r2, r32
CP r33, r1
JAL r31, r0, :fib_iter
SUB64 r1, r33, r1
2024-10-29 04:31:52 -05:00
LD r31, r254, 0a, 24h
ADDI64 r254, r254, 24d
JALA r0, r31, 0a
2024-11-13 03:28:16 -06:00
code size: 290
ret: 0
status: Ok(())