a8aba7e7c2
return value is now a separate node pinned to the call Signed-off-by: Jakub Doka <jakub.doka2@gmail.com>
58 lines
1.2 KiB
Plaintext
58 lines
1.2 KiB
Plaintext
main:
|
|
ADDI64 r254, r254, -58d
|
|
ST r31, r254, 26a, 32h
|
|
JAL r31, r0, :returner_fn
|
|
CP r32, r1
|
|
ADDI64 r33, r254, 2d
|
|
CP r1, r33
|
|
JAL r31, r0, :returner_bn
|
|
ADDI64 r34, r254, 0d
|
|
JAL r31, r0, :returner_cn
|
|
ST r1, r34, 0a, 2h
|
|
LD r33, r254, 2a, 1h
|
|
CMPU r32, r32, r0
|
|
CMPUI r32, r32, 0d
|
|
CMPU r33, r33, r0
|
|
CMPUI r33, r33, 0d
|
|
LD r34, r254, 0a, 1h
|
|
AND r32, r33, r32
|
|
CMPU r33, r34, r0
|
|
CMPUI r33, r33, 0d
|
|
AND r32, r33, r32
|
|
ANDI r32, r32, 255d
|
|
JNE r32, r0, :0
|
|
CP r1, r0
|
|
JMP :1
|
|
0: LI64 r32, 1d
|
|
CP r1, r32
|
|
1: LD r31, r254, 26a, 32h
|
|
ADDI64 r254, r254, 58d
|
|
JALA r0, r31, 0a
|
|
returner_bn:
|
|
ADDI64 r254, r254, -24d
|
|
CP r15, r1
|
|
LI8 r14, 1b
|
|
ADDI64 r13, r254, 0d
|
|
ST r14, r254, 0a, 1h
|
|
ST r0, r254, 8a, 8h
|
|
ST r0, r254, 16a, 8h
|
|
BMC r13, r15, 24h
|
|
ADDI64 r254, r254, 24d
|
|
JALA r0, r31, 0a
|
|
returner_cn:
|
|
ADDI64 r254, r254, -2d
|
|
LI8 r13, 1b
|
|
ST r13, r254, 0a, 1h
|
|
ST r0, r254, 1a, 1h
|
|
LD r1, r254, 0a, 2h
|
|
ADDI64 r254, r254, 2d
|
|
JALA r0, r31, 0a
|
|
returner_fn:
|
|
LD r13, r254, 0a, 0h
|
|
ORI r13, r13, 128d
|
|
CP r1, r13
|
|
JALA r0, r31, 0a
|
|
code size: 452
|
|
ret: 1
|
|
status: Ok(())
|