2024-09-15 13:14:56 -05:00
|
|
|
fib:
|
2024-09-20 04:01:10 -05:00
|
|
|
ADDI64 r254, r254, -32d
|
|
|
|
ST r31, r254, 0a, 32h
|
2024-09-15 13:14:56 -05:00
|
|
|
LI64 r32, 1d
|
|
|
|
LI64 r33, 0d
|
|
|
|
CP r1, r33
|
|
|
|
2: JNE r2, r33, :0
|
|
|
|
JMP :1
|
2024-09-20 04:01:10 -05:00
|
|
|
0: ADD64 r34, r32, r1
|
|
|
|
ADDI64 r2, r2, -1d
|
|
|
|
CP r1, r32
|
|
|
|
CP r32, r34
|
2024-09-15 13:14:56 -05:00
|
|
|
JMP :2
|
2024-09-20 04:01:10 -05:00
|
|
|
1: LD r31, r254, 0a, 32h
|
|
|
|
ADDI64 r254, r254, 32d
|
|
|
|
JALA r0, r31, 0a
|
|
|
|
main:
|
|
|
|
ADDI64 r254, r254, -8d
|
|
|
|
ST r31, r254, 0a, 8h
|
|
|
|
LI64 r2, 10d
|
|
|
|
JAL r31, r0, :fib
|
|
|
|
LD r31, r254, 0a, 8h
|
|
|
|
ADDI64 r254, r254, 8d
|
2024-09-15 13:14:56 -05:00
|
|
|
JALA r0, r31, 0a
|
2024-09-20 04:01:10 -05:00
|
|
|
code size: 202
|
2024-09-15 13:14:56 -05:00
|
|
|
ret: 55
|
|
|
|
status: Ok(())
|