removing codegen test outputs
This commit is contained in:
parent
ca8497550a
commit
3c12c0e288
|
@ -1,28 +0,0 @@
|
|||
main:
|
||||
ADDI64 r254, r254, -32d
|
||||
ST r31, r254, 0a, 32h
|
||||
LI64 r32, 10d
|
||||
LI64 r33, 20d
|
||||
LI64 r34, 2d
|
||||
DIRS64 r33, r0, r33, r34
|
||||
SUB64 r32, r32, r33
|
||||
LI64 r33, 4d
|
||||
LI64 r34, 2d
|
||||
ADDI64 r34, r34, 2d
|
||||
MUL64 r33, r33, r34
|
||||
ADD64 r32, r32, r33
|
||||
LI64 r33, 4d
|
||||
MULI64 r33, r33, 4d
|
||||
SUB64 r32, r32, r33
|
||||
LI64 r33, 1d
|
||||
SLUI64 r33, r33, 0b
|
||||
ADD64 r32, r32, r33
|
||||
LI64 r33, 1d
|
||||
NEG r33, r33
|
||||
ADD64 r1, r32, r33
|
||||
LD r31, r254, 0a, 32h
|
||||
ADDI64 r254, r254, 32d
|
||||
JALA r0, r31, 0a
|
||||
code size: 205
|
||||
ret: 0
|
||||
status: Ok(())
|
|
@ -1,67 +0,0 @@
|
|||
main:
|
||||
ADDI64 r254, r254, -76d
|
||||
ST r31, r254, 28a, 48h
|
||||
LI64 r32, 511d
|
||||
LI64 r33, 0d
|
||||
ST r33, r254, 0a, 1h
|
||||
LI64 r33, 0d
|
||||
ST r33, r254, 1a, 1h
|
||||
CP r33, r32
|
||||
ANDI r33, r33, 255d
|
||||
ST r33, r254, 2a, 1h
|
||||
CP r33, r32
|
||||
SRUI16 r33, r33, 8b
|
||||
ANDI r33, r33, 255d
|
||||
ST r33, r254, 3a, 1h
|
||||
ADDI64 r33, r254, 0d
|
||||
LI64 r34, 1d
|
||||
ST r34, r254, 4a, 8h
|
||||
LI64 r34, 2d
|
||||
ST r34, r254, 12a, 8h
|
||||
LI64 r34, 4d
|
||||
ST r34, r254, 20a, 8h
|
||||
ADDI64 r34, r254, 4d
|
||||
CP r2, r34
|
||||
JAL r31, r0, :pass
|
||||
CP r34, r1
|
||||
ADDI64 r35, r254, 0d
|
||||
LI64 r36, 3d
|
||||
ADD64 r35, r35, r36
|
||||
CP r36, r0
|
||||
LD r36, r35, 0a, 1h
|
||||
SXT8 r36, r36
|
||||
ADD64 r1, r34, r36
|
||||
LD r31, r254, 28a, 48h
|
||||
ADDI64 r254, r254, 76d
|
||||
JALA r0, r31, 0a
|
||||
pass:
|
||||
ADDI64 r254, r254, -48d
|
||||
ST r31, r254, 0a, 48h
|
||||
CP r32, r2
|
||||
CP r33, r32
|
||||
LI64 r34, 0d
|
||||
MULI64 r34, r34, 8d
|
||||
ADD64 r33, r33, r34
|
||||
LD r34, r33, 0a, 8h
|
||||
CP r33, r32
|
||||
LI64 r35, 1d
|
||||
MULI64 r35, r35, 8d
|
||||
ADD64 r33, r33, r35
|
||||
LD r35, r33, 0a, 8h
|
||||
ADD64 r34, r34, r35
|
||||
CP r33, r32
|
||||
CP r35, r32
|
||||
LI64 r36, 1d
|
||||
MULI64 r36, r36, 8d
|
||||
ADD64 r35, r35, r36
|
||||
LD r36, r35, 0a, 8h
|
||||
MULI64 r36, r36, 8d
|
||||
ADD64 r33, r33, r36
|
||||
LD r36, r33, 0a, 8h
|
||||
ADD64 r1, r34, r36
|
||||
LD r31, r254, 0a, 48h
|
||||
ADDI64 r254, r254, 48d
|
||||
JALA r0, r31, 0a
|
||||
code size: 557
|
||||
ret: 8
|
||||
status: Ok(())
|
|
@ -1,36 +0,0 @@
|
|||
main:
|
||||
ADDI64 r254, r254, -40d
|
||||
ST r31, r254, 0a, 40h
|
||||
LRA r32, r0, :"abඞ\n\r\t56789\0"
|
||||
CP r2, r32
|
||||
JAL r31, r0, :str_len
|
||||
CP r33, r1
|
||||
LRA r34, r0, :"fff\0"
|
||||
CP r2, r34
|
||||
JAL r31, r0, :str_len
|
||||
CP r35, r1
|
||||
ADD64 r1, r35, r33
|
||||
LD r31, r254, 0a, 40h
|
||||
ADDI64 r254, r254, 40d
|
||||
JALA r0, r31, 0a
|
||||
str_len:
|
||||
ADDI64 r254, r254, -48d
|
||||
ST r31, r254, 0a, 48h
|
||||
CP r32, r2
|
||||
LI64 r33, 0d
|
||||
2: CP r34, r32
|
||||
CP r35, r0
|
||||
LD r35, r34, 0a, 1h
|
||||
LI64 r36, 0d
|
||||
JNE r35, r36, :0
|
||||
JMP :1
|
||||
0: ADDI64 r33, r33, 1d
|
||||
ADDI64 r32, r32, 1d
|
||||
JMP :2
|
||||
1: CP r1, r33
|
||||
LD r31, r254, 0a, 48h
|
||||
ADDI64 r254, r254, 48d
|
||||
JALA r0, r31, 0a
|
||||
code size: 270
|
||||
ret: 16
|
||||
status: Ok(())
|
|
@ -1,17 +0,0 @@
|
|||
foo:
|
||||
ADDI64 r254, r254, -8d
|
||||
ST r31, r254, 0a, 8h
|
||||
LD r31, r254, 0a, 8h
|
||||
ADDI64 r254, r254, 8d
|
||||
JALA r0, r31, 0a
|
||||
main:
|
||||
ADDI64 r254, r254, -8d
|
||||
ST r31, r254, 0a, 8h
|
||||
JAL r31, r0, :foo
|
||||
LI64 r1, 0d
|
||||
LD r31, r254, 0a, 8h
|
||||
ADDI64 r254, r254, 8d
|
||||
JALA r0, r31, 0a
|
||||
code size: 143
|
||||
ret: 0
|
||||
status: Ok(())
|
|
@ -1,11 +0,0 @@
|
|||
main:
|
||||
ADDI64 r254, r254, -16d
|
||||
ST r31, r254, 0a, 16h
|
||||
LRA r32, r0, :a
|
||||
LD r1, r32, 0a, 8h
|
||||
LD r31, r254, 0a, 16h
|
||||
ADDI64 r254, r254, 16d
|
||||
JALA r0, r31, 0a
|
||||
code size: 95
|
||||
ret: 50
|
||||
status: Ok(())
|
|
@ -1,11 +0,0 @@
|
|||
main:
|
||||
ADDI64 r254, r254, -16d
|
||||
ST r31, r254, 0a, 16h
|
||||
LRA r32, r0, :a
|
||||
LD r1, r32, 0a, 8h
|
||||
LD r31, r254, 0a, 16h
|
||||
ADDI64 r254, r254, 16d
|
||||
JALA r0, r31, 0a
|
||||
code size: 218
|
||||
ret: 50
|
||||
status: Ok(())
|
|
@ -1,57 +0,0 @@
|
|||
main:
|
||||
ADDI64 r254, r254, -52d
|
||||
ST r31, r254, 12a, 40h
|
||||
LI64 r32, 255d
|
||||
ST r32, r254, 0a, 1h
|
||||
LI64 r32, 0d
|
||||
ST r32, r254, 1a, 1h
|
||||
LI64 r32, 0d
|
||||
ST r32, r254, 2a, 1h
|
||||
LI64 r32, 255d
|
||||
ST r32, r254, 3a, 1h
|
||||
LI64 r32, 0d
|
||||
ST r32, r254, 4a, 4h
|
||||
LI64 r32, 2d
|
||||
ST r32, r254, 8a, 4h
|
||||
LI64 r32, 1d
|
||||
ADDI64 r33, r254, 4d
|
||||
CP r34, r32
|
||||
MULI64 r34, r34, 4d
|
||||
ADD64 r33, r33, r34
|
||||
CP r34, r0
|
||||
LD r34, r33, 0a, 4h
|
||||
LI64 r35, 2d
|
||||
JEQ r34, r35, :0
|
||||
LI64 r1, 0d
|
||||
JMP :1
|
||||
0: ADDI64 r35, r254, 8d
|
||||
ADDI64 r35, r35, -4d
|
||||
CP r34, r0
|
||||
LD r34, r35, 0a, 4h
|
||||
LI64 r33, 0d
|
||||
JEQ r34, r33, :2
|
||||
LI64 r1, 64d
|
||||
JMP :1
|
||||
2: CP r33, r0
|
||||
LD r33, r254, 4a, 4h
|
||||
CP r34, r0
|
||||
LD r34, r254, 8a, 4h
|
||||
ADD32 r33, r33, r34
|
||||
CP r34, r0
|
||||
LD r34, r254, 0a, 1h
|
||||
ADD32 r33, r33, r34
|
||||
CP r34, r0
|
||||
LD r34, r254, 1a, 1h
|
||||
ADD32 r33, r33, r34
|
||||
CP r34, r0
|
||||
LD r34, r254, 2a, 1h
|
||||
ADD32 r33, r33, r34
|
||||
CP r34, r0
|
||||
LD r34, r254, 3a, 1h
|
||||
ADD32 r1, r33, r34
|
||||
1: LD r31, r254, 12a, 40h
|
||||
ADDI64 r254, r254, 52d
|
||||
JALA r0, r31, 0a
|
||||
code size: 474
|
||||
ret: 512
|
||||
status: Ok(())
|
|
@ -1,30 +0,0 @@
|
|||
main:
|
||||
ADDI64 r254, r254, -96d
|
||||
ST r31, r254, 16a, 80h
|
||||
LI64 r32, 10d
|
||||
LI64 r33, 30d
|
||||
LI64 r34, 40d
|
||||
CP r35, r34
|
||||
LI64 r36, 16d
|
||||
LI64 r37, 8d
|
||||
LI64 r38, 10d
|
||||
LI64 r2, 1d
|
||||
LI64 r39, 10d
|
||||
ST r39, r254, 0a, 8h
|
||||
LI64 r39, 20d
|
||||
ST r39, r254, 8a, 8h
|
||||
LD r3, r254, 0a, 16h
|
||||
LI64 r5, 5d
|
||||
LI64 r6, 6d
|
||||
ECA
|
||||
CP r39, r1
|
||||
LRA r40, r0, :arbitrary text
|
||||
|
||||
LI64 r1, 0d
|
||||
LD r31, r254, 16a, 80h
|
||||
ADDI64 r254, r254, 96d
|
||||
JALA r0, r31, 0a
|
||||
ev: Ecall
|
||||
code size: 255
|
||||
ret: 0
|
||||
status: Ok(())
|
|
@ -1,74 +0,0 @@
|
|||
main:
|
||||
ADDI64 r254, r254, -80d
|
||||
ST r31, r254, 0a, 80h
|
||||
JAL r31, r0, :check_platform
|
||||
CP r32, r1
|
||||
LI64 r33, 100d
|
||||
LI64 r34, 30d
|
||||
LI64 r35, 0d
|
||||
LI64 r36, 0d
|
||||
4: CP r37, r35
|
||||
CP r38, r34
|
||||
ADDI64 r38, r38, 1d
|
||||
CMPS r37, r37, r38
|
||||
CMPUI r37, r37, 1d
|
||||
JEQ r37, r0, :0
|
||||
CP r2, r35
|
||||
CP r3, r36
|
||||
CP r4, r33
|
||||
JAL r31, r0, :set_pixel
|
||||
CP r37, r1
|
||||
CP r38, r35
|
||||
ADDI64 r38, r38, 1d
|
||||
CP r35, r38
|
||||
JMP :1
|
||||
0: CP r2, r35
|
||||
CP r3, r36
|
||||
CP r4, r33
|
||||
JAL r31, r0, :set_pixel
|
||||
CP r38, r1
|
||||
LI64 r35, 0d
|
||||
CP r39, r36
|
||||
ADDI64 r39, r39, 1d
|
||||
CP r36, r39
|
||||
1: CP r39, r36
|
||||
CP r40, r33
|
||||
CMPS r39, r39, r40
|
||||
CMPUI r39, r39, 0d
|
||||
NOT r39, r39
|
||||
JEQ r39, r0, :2
|
||||
JMP :3
|
||||
2: JMP :4
|
||||
3: LI64 r1, 0d
|
||||
LD r31, r254, 0a, 80h
|
||||
ADDI64 r254, r254, 80d
|
||||
JALA r0, r31, 0a
|
||||
set_pixel:
|
||||
ADDI64 r254, r254, -32d
|
||||
ST r31, r254, 0a, 32h
|
||||
CP r32, r2
|
||||
CP r33, r3
|
||||
CP r34, r4
|
||||
MUL64 r33, r33, r34
|
||||
ADD64 r33, r33, r32
|
||||
LI64 r1, 0d
|
||||
LD r31, r254, 0a, 32h
|
||||
ADDI64 r254, r254, 32d
|
||||
JALA r0, r31, 0a
|
||||
check_platform:
|
||||
ADDI64 r254, r254, -8d
|
||||
ST r31, r254, 0a, 8h
|
||||
JAL r31, r0, :x86_fb_ptr
|
||||
LD r31, r254, 0a, 8h
|
||||
ADDI64 r254, r254, 8d
|
||||
JALA r0, r31, 0a
|
||||
x86_fb_ptr:
|
||||
ADDI64 r254, r254, -8d
|
||||
ST r31, r254, 0a, 8h
|
||||
LI64 r1, 100d
|
||||
LD r31, r254, 0a, 8h
|
||||
ADDI64 r254, r254, 8d
|
||||
JALA r0, r31, 0a
|
||||
code size: 511
|
||||
ret: 0
|
||||
status: Ok(())
|
|
@ -1,32 +0,0 @@
|
|||
add_one:
|
||||
ADDI64 r254, r254, -16d
|
||||
ST r31, r254, 0a, 16h
|
||||
CP r32, r2
|
||||
ADDI64 r1, r32, 1d
|
||||
LD r31, r254, 0a, 16h
|
||||
ADDI64 r254, r254, 16d
|
||||
JALA r0, r31, 0a
|
||||
add_two:
|
||||
ADDI64 r254, r254, -16d
|
||||
ST r31, r254, 0a, 16h
|
||||
CP r32, r2
|
||||
ADDI64 r1, r32, 2d
|
||||
LD r31, r254, 0a, 16h
|
||||
ADDI64 r254, r254, 16d
|
||||
JALA r0, r31, 0a
|
||||
main:
|
||||
ADDI64 r254, r254, -24d
|
||||
ST r31, r254, 0a, 24h
|
||||
LI64 r2, 10d
|
||||
JAL r31, r0, :add_one
|
||||
CP r32, r1
|
||||
LI64 r2, 20d
|
||||
JAL r31, r0, :add_two
|
||||
CP r33, r1
|
||||
ADD64 r1, r32, r33
|
||||
LD r31, r254, 0a, 24h
|
||||
ADDI64 r254, r254, 24d
|
||||
JALA r0, r31, 0a
|
||||
code size: 257
|
||||
ret: 33
|
||||
status: Ok(())
|
|
@ -1,38 +0,0 @@
|
|||
add:
|
||||
ADDI64 r254, r254, -24d
|
||||
ST r31, r254, 0a, 24h
|
||||
CP r32, r2
|
||||
CP r33, r3
|
||||
ADD64 r1, r32, r33
|
||||
LD r31, r254, 0a, 24h
|
||||
ADDI64 r254, r254, 24d
|
||||
JALA r0, r31, 0a
|
||||
add:
|
||||
ADDI64 r254, r254, -24d
|
||||
ST r31, r254, 0a, 24h
|
||||
CP r32, r2
|
||||
CP r33, r3
|
||||
ADD32 r1, r32, r33
|
||||
LD r31, r254, 0a, 24h
|
||||
ADDI64 r254, r254, 24d
|
||||
JALA r0, r31, 0a
|
||||
main:
|
||||
ADDI64 r254, r254, -32d
|
||||
ST r31, r254, 0a, 32h
|
||||
LI64 r2, 2d
|
||||
LI64 r3, 2d
|
||||
JAL r31, r0, :add
|
||||
CP r32, r1
|
||||
LI64 r2, 1d
|
||||
LI64 r3, 3d
|
||||
JAL r31, r0, :add
|
||||
CP r33, r1
|
||||
CP r34, r32
|
||||
SXT32 r34, r34
|
||||
SUB64 r1, r34, r33
|
||||
LD r31, r254, 0a, 32h
|
||||
ADDI64 r254, r254, 32d
|
||||
JALA r0, r31, 0a
|
||||
code size: 275
|
||||
ret: 0
|
||||
status: Ok(())
|
|
@ -1,144 +0,0 @@
|
|||
deinit:
|
||||
ADDI64 r254, r254, -24d
|
||||
ST r31, r254, 0a, 24h
|
||||
CP r32, r2
|
||||
LD r2, r32, 0a, 8h
|
||||
LD r33, r32, 16a, 8h
|
||||
MULI64 r33, r33, 8d
|
||||
CP r3, r33
|
||||
LI64 r4, 8d
|
||||
JAL r31, r0, :free
|
||||
CP r33, r32
|
||||
CP r1, r33
|
||||
JAL r31, r0, :new
|
||||
LD r31, r254, 0a, 24h
|
||||
ADDI64 r254, r254, 24d
|
||||
JALA r0, r31, 0a
|
||||
free:
|
||||
ADDI64 r254, r254, -40d
|
||||
ST r31, r254, 0a, 40h
|
||||
CP r32, r2
|
||||
CP r33, r3
|
||||
CP r34, r4
|
||||
LRA r35, r0, :FREE_SYS_CALL
|
||||
LD r2, r35, 0a, 8h
|
||||
CP r3, r32
|
||||
CP r4, r33
|
||||
CP r5, r34
|
||||
ECA
|
||||
LD r31, r254, 0a, 40h
|
||||
ADDI64 r254, r254, 40d
|
||||
JALA r0, r31, 0a
|
||||
main:
|
||||
ADDI64 r254, r254, -48d
|
||||
ST r31, r254, 24a, 24h
|
||||
ADDI64 r1, r254, 0d
|
||||
JAL r31, r0, :new
|
||||
ADDI64 r32, r254, 0d
|
||||
CP r2, r32
|
||||
LI64 r3, 69d
|
||||
JAL r31, r0, :push
|
||||
CP r32, r1
|
||||
LD r32, r254, 0a, 8h
|
||||
LD r33, r32, 0a, 8h
|
||||
ADDI64 r32, r254, 0d
|
||||
CP r2, r32
|
||||
JAL r31, r0, :deinit
|
||||
CP r1, r33
|
||||
LD r31, r254, 24a, 24h
|
||||
ADDI64 r254, r254, 48d
|
||||
JALA r0, r31, 0a
|
||||
malloc:
|
||||
ADDI64 r254, r254, -32d
|
||||
ST r31, r254, 0a, 32h
|
||||
CP r32, r2
|
||||
CP r33, r3
|
||||
LRA r34, r0, :MALLOC_SYS_CALL
|
||||
LD r2, r34, 0a, 8h
|
||||
CP r3, r32
|
||||
CP r4, r33
|
||||
ECA
|
||||
LD r31, r254, 0a, 32h
|
||||
ADDI64 r254, r254, 32d
|
||||
JALA r0, r31, 0a
|
||||
new:
|
||||
ADDI64 r254, r254, -24d
|
||||
ST r31, r254, 0a, 24h
|
||||
CP r32, r1
|
||||
LI64 r33, 0d
|
||||
ST r33, r32, 0a, 8h
|
||||
LI64 r33, 0d
|
||||
ST r33, r32, 8a, 8h
|
||||
LI64 r33, 0d
|
||||
ST r33, r32, 16a, 8h
|
||||
LD r31, r254, 0a, 24h
|
||||
ADDI64 r254, r254, 24d
|
||||
JALA r0, r31, 0a
|
||||
push:
|
||||
ADDI64 r254, r254, -80d
|
||||
ST r31, r254, 0a, 80h
|
||||
CP r32, r2
|
||||
CP r33, r3
|
||||
LD r34, r32, 8a, 8h
|
||||
LD r35, r32, 16a, 8h
|
||||
JNE r34, r35, :0
|
||||
LD r35, r32, 16a, 8h
|
||||
LI64 r34, 0d
|
||||
JNE r35, r34, :1
|
||||
LI64 r34, 1d
|
||||
ST r34, r32, 16a, 8h
|
||||
JMP :2
|
||||
1: LD r34, r32, 16a, 8h
|
||||
MULI64 r34, r34, 2d
|
||||
ST r34, r32, 16a, 8h
|
||||
2: LD r34, r32, 16a, 8h
|
||||
MULI64 r34, r34, 8d
|
||||
CP r2, r34
|
||||
LI64 r3, 8d
|
||||
JAL r31, r0, :malloc
|
||||
CP r34, r1
|
||||
LI64 r35, 0d
|
||||
JNE r34, r35, :3
|
||||
LI64 r1, 0d
|
||||
JMP :4
|
||||
3: LD r35, r32, 0a, 8h
|
||||
CP r36, r34
|
||||
LD r37, r32, 0a, 8h
|
||||
LD r38, r32, 8a, 8h
|
||||
MULI64 r38, r38, 8d
|
||||
ADD64 r37, r37, r38
|
||||
7: JNE r35, r37, :5
|
||||
JMP :6
|
||||
5: CP r38, r36
|
||||
CP r39, r35
|
||||
LD r40, r39, 0a, 8h
|
||||
ST r40, r38, 0a, 8h
|
||||
ADDI64 r35, r35, 8d
|
||||
ADDI64 r36, r36, 8d
|
||||
JMP :7
|
||||
6: LD r38, r32, 8a, 8h
|
||||
LI64 r39, 0d
|
||||
JEQ r38, r39, :8
|
||||
LD r2, r32, 0a, 8h
|
||||
LD r39, r32, 8a, 8h
|
||||
MULI64 r39, r39, 8d
|
||||
CP r3, r39
|
||||
LI64 r4, 8d
|
||||
JAL r31, r0, :free
|
||||
8: ST r34, r32, 0a, 8h
|
||||
0: LD r39, r32, 0a, 8h
|
||||
LD r38, r32, 8a, 8h
|
||||
MULI64 r38, r38, 8d
|
||||
ADD64 r39, r39, r38
|
||||
CP r38, r39
|
||||
ST r33, r38, 0a, 8h
|
||||
LD r38, r32, 8a, 8h
|
||||
ADDI64 r38, r38, 1d
|
||||
ST r38, r32, 8a, 8h
|
||||
CP r1, r39
|
||||
4: LD r31, r254, 0a, 80h
|
||||
ADDI64 r254, r254, 80d
|
||||
JALA r0, r31, 0a
|
||||
code size: 1225
|
||||
ret: 69
|
||||
status: Ok(())
|
|
@ -1,16 +0,0 @@
|
|||
main:
|
||||
ADDI64 r254, r254, -32d
|
||||
ST r31, r254, 0a, 32h
|
||||
LRA r32, r0, :complex_global_var
|
||||
LRA r33, r0, :complex_global_var
|
||||
LD r34, r33, 0a, 8h
|
||||
ADDI64 r34, r34, 5d
|
||||
ST r34, r32, 0a, 8h
|
||||
LRA r32, r0, :complex_global_var
|
||||
LD r1, r32, 0a, 8h
|
||||
LD r31, r254, 0a, 32h
|
||||
ADDI64 r254, r254, 32d
|
||||
JALA r0, r31, 0a
|
||||
code size: 146
|
||||
ret: 55
|
||||
status: Ok(())
|
|
@ -1,31 +0,0 @@
|
|||
main:
|
||||
ADDI64 r254, r254, -56d
|
||||
ST r31, r254, 0a, 56h
|
||||
LI64 r32, 255d
|
||||
LI64 r33, 255d
|
||||
LI64 r34, 255d
|
||||
LI64 r35, 255d
|
||||
CP r36, r32
|
||||
CMPS r36, r36, r33
|
||||
CMPUI r36, r36, 0d
|
||||
NOT r36, r36
|
||||
CP r37, r34
|
||||
CMPS r37, r37, r33
|
||||
CMPUI r37, r37, 0d
|
||||
NOT r37, r37
|
||||
AND r36, r36, r37
|
||||
CP r37, r35
|
||||
CMPS r37, r37, r33
|
||||
CMPUI r37, r37, 0d
|
||||
NOT r37, r37
|
||||
AND r36, r36, r37
|
||||
JEQ r36, r0, :0
|
||||
LI64 r1, 0d
|
||||
JMP :1
|
||||
0: LI64 r1, 1d
|
||||
1: LD r31, r254, 0a, 56h
|
||||
ADDI64 r254, r254, 56d
|
||||
JALA r0, r31, 0a
|
||||
code size: 208
|
||||
ret: 0
|
||||
status: Ok(())
|
|
@ -1,25 +0,0 @@
|
|||
main:
|
||||
ADDI64 r254, r254, -160d
|
||||
ST r31, r254, 128a, 32h
|
||||
LI64 r32, 0d
|
||||
2: LI64 r33, 128d
|
||||
JLTS r32, r33, :0
|
||||
JMP :1
|
||||
0: ADDI64 r33, r254, 0d
|
||||
CP r34, r32
|
||||
ADD64 r33, r33, r34
|
||||
LI64 r34, 69d
|
||||
ST r34, r33, 0a, 1h
|
||||
ADDI64 r32, r32, 1d
|
||||
JMP :2
|
||||
1: ADDI64 r33, r254, 0d
|
||||
LI64 r34, 42d
|
||||
ADD64 r33, r33, r34
|
||||
CP r1, r0
|
||||
LD r1, r33, 0a, 1h
|
||||
LD r31, r254, 128a, 32h
|
||||
ADDI64 r254, r254, 160d
|
||||
JALA r0, r31, 0a
|
||||
code size: 195
|
||||
ret: 69
|
||||
status: Ok(())
|
|
@ -1,33 +0,0 @@
|
|||
fib:
|
||||
ADDI64 r254, r254, -32d
|
||||
ST r31, r254, 0a, 32h
|
||||
CP r32, r2
|
||||
LI64 r33, 2d
|
||||
JGTS r32, r33, :0
|
||||
LI64 r1, 1d
|
||||
JMP :1
|
||||
0: CP r33, r32
|
||||
ADDI64 r33, r33, -1d
|
||||
CP r2, r33
|
||||
JAL r31, r0, :fib
|
||||
CP r33, r1
|
||||
CP r34, r32
|
||||
ADDI64 r34, r34, -2d
|
||||
CP r2, r34
|
||||
JAL r31, r0, :fib
|
||||
CP r34, r1
|
||||
ADD64 r1, r33, r34
|
||||
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
|
||||
JALA r0, r31, 0a
|
||||
code size: 234
|
||||
ret: 55
|
||||
status: Ok(())
|
|
@ -1,13 +0,0 @@
|
|||
main:
|
||||
ADDI64 r254, r254, -24d
|
||||
ST r31, r254, 0a, 24h
|
||||
LI64 r33, 1d
|
||||
ADDI64 r33, r33, 2d
|
||||
ADDI64 r32, r33, 3d
|
||||
ADDI64 r1, r32, -6d
|
||||
LD r31, r254, 0a, 24h
|
||||
ADDI64 r254, r254, 24d
|
||||
JALA r0, r31, 0a
|
||||
code size: 110
|
||||
ret: 0
|
||||
status: Ok(())
|
|
@ -1,162 +0,0 @@
|
|||
example:
|
||||
ADDI64 r254, r254, -48d
|
||||
ST r31, r254, 0a, 48h
|
||||
LI64 r2, 3d
|
||||
LI64 r3, 4d
|
||||
ECA
|
||||
CP r33, r1
|
||||
LI64 r34, 0d
|
||||
LI64 r35, 0d
|
||||
CMPS r34, r34, r35
|
||||
CMPUI r34, r34, 0d
|
||||
LI64 r35, 1024d
|
||||
LI64 r36, 0d
|
||||
CMPS r35, r35, r36
|
||||
CMPUI r35, r35, 0d
|
||||
OR r34, r34, r35
|
||||
JEQ r34, r0, :0
|
||||
CP r34, r33
|
||||
LI64 r35, 1024d
|
||||
ADDI64 r35, r35, 0d
|
||||
ADDI64 r35, r35, 1d
|
||||
DIRS64 r0, r34, r34, r35
|
||||
ADDI64 r32, r34, 0d
|
||||
JMP :1
|
||||
0: CP r32, r33
|
||||
1: LI64 r2, 0d
|
||||
LI64 r3, 768d
|
||||
JAL r31, r0, :integer
|
||||
CP r33, r1
|
||||
CP r34, r32
|
||||
JMP :2
|
||||
2: LD r31, r254, 0a, 48h
|
||||
ADDI64 r254, r254, 48d
|
||||
JALA r0, r31, 0a
|
||||
integer:
|
||||
ADDI64 r254, r254, -56d
|
||||
ST r31, r254, 0a, 56h
|
||||
CP r32, r2
|
||||
CP r33, r3
|
||||
LI64 r2, 3d
|
||||
LI64 r3, 4d
|
||||
ECA
|
||||
CP r34, r1
|
||||
CP r35, r32
|
||||
LI64 r36, 0d
|
||||
CMPS r35, r35, r36
|
||||
CMPUI r35, r35, 0d
|
||||
CP r36, r33
|
||||
LI64 r37, 0d
|
||||
CMPS r36, r36, r37
|
||||
CMPUI r36, r36, 0d
|
||||
OR r35, r35, r36
|
||||
JEQ r35, r0, :0
|
||||
CP r35, r34
|
||||
CP r36, r33
|
||||
SUB64 r36, r36, r32
|
||||
ADDI64 r36, r36, 1d
|
||||
DIRS64 r0, r35, r35, r36
|
||||
ADD64 r1, r35, r32
|
||||
JMP :1
|
||||
0: CP r1, r34
|
||||
1: LD r31, r254, 0a, 56h
|
||||
ADDI64 r254, r254, 56d
|
||||
JALA r0, r31, 0a
|
||||
line:
|
||||
ADDI64 r254, r254, -80d
|
||||
ST r31, r254, 48a, 32h
|
||||
ST r2, r254, 0a, 16h
|
||||
ST r4, r254, 16a, 16h
|
||||
ST r6, r254, 32a, 16h
|
||||
CP r32, r8
|
||||
LI64 r33, 1d
|
||||
JEQ r33, r0, :0
|
||||
LD r33, r254, 0a, 8h
|
||||
LD r34, r254, 16a, 8h
|
||||
JGTS r33, r34, :1
|
||||
JMP :1
|
||||
1: JMP :2
|
||||
0: LD r34, r254, 8a, 8h
|
||||
LD r33, r254, 24a, 8h
|
||||
JGTS r34, r33, :2
|
||||
JMP :2
|
||||
2: LD r31, r254, 48a, 32h
|
||||
ADDI64 r254, r254, 80d
|
||||
JALA r0, r31, 0a
|
||||
main:
|
||||
ADDI64 r254, r254, -112d
|
||||
ST r31, r254, 96a, 16h
|
||||
LI64 r32, 0d
|
||||
ST r32, r254, 0a, 8h
|
||||
LI64 r32, 0d
|
||||
ST r32, r254, 8a, 8h
|
||||
LD r2, r254, 0a, 16h
|
||||
LI64 r32, 0d
|
||||
ST r32, r254, 16a, 8h
|
||||
LI64 r32, 0d
|
||||
ST r32, r254, 24a, 8h
|
||||
LD r4, r254, 16a, 16h
|
||||
LI64 r32, 0d
|
||||
ST r32, r254, 32a, 8h
|
||||
LI64 r32, 0d
|
||||
ST r32, r254, 40a, 8h
|
||||
LD r6, r254, 32a, 16h
|
||||
LI64 r8, 10d
|
||||
JAL r31, r0, :line
|
||||
LI64 r32, 0d
|
||||
ST r32, r254, 48a, 8h
|
||||
LI64 r32, 0d
|
||||
ST r32, r254, 56a, 8h
|
||||
LD r2, r254, 48a, 16h
|
||||
LI64 r32, 0d
|
||||
ST r32, r254, 64a, 8h
|
||||
LI64 r32, 0d
|
||||
ST r32, r254, 72a, 8h
|
||||
LD r4, r254, 64a, 16h
|
||||
LI64 r32, 0d
|
||||
ST r32, r254, 80a, 8h
|
||||
LI64 r32, 0d
|
||||
ST r32, r254, 88a, 8h
|
||||
LD r6, r254, 80a, 16h
|
||||
LI64 r8, 10d
|
||||
JAL r31, r0, :rect_line
|
||||
JAL r31, r0, :example
|
||||
LI64 r1, 0d
|
||||
LD r31, r254, 96a, 16h
|
||||
ADDI64 r254, r254, 112d
|
||||
JALA r0, r31, 0a
|
||||
rect_line:
|
||||
ADDI64 r254, r254, -112d
|
||||
ST r31, r254, 48a, 64h
|
||||
ST r2, r254, 0a, 16h
|
||||
ST r4, r254, 16a, 16h
|
||||
ST r6, r254, 32a, 16h
|
||||
CP r32, r8
|
||||
LI64 r33, 0d
|
||||
LI64 r34, 0d
|
||||
LI64 r35, 0d
|
||||
5: JNE r33, r32, :0
|
||||
JMP :1
|
||||
0: LD r34, r254, 8a, 8h
|
||||
LD r35, r254, 0a, 8h
|
||||
4: LD r36, r254, 8a, 8h
|
||||
LD r37, r254, 16a, 8h
|
||||
ADD64 r36, r36, r37
|
||||
JNE r34, r36, :2
|
||||
JMP :3
|
||||
2: LI64 r36, 1d
|
||||
LI64 r37, 10d
|
||||
ADD64 r36, r36, r37
|
||||
LI64 r37, 1d
|
||||
LI64 r38, 2d
|
||||
ADD64 r36, r37, r38
|
||||
ADDI64 r34, r34, 1d
|
||||
JMP :4
|
||||
3: ADDI64 r33, r33, 1d
|
||||
JMP :5
|
||||
1: LD r31, r254, 48a, 64h
|
||||
ADDI64 r254, r254, 112d
|
||||
JALA r0, r31, 0a
|
||||
code size: 1403
|
||||
ret: 0
|
||||
status: Ok(())
|
|
@ -1,18 +0,0 @@
|
|||
main:
|
||||
ADDI64 r254, r254, -32d
|
||||
ST r31, r254, 0a, 32h
|
||||
LI64 r32, 10d
|
||||
NEG r32, r32
|
||||
CP r33, r32
|
||||
LI64 r34, 8d
|
||||
ADDI64 r34, r34, -1d
|
||||
SRS64 r33, r33, r34
|
||||
CP r34, r32
|
||||
XOR r34, r34, r33
|
||||
SUB64 r1, r34, r33
|
||||
LD r31, r254, 0a, 32h
|
||||
ADDI64 r254, r254, 32d
|
||||
JALA r0, r31, 0a
|
||||
code size: 119
|
||||
ret: 10
|
||||
status: Ok(())
|
|
@ -1,30 +0,0 @@
|
|||
integer_range:
|
||||
ADDI64 r254, r254, -40d
|
||||
ST r31, r254, 0a, 40h
|
||||
CP r32, r2
|
||||
CP r33, r3
|
||||
LI64 r2, 3d
|
||||
LI64 r3, 4d
|
||||
ECA
|
||||
CP r34, r1
|
||||
CP r35, r33
|
||||
SUB64 r35, r35, r32
|
||||
ADDI64 r35, r35, 1d
|
||||
DIRU64 r0, r34, r34, r35
|
||||
ADD64 r1, r34, r32
|
||||
LD r31, r254, 0a, 40h
|
||||
ADDI64 r254, r254, 40d
|
||||
JALA r0, r31, 0a
|
||||
main:
|
||||
ADDI64 r254, r254, -16d
|
||||
ST r31, r254, 0a, 16h
|
||||
LI64 r2, 0d
|
||||
LI64 r3, 1000d
|
||||
JAL r31, r0, :integer_range
|
||||
CP r32, r1
|
||||
LD r31, r254, 0a, 16h
|
||||
ADDI64 r254, r254, 16d
|
||||
JALA r0, r31, 0a
|
||||
code size: 213
|
||||
ret: 42
|
||||
status: Ok(())
|
|
@ -1,30 +0,0 @@
|
|||
fib:
|
||||
ADDI64 r254, r254, -40d
|
||||
ST r31, r254, 0a, 40h
|
||||
CP r32, r2
|
||||
LI64 r33, 0d
|
||||
LI64 r34, 1d
|
||||
2: LI64 r35, 0d
|
||||
JNE r32, r35, :0
|
||||
JMP :1
|
||||
0: CP r35, r33
|
||||
ADD64 r35, r35, r34
|
||||
CP r33, r34
|
||||
CP r34, r35
|
||||
ADDI64 r32, r32, -1d
|
||||
JMP :2
|
||||
1: CP r1, r33
|
||||
LD r31, r254, 0a, 40h
|
||||
ADDI64 r254, r254, 40d
|
||||
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
|
||||
JALA r0, r31, 0a
|
||||
code size: 218
|
||||
ret: 55
|
||||
status: Ok(())
|
|
@ -1,47 +0,0 @@
|
|||
drop:
|
||||
ADDI64 r254, r254, -16d
|
||||
ST r31, r254, 0a, 16h
|
||||
CP r32, r2
|
||||
LD r31, r254, 0a, 16h
|
||||
ADDI64 r254, r254, 16d
|
||||
JALA r0, r31, 0a
|
||||
main:
|
||||
ADDI64 r254, r254, -48d
|
||||
ST r31, r254, 8a, 40h
|
||||
LI64 r32, 1d
|
||||
ST r32, r254, 0a, 8h
|
||||
ADDI64 r32, r254, 0d
|
||||
LI64 r33, 1000d
|
||||
CP r34, r32
|
||||
CP r35, r33
|
||||
MULI64 r35, r35, 8d
|
||||
ADD64 r34, r34, r35
|
||||
ADDI64 r32, r34, -16d
|
||||
CP r34, r33
|
||||
ADDI64 r34, r34, -2d
|
||||
CP r35, r34
|
||||
MULI64 r35, r35, 8d
|
||||
SUB64 r32, r32, r35
|
||||
CP r2, r32
|
||||
JAL r31, r0, :modify
|
||||
LD r2, r254, 0a, 8h
|
||||
JAL r31, r0, :drop
|
||||
CP r34, r32
|
||||
LD r35, r34, 0a, 8h
|
||||
ADDI64 r1, r35, -2d
|
||||
LD r31, r254, 8a, 40h
|
||||
ADDI64 r254, r254, 48d
|
||||
JALA r0, r31, 0a
|
||||
modify:
|
||||
ADDI64 r254, r254, -32d
|
||||
ST r31, r254, 0a, 32h
|
||||
CP r32, r2
|
||||
CP r33, r32
|
||||
LI64 r34, 2d
|
||||
ST r34, r33, 0a, 8h
|
||||
LD r31, r254, 0a, 32h
|
||||
ADDI64 r254, r254, 32d
|
||||
JALA r0, r31, 0a
|
||||
code size: 382
|
||||
ret: 0
|
||||
status: Ok(())
|
|
@ -1,61 +0,0 @@
|
|||
create_back_buffer:
|
||||
ADDI64 r254, r254, -40d
|
||||
ST r31, r254, 0a, 40h
|
||||
CP r32, r2
|
||||
LI64 r33, 255d
|
||||
JGTS r32, r33, :0
|
||||
CP r2, r32
|
||||
JAL r31, r0, :request_page
|
||||
JMP :1
|
||||
0: LI64 r2, 255d
|
||||
JAL r31, r0, :request_page
|
||||
CP r33, r1
|
||||
CP r34, r32
|
||||
ADDI64 r34, r34, -255d
|
||||
6: LI64 r35, 0d
|
||||
JGTS r34, r35, :2
|
||||
JMP :3
|
||||
2: LI64 r35, 255d
|
||||
JLTS r34, r35, :4
|
||||
LI64 r2, 255d
|
||||
JAL r31, r0, :request_page
|
||||
CP r35, r1
|
||||
JMP :5
|
||||
4: CP r2, r34
|
||||
JAL r31, r0, :request_page
|
||||
CP r35, r1
|
||||
5: ADDI64 r34, r34, -255d
|
||||
JMP :6
|
||||
3: CP r1, r33
|
||||
1: LD r31, r254, 0a, 40h
|
||||
ADDI64 r254, r254, 40d
|
||||
JALA r0, r31, 0a
|
||||
main:
|
||||
ADDI64 r254, r254, -16d
|
||||
ST r31, r254, 0a, 16h
|
||||
LI64 r2, 400d
|
||||
JAL r31, r0, :create_back_buffer
|
||||
CP r32, r1
|
||||
LD r31, r254, 0a, 16h
|
||||
ADDI64 r254, r254, 16d
|
||||
JALA r0, r31, 0a
|
||||
request_page:
|
||||
ADDI64 r254, r254, -40d
|
||||
ST r31, r254, 0a, 40h
|
||||
CP r32, r2
|
||||
LRA r33, r0, :"\0\u{1}xxxxxxxx\0"
|
||||
CP r34, r33
|
||||
ADDI64 r34, r34, 1d
|
||||
CP r35, r34
|
||||
ST r32, r35, 0a, 1h
|
||||
LI64 r2, 3d
|
||||
LI64 r3, 2d
|
||||
CP r4, r33
|
||||
LI64 r5, 12d
|
||||
ECA
|
||||
LD r31, r254, 0a, 40h
|
||||
ADDI64 r254, r254, 40d
|
||||
JALA r0, r31, 0a
|
||||
code size: 449
|
||||
ret: 42
|
||||
status: Ok(())
|
|
@ -1,16 +0,0 @@
|
|||
main:
|
||||
ADDI64 r254, r254, -8d
|
||||
ST r31, r254, 0a, 8h
|
||||
JAL r31, r0, :some_func
|
||||
LD r31, r254, 0a, 8h
|
||||
ADDI64 r254, r254, 8d
|
||||
JALA r0, r31, 0a
|
||||
some_func:
|
||||
ADDI64 r254, r254, -8d
|
||||
ST r31, r254, 0a, 8h
|
||||
LD r31, r254, 0a, 8h
|
||||
ADDI64 r254, r254, 8d
|
||||
JALA r0, r31, 0a
|
||||
code size: 133
|
||||
ret: 0
|
||||
status: Ok(())
|
|
@ -1,36 +0,0 @@
|
|||
main:
|
||||
ADDI64 r254, r254, -8d
|
||||
ST r31, r254, 0a, 8h
|
||||
LI64 r2, 1d
|
||||
JAL r31, r0, :sqrt
|
||||
LD r31, r254, 0a, 8h
|
||||
ADDI64 r254, r254, 8d
|
||||
JALA r0, r31, 0a
|
||||
sqrt:
|
||||
ADDI64 r254, r254, -56d
|
||||
ST r31, r254, 0a, 56h
|
||||
CP r32, r2
|
||||
LI64 r33, 0d
|
||||
LI64 r34, 0d
|
||||
LI64 r35, 32768d
|
||||
LI64 r36, 15d
|
||||
3: LI64 r37, 0d
|
||||
JNE r35, r37, :0
|
||||
JMP :1
|
||||
0: ADDI64 r36, r36, -1d
|
||||
CP r37, r34
|
||||
SLUI64 r37, r37, 1b
|
||||
ADD64 r33, r35, r37
|
||||
SLU64 r33, r33, r36
|
||||
JLTS r32, r33, :2
|
||||
ADD64 r34, r34, r35
|
||||
SUB64 r32, r32, r33
|
||||
2: SRUI64 r35, r35, 1b
|
||||
JMP :3
|
||||
1: CP r1, r34
|
||||
LD r31, r254, 0a, 56h
|
||||
ADDI64 r254, r254, 56d
|
||||
JALA r0, r31, 0a
|
||||
code size: 257
|
||||
ret: 1
|
||||
status: Ok(())
|
|
@ -1,130 +0,0 @@
|
|||
main:
|
||||
ADDI64 r254, r254, -160d
|
||||
ST r31, r254, 136a, 24h
|
||||
LI64 r32, 0d
|
||||
ST r32, r254, 0a, 1h
|
||||
LI64 r32, 0d
|
||||
ST r32, r254, 1a, 1h
|
||||
LI64 r32, 0d
|
||||
ST r32, r254, 2a, 1h
|
||||
LI64 r32, 0d
|
||||
ST r32, r254, 3a, 1h
|
||||
LI64 r32, 1d
|
||||
ST r32, r254, 4a, 1h
|
||||
LI64 r32, 1d
|
||||
ST r32, r254, 5a, 1h
|
||||
LI64 r32, 1d
|
||||
ST r32, r254, 6a, 1h
|
||||
LI64 r32, 1d
|
||||
ST r32, r254, 7a, 1h
|
||||
CP r32, r0
|
||||
LD r32, r254, 0a, 1h
|
||||
CP r33, r0
|
||||
LD r33, r254, 4a, 1h
|
||||
ADD8 r32, r32, r33
|
||||
ST r32, r254, 0a, 1h
|
||||
CP r32, r0
|
||||
LD r32, r254, 1a, 1h
|
||||
CP r33, r0
|
||||
LD r33, r254, 5a, 1h
|
||||
ADD8 r32, r32, r33
|
||||
ST r32, r254, 1a, 1h
|
||||
CP r32, r0
|
||||
LD r32, r254, 2a, 1h
|
||||
CP r33, r0
|
||||
LD r33, r254, 6a, 1h
|
||||
ADD8 r32, r32, r33
|
||||
ST r32, r254, 2a, 1h
|
||||
CP r32, r0
|
||||
LD r32, r254, 3a, 1h
|
||||
CP r33, r0
|
||||
LD r33, r254, 7a, 1h
|
||||
ADD8 r32, r32, r33
|
||||
ST r32, r254, 3a, 1h
|
||||
CP r32, r0
|
||||
LD r32, r254, 2a, 1h
|
||||
CP r33, r0
|
||||
LD r33, r254, 1a, 1h
|
||||
ADD8 r32, r32, r33
|
||||
CP r33, r0
|
||||
LD r33, r254, 0a, 1h
|
||||
ADD8 r32, r32, r33
|
||||
CP r33, r0
|
||||
LD r33, r254, 3a, 1h
|
||||
ADD8 r32, r32, r33
|
||||
LI64 r33, 4d
|
||||
JEQ r32, r33, :0
|
||||
LI64 r1, 1008d
|
||||
JMP :1
|
||||
0: LI64 r33, 1d
|
||||
ST r33, r254, 8a, 8h
|
||||
LI64 r33, 2d
|
||||
ST r33, r254, 16a, 8h
|
||||
LI64 r33, 3d
|
||||
ST r33, r254, 24a, 8h
|
||||
LI64 r33, 4d
|
||||
ST r33, r254, 32a, 8h
|
||||
LD r33, r254, 8a, 8h
|
||||
LD r32, r254, 24a, 8h
|
||||
ADD64 r33, r33, r32
|
||||
ST r33, r254, 40a, 8h
|
||||
LD r33, r254, 16a, 8h
|
||||
LD r32, r254, 32a, 8h
|
||||
ADD64 r33, r33, r32
|
||||
ST r33, r254, 48a, 8h
|
||||
LD r33, r254, 24a, 8h
|
||||
LD r32, r254, 8a, 8h
|
||||
SUB64 r33, r33, r32
|
||||
ST r33, r254, 56a, 8h
|
||||
LD r33, r254, 32a, 8h
|
||||
LD r32, r254, 16a, 8h
|
||||
SUB64 r33, r33, r32
|
||||
ST r33, r254, 64a, 8h
|
||||
LI64 r33, 0d
|
||||
ST r33, r254, 72a, 8h
|
||||
LI64 r33, 0d
|
||||
ST r33, r254, 80a, 8h
|
||||
LD r33, r254, 72a, 8h
|
||||
LD r32, r254, 24a, 8h
|
||||
SUB64 r33, r33, r32
|
||||
ST r33, r254, 88a, 8h
|
||||
LD r33, r254, 80a, 8h
|
||||
LD r32, r254, 32a, 8h
|
||||
SUB64 r33, r33, r32
|
||||
ST r33, r254, 96a, 8h
|
||||
ADDI64 r33, r254, 8d
|
||||
ADDI64 r32, r254, 104d
|
||||
BMC r33, r32, 16h
|
||||
LD r32, r254, 88a, 8h
|
||||
LD r33, r254, 40a, 8h
|
||||
ADD64 r32, r32, r33
|
||||
ST r32, r254, 88a, 8h
|
||||
LD r32, r254, 96a, 8h
|
||||
LD r33, r254, 48a, 8h
|
||||
ADD64 r32, r32, r33
|
||||
ST r32, r254, 96a, 8h
|
||||
LD r32, r254, 104a, 8h
|
||||
LD r33, r254, 56a, 8h
|
||||
ADD64 r32, r32, r33
|
||||
ST r32, r254, 104a, 8h
|
||||
LD r32, r254, 112a, 8h
|
||||
LD r33, r254, 64a, 8h
|
||||
ADD64 r32, r32, r33
|
||||
ST r32, r254, 112a, 8h
|
||||
LD r32, r254, 88a, 8h
|
||||
LD r33, r254, 104a, 8h
|
||||
ADD64 r32, r32, r33
|
||||
ST r32, r254, 120a, 8h
|
||||
LD r32, r254, 96a, 8h
|
||||
LD r33, r254, 112a, 8h
|
||||
ADD64 r32, r32, r33
|
||||
ST r32, r254, 128a, 8h
|
||||
LD r32, r254, 120a, 8h
|
||||
LD r33, r254, 128a, 8h
|
||||
ADD64 r1, r32, r33
|
||||
1: LD r31, r254, 136a, 24h
|
||||
ADDI64 r254, r254, 160d
|
||||
JALA r0, r31, 0a
|
||||
code size: 1264
|
||||
ret: 10
|
||||
status: Ok(())
|
|
@ -1,64 +0,0 @@
|
|||
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
|
||||
CP r2, r33
|
||||
JAL r31, r0, :fib
|
||||
CP r33, r1
|
||||
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
|
||||
JALA r0, r31, 0a
|
||||
fib_iter:
|
||||
ADDI64 r254, r254, -40d
|
||||
ST r31, r254, 0a, 40h
|
||||
CP r32, r2
|
||||
LI64 r33, 0d
|
||||
LI64 r34, 1d
|
||||
2: LI64 r35, 0d
|
||||
JNE r32, r35, :0
|
||||
JMP :1
|
||||
0: CP r35, r33
|
||||
ADD64 r35, r35, r34
|
||||
CP r33, r34
|
||||
CP r34, r35
|
||||
ADDI64 r32, r32, -1d
|
||||
JMP :2
|
||||
1: CP r1, r33
|
||||
LD r31, r254, 0a, 40h
|
||||
ADDI64 r254, r254, 40d
|
||||
JALA r0, r31, 0a
|
||||
main:
|
||||
ADDI64 r254, r254, -34d
|
||||
ST r31, r254, 2a, 32h
|
||||
LI64 r32, 10d
|
||||
ST r32, r254, 0a, 1h
|
||||
LI64 r32, 10d
|
||||
ST r32, r254, 1a, 1h
|
||||
CP r32, r0
|
||||
LD r32, r254, 1a, 1h
|
||||
CP r2, r0
|
||||
LD r2, r254, 0a, 1h
|
||||
JAL r31, r0, :fib
|
||||
CP r33, r1
|
||||
CP r2, r32
|
||||
JAL r31, r0, :fib_iter
|
||||
CP r34, r1
|
||||
SUB64 r1, r33, r34
|
||||
LD r31, r254, 2a, 32h
|
||||
ADDI64 r254, r254, 34d
|
||||
JALA r0, r31, 0a
|
||||
code size: 449
|
||||
ret: 0
|
||||
status: Ok(())
|
|
@ -1,39 +0,0 @@
|
|||
foo:
|
||||
ADDI64 r254, r254, -32d
|
||||
ST r31, r254, 16a, 16h
|
||||
LI64 r32, 3d
|
||||
ST r32, r254, 0a, 8h
|
||||
LI64 r32, 2d
|
||||
ST r32, r254, 8a, 4h
|
||||
LI64 r32, 2d
|
||||
ST r32, r254, 12a, 4h
|
||||
LD r1, r254, 0a, 16h
|
||||
LD r31, r254, 16a, 16h
|
||||
ADDI64 r254, r254, 32d
|
||||
JALA r0, r31, 0a
|
||||
main:
|
||||
ADDI64 r254, r254, -72d
|
||||
ST r31, r254, 48a, 24h
|
||||
LI64 r32, 7d
|
||||
JAL r31, r0, :foo
|
||||
ST r1, r254, 0a, 16h
|
||||
LD r33, r254, 0a, 8h
|
||||
SUB64 r32, r32, r33
|
||||
JAL r31, r0, :foo
|
||||
ST r1, r254, 16a, 16h
|
||||
CP r33, r0
|
||||
LD r33, r254, 24a, 4h
|
||||
SXT32 r33, r33
|
||||
SUB64 r32, r32, r33
|
||||
JAL r31, r0, :foo
|
||||
ST r1, r254, 32a, 16h
|
||||
CP r33, r0
|
||||
LD r33, r254, 44a, 4h
|
||||
SXT32 r33, r33
|
||||
SUB64 r1, r32, r33
|
||||
LD r31, r254, 48a, 24h
|
||||
ADDI64 r254, r254, 72d
|
||||
JALA r0, r31, 0a
|
||||
code size: 341
|
||||
ret: 0
|
||||
status: Ok(())
|
|
@ -1,52 +0,0 @@
|
|||
main:
|
||||
ADDI64 r254, r254, -72d
|
||||
ST r31, r254, 48a, 24h
|
||||
LI64 r32, 3d
|
||||
LI64 r33, 3d
|
||||
JEQ r32, r33, :0
|
||||
LI64 r1, 9001d
|
||||
JMP :1
|
||||
0: LI64 r33, 4d
|
||||
ST r33, r254, 0a, 8h
|
||||
LI64 r33, 1d
|
||||
ST r33, r254, 8a, 8h
|
||||
LI64 r33, 3d
|
||||
ST r33, r254, 16a, 8h
|
||||
ADDI64 r2, r254, 0d
|
||||
ADDI64 r1, r254, 24d
|
||||
JAL r31, r0, :odher_pass
|
||||
LD r33, r254, 40a, 8h
|
||||
LI64 r32, 3d
|
||||
JNE r33, r32, :2
|
||||
ADDI64 r32, r254, 24d
|
||||
CP r2, r32
|
||||
JAL r31, r0, :pass
|
||||
JMP :1
|
||||
2: LI64 r1, 0d
|
||||
1: LD r31, r254, 48a, 24h
|
||||
ADDI64 r254, r254, 72d
|
||||
JALA r0, r31, 0a
|
||||
odher_pass:
|
||||
ADDI64 r254, r254, -40d
|
||||
ST r31, r254, 0a, 40h
|
||||
CP r32, r2
|
||||
CP r33, r1
|
||||
CP r34, r32
|
||||
CP r35, r33
|
||||
BMC r34, r35, 24h
|
||||
LD r31, r254, 0a, 40h
|
||||
ADDI64 r254, r254, 40d
|
||||
JALA r0, r31, 0a
|
||||
pass:
|
||||
ADDI64 r254, r254, -32d
|
||||
ST r31, r254, 0a, 32h
|
||||
CP r32, r2
|
||||
LD r33, r32, 0a, 8h
|
||||
LD r34, r32, 8a, 8h
|
||||
SUB64 r1, r33, r34
|
||||
LD r31, r254, 0a, 32h
|
||||
ADDI64 r254, r254, 32d
|
||||
JALA r0, r31, 0a
|
||||
code size: 437
|
||||
ret: 3
|
||||
status: Ok(())
|
|
@ -1,38 +0,0 @@
|
|||
main:
|
||||
ADDI64 r254, r254, -10272d
|
||||
ST r31, r254, 10240a, 32h
|
||||
LI64 r32, 0d
|
||||
2: LI64 r33, 1024d
|
||||
JLTS r32, r33, :0
|
||||
JMP :1
|
||||
0: ADDI64 r33, r254, 0d
|
||||
CP r34, r32
|
||||
ADD64 r33, r33, r34
|
||||
LI64 r34, 64d
|
||||
ST r34, r33, 0a, 1h
|
||||
ADDI64 r32, r32, 1d
|
||||
JMP :2
|
||||
1: LI64 r32, 1d
|
||||
5: LI64 r33, 10d
|
||||
JLTS r32, r33, :3
|
||||
JMP :4
|
||||
3: ADDI64 r33, r254, 0d
|
||||
CP r34, r32
|
||||
MULI64 r34, r34, 1024d
|
||||
ADD64 r33, r33, r34
|
||||
ADDI64 r34, r254, 0d
|
||||
BMC r34, r33, 1024h
|
||||
ADDI64 r32, r32, 1d
|
||||
JMP :5
|
||||
4: LI64 r33, 1024d
|
||||
MULI64 r33, r33, 2d
|
||||
ADDI64 r34, r254, 0d
|
||||
ADD64 r34, r34, r33
|
||||
CP r1, r0
|
||||
LD r1, r34, 0a, 1h
|
||||
LD r31, r254, 10240a, 32h
|
||||
ADDI64 r254, r254, 10272d
|
||||
JALA r0, r31, 0a
|
||||
code size: 297
|
||||
ret: 64
|
||||
status: Ok(())
|
|
@ -1,13 +0,0 @@
|
|||
main:
|
||||
ADDI64 r254, r254, -24d
|
||||
ST r31, r254, 0a, 24h
|
||||
LI64 r32, 1d
|
||||
LI64 r33, 2d
|
||||
ADDI64 r32, r32, 1d
|
||||
SUB64 r1, r32, r33
|
||||
LD r31, r254, 0a, 24h
|
||||
ADDI64 r254, r254, 24d
|
||||
JALA r0, r31, 0a
|
||||
code size: 102
|
||||
ret: 0
|
||||
status: Ok(())
|
|
@ -1,46 +0,0 @@
|
|||
main:
|
||||
ADDI64 r254, r254, -56d
|
||||
ST r31, r254, 24a, 32h
|
||||
CP r32, r3
|
||||
CP r33, r4
|
||||
JAL r31, r0, :small_struct
|
||||
CP r34, r1
|
||||
LI64 r34, 0d
|
||||
ST r34, r254, 0a, 1h
|
||||
LI64 r34, 0d
|
||||
ST r34, r254, 1a, 1h
|
||||
LI64 r34, 0d
|
||||
ST r34, r254, 2a, 1h
|
||||
LI64 r34, 0d
|
||||
ST r34, r254, 3a, 1h
|
||||
LI64 r34, 0d
|
||||
ST r34, r254, 4a, 1h
|
||||
LI64 r34, 0d
|
||||
ST r34, r254, 5a, 1h
|
||||
LI64 r34, 0d
|
||||
ST r34, r254, 6a, 1h
|
||||
LI64 r34, 0d
|
||||
ST r34, r254, 7a, 1h
|
||||
LD r34, r254, 0a, 8h
|
||||
ST r34, r254, 8a, 8h
|
||||
LD r34, r254, 0a, 8h
|
||||
ST r34, r254, 16a, 8h
|
||||
LD r1, r254, 8a, 16h
|
||||
LD r31, r254, 24a, 32h
|
||||
ADDI64 r254, r254, 56d
|
||||
JALA r0, r31, 0a
|
||||
small_struct:
|
||||
ADDI64 r254, r254, -20d
|
||||
ST r31, r254, 4a, 16h
|
||||
LI64 r32, 0d
|
||||
ST r32, r254, 0a, 2h
|
||||
LI64 r32, 0d
|
||||
ST r32, r254, 2a, 2h
|
||||
CP r1, r0
|
||||
LD r1, r254, 0a, 4h
|
||||
LD r31, r254, 4a, 16h
|
||||
ADDI64 r254, r254, 20d
|
||||
JALA r0, r31, 0a
|
||||
code size: 453
|
||||
ret: 0
|
||||
status: Ok(())
|
|
@ -1,26 +0,0 @@
|
|||
inl:
|
||||
ADDI64 r254, r254, -16d
|
||||
ST r31, r254, 0a, 16h
|
||||
LRA r32, r0, :"luhahah\0"
|
||||
LD r31, r254, 0a, 16h
|
||||
ADDI64 r254, r254, 16d
|
||||
JALA r0, r31, 0a
|
||||
main:
|
||||
ADDI64 r254, r254, -8d
|
||||
ST r31, r254, 0a, 8h
|
||||
JAL r31, r0, :outl
|
||||
JAL r31, r0, :inl
|
||||
LD r31, r254, 0a, 8h
|
||||
ADDI64 r254, r254, 8d
|
||||
JALA r0, r31, 0a
|
||||
outl:
|
||||
ADDI64 r254, r254, -24d
|
||||
ST r31, r254, 0a, 24h
|
||||
LRA r32, r0, :"whahaha\0"
|
||||
LI64 r33, 0d
|
||||
LD r31, r254, 0a, 24h
|
||||
ADDI64 r254, r254, 24d
|
||||
JALA r0, r31, 0a
|
||||
code size: 239
|
||||
ret: 0
|
||||
status: Ok(())
|
Loading…
Reference in a new issue