a8aba7e7c2
return value is now a separate node pinned to the call Signed-off-by: Jakub Doka <jakub.doka2@gmail.com>
115 lines
2.1 KiB
Plaintext
115 lines
2.1 KiB
Plaintext
continue_and_state_change:
|
|
CP r13, r2
|
|
CP r15, r0
|
|
LI64 r16, 3d
|
|
LI64 r14, 4d
|
|
LI64 r17, 2d
|
|
LI64 r18, 10d
|
|
6: JLTU r13, r18, :0
|
|
JMP :1
|
|
0: JNE r13, r17, :2
|
|
CP r13, r14
|
|
JMP :3
|
|
2: JNE r13, r16, :4
|
|
CP r13, r15
|
|
1: CP r1, r13
|
|
JMP :5
|
|
4: ADDI64 r13, r13, 1d
|
|
3: JMP :6
|
|
5: JALA r0, r31, 0a
|
|
infinite_loop:
|
|
ADDI64 r254, r254, -32d
|
|
ST r31, r254, 0a, 32h
|
|
LI64 r34, 1d
|
|
CP r33, r0
|
|
CP r32, r33
|
|
1: JNE r32, r34, :0
|
|
JMP :0
|
|
0: CP r2, r33
|
|
JAL r31, r0, :continue_and_state_change
|
|
CP r32, r1
|
|
JMP :1
|
|
LD r31, r254, 0a, 32h
|
|
ADDI64 r254, r254, 32d
|
|
JALA r0, r31, 0a
|
|
main:
|
|
ADDI64 r254, r254, -40d
|
|
ST r31, r254, 0a, 40h
|
|
CP r2, r0
|
|
JAL r31, r0, :multiple_breaks
|
|
LI64 r32, 3d
|
|
CP r33, r1
|
|
JEQ r33, r32, :0
|
|
LI64 r32, 1d
|
|
CP r1, r32
|
|
JMP :1
|
|
0: LI64 r33, 4d
|
|
CP r2, r33
|
|
JAL r31, r0, :multiple_breaks
|
|
LI64 r34, 10d
|
|
CP r35, r1
|
|
JEQ r35, r34, :2
|
|
LI64 r32, 2d
|
|
CP r1, r32
|
|
JMP :1
|
|
2: CP r2, r0
|
|
JAL r31, r0, :state_change_in_break
|
|
CP r35, r1
|
|
JEQ r35, r0, :3
|
|
CP r1, r32
|
|
JMP :1
|
|
3: CP r2, r33
|
|
JAL r31, r0, :state_change_in_break
|
|
CP r35, r1
|
|
JEQ r35, r34, :4
|
|
CP r1, r33
|
|
JMP :1
|
|
4: CP r2, r34
|
|
JAL r31, r0, :continue_and_state_change
|
|
CP r33, r1
|
|
JEQ r33, r34, :5
|
|
LI64 r32, 5d
|
|
CP r1, r32
|
|
JMP :1
|
|
5: CP r2, r32
|
|
JAL r31, r0, :continue_and_state_change
|
|
CP r32, r1
|
|
JEQ r32, r0, :6
|
|
LI64 r32, 6d
|
|
CP r1, r32
|
|
JMP :1
|
|
6: JAL r31, r0, :infinite_loop
|
|
CP r1, r0
|
|
1: LD r31, r254, 0a, 40h
|
|
ADDI64 r254, r254, 40d
|
|
JALA r0, r31, 0a
|
|
multiple_breaks:
|
|
CP r13, r2
|
|
LI64 r14, 3d
|
|
LI64 r15, 10d
|
|
4: JLTU r13, r15, :0
|
|
JMP :1
|
|
0: ADDI64 r13, r13, 1d
|
|
JNE r13, r14, :2
|
|
1: CP r1, r13
|
|
JMP :3
|
|
2: JMP :4
|
|
3: JALA r0, r31, 0a
|
|
state_change_in_break:
|
|
CP r13, r2
|
|
LI64 r14, 3d
|
|
LI64 r15, 10d
|
|
4: JLTU r13, r15, :0
|
|
JMP :1
|
|
0: JNE r13, r14, :2
|
|
CP r13, r0
|
|
1: CP r1, r13
|
|
JMP :3
|
|
2: ADDI64 r13, r13, 1d
|
|
JMP :4
|
|
3: JALA r0, r31, 0a
|
|
timed out
|
|
code size: 667
|
|
ret: 10
|
|
status: Ok(())
|