holey-bytes/hblang/tests/codegen_tests_struct_patterns.txt

66 lines
1.2 KiB
Plaintext
Raw Normal View History

2024-09-19 06:40:03 -05:00
fib:
ADDI64 r254, r254, -32d
ST r31, r254, 0a, 32h
CP r32, r2
LI64 r33, 2d
JLTS r32, r33, :0
CP r33, r32
ADDI64 r33, r33, -1d
2024-09-03 15:34:17 -05:00
CP r2, r33
2024-09-19 06:40:03 -05:00
JAL r31, r0, :fib
2024-09-03 15:34:17 -05:00
CP r33, r1
2024-09-19 06:40:03 -05:00
CP r34, r32
ADDI64 r34, r34, -2d
CP r2, r34
JAL r31, r0, :fib
CP r34, r1
ADD64 r1, r33, r34
JMP :1
0: CP r1, r32
1: LD r31, r254, 0a, 32h
ADDI64 r254, r254, 32d
2024-09-03 15:34:17 -05:00
JALA r0, r31, 0a
fib_iter:
2024-09-09 18:15:18 -05:00
ADDI64 r254, r254, -40d
ST r31, r254, 0a, 40h
2024-09-03 15:34:17 -05:00
CP r32, r2
LI64 r33, 0d
LI64 r34, 1d
2: LI64 r35, 0d
JNE r32, r35, :0
2024-09-03 15:34:17 -05:00
JMP :1
2024-09-12 11:42:21 -05:00
0: CP r35, r33
ADD64 r35, r35, r34
2024-09-03 15:34:17 -05:00
CP r33, r34
CP r34, r35
2024-09-09 18:15:18 -05:00
ADDI64 r32, r32, -1d
2024-09-03 15:34:17 -05:00
JMP :2
1: CP r1, r33
2024-09-09 18:15:18 -05:00
LD r31, r254, 0a, 40h
ADDI64 r254, r254, 40d
2024-09-03 15:34:17 -05:00
JALA r0, r31, 0a
2024-09-19 06:40:03 -05:00
main:
ADDI64 r254, r254, -26d
ST r31, r254, 2a, 24h
LI64 r32, 10d
ST r32, r254, 0a, 1h
LI64 r32, 10d
ST r32, r254, 1a, 1h
CP r32, r0
LD r32, r254, 0a, 1h
CP r33, r0
LD r33, r254, 1a, 1h
CP r2, r32
JAL r31, r0, :fib
2024-09-19 06:40:03 -05:00
CP r32, r1
CP r2, r33
JAL r31, r0, :fib_iter
CP r33, r1
2024-09-19 06:40:03 -05:00
SUB64 r1, r32, r33
LD r31, r254, 2a, 24h
ADDI64 r254, r254, 26d
JALA r0, r31, 0a
2024-09-13 11:23:00 -05:00
code size: 452
2024-07-08 04:00:35 -05:00
ret: 0
status: Ok(())