forked from koniifer/ableos
updating tests
This commit is contained in:
parent
4755cb1ff4
commit
87c8f48c18
|
@ -1,12 +1,11 @@
|
||||||
main:
|
main:
|
||||||
ADDI64 r254, r254, -24d
|
ADDI64 r254, r254, -24d
|
||||||
ST r31, r254, 0a, 24h
|
ST r31, r254, 0a, 24h
|
||||||
LRA r32, r0, :abඞ
|
LRA r32, r0, :"abඞ\n\r\t56789\0"
|
||||||
56789
|
|
||||||
CP r2, r32
|
CP r2, r32
|
||||||
JAL r31, r0, :str_len
|
JAL r31, r0, :str_len
|
||||||
CP r32, r1
|
CP r32, r1
|
||||||
LRA r33, r0, :fff
|
LRA r33, r0, :"fff\0"
|
||||||
CP r2, r33
|
CP r2, r33
|
||||||
JAL r31, r0, :str_len
|
JAL r31, r0, :str_len
|
||||||
CP r33, r1
|
CP r33, r1
|
||||||
|
|
|
@ -6,6 +6,6 @@ main:
|
||||||
LD r31, r254, 0a, 16h
|
LD r31, r254, 0a, 16h
|
||||||
ADDI64 r254, r254, 16d
|
ADDI64 r254, r254, 16d
|
||||||
JALA r0, r31, 0a
|
JALA r0, r31, 0a
|
||||||
code size: 239
|
code size: 95
|
||||||
ret: 50
|
ret: 50
|
||||||
status: Ok(())
|
status: Ok(())
|
||||||
|
|
|
@ -22,6 +22,6 @@ main:
|
||||||
ADDI64 r254, r254, 80d
|
ADDI64 r254, r254, 80d
|
||||||
JALA r0, r31, 0a
|
JALA r0, r31, 0a
|
||||||
ev: Ecall
|
ev: Ecall
|
||||||
code size: 234
|
code size: 230
|
||||||
ret: 0
|
ret: 0
|
||||||
status: Ok(())
|
status: Ok(())
|
||||||
|
|
|
@ -32,6 +32,19 @@ deinit:
|
||||||
LD r31, r254, 0a, 24h
|
LD r31, r254, 0a, 24h
|
||||||
ADDI64 r254, r254, 24d
|
ADDI64 r254, r254, 24d
|
||||||
JALA r0, r31, 0a
|
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
|
||||||
free:
|
free:
|
||||||
ADDI64 r254, r254, -40d
|
ADDI64 r254, r254, -40d
|
||||||
ST r31, r254, 0a, 40h
|
ST r31, r254, 0a, 40h
|
||||||
|
@ -124,19 +137,6 @@ malloc:
|
||||||
LD r31, r254, 0a, 32h
|
LD r31, r254, 0a, 32h
|
||||||
ADDI64 r254, r254, 32d
|
ADDI64 r254, r254, 32d
|
||||||
JALA r0, r31, 0a
|
JALA r0, r31, 0a
|
||||||
new:
|
code size: 1201
|
||||||
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
|
|
||||||
code size: 1332
|
|
||||||
ret: 69
|
ret: 69
|
||||||
status: Ok(())
|
status: Ok(())
|
||||||
|
|
|
@ -11,6 +11,6 @@ main:
|
||||||
LD r31, r254, 0a, 32h
|
LD r31, r254, 0a, 32h
|
||||||
ADDI64 r254, r254, 32d
|
ADDI64 r254, r254, 32d
|
||||||
JALA r0, r31, 0a
|
JALA r0, r31, 0a
|
||||||
code size: 299
|
code size: 146
|
||||||
ret: 55
|
ret: 55
|
||||||
status: Ok(())
|
status: Ok(())
|
||||||
|
|
|
@ -156,6 +156,6 @@ line:
|
||||||
2: LD r31, r254, 48a, 32h
|
2: LD r31, r254, 48a, 32h
|
||||||
ADDI64 r254, r254, 80d
|
ADDI64 r254, r254, 80d
|
||||||
JALA r0, r31, 0a
|
JALA r0, r31, 0a
|
||||||
code size: 1416
|
code size: 1400
|
||||||
ret: 0
|
ret: 0
|
||||||
status: Ok(())
|
status: Ok(())
|
||||||
|
|
|
@ -24,6 +24,6 @@ integer_range:
|
||||||
LD r31, r254, 0a, 32h
|
LD r31, r254, 0a, 32h
|
||||||
ADDI64 r254, r254, 32d
|
ADDI64 r254, r254, 32d
|
||||||
JALA r0, r31, 0a
|
JALA r0, r31, 0a
|
||||||
code size: 214
|
code size: 210
|
||||||
ret: 42
|
ret: 42
|
||||||
status: Ok(())
|
status: Ok(())
|
||||||
|
|
|
@ -42,7 +42,7 @@ request_page:
|
||||||
ADDI64 r254, r254, -32d
|
ADDI64 r254, r254, -32d
|
||||||
ST r31, r254, 0a, 32h
|
ST r31, r254, 0a, 32h
|
||||||
CP r32, r2
|
CP r32, r2
|
||||||
LRA r33, r0, :"\0\u{1}xxxxxxxx"
|
LRA r33, r0, :"\0\u{1}xxxxxxxx\0"
|
||||||
CP r34, r33
|
CP r34, r33
|
||||||
ADDI64 r34, r34, 1d
|
ADDI64 r34, r34, 1d
|
||||||
ST r32, r34, 0a, 1h
|
ST r32, r34, 0a, 1h
|
||||||
|
|
|
@ -60,6 +60,6 @@ fib:
|
||||||
1: LD r31, r254, 0a, 32h
|
1: LD r31, r254, 0a, 32h
|
||||||
ADDI64 r254, r254, 32d
|
ADDI64 r254, r254, 32d
|
||||||
JALA r0, r31, 0a
|
JALA r0, r31, 0a
|
||||||
code size: 464
|
code size: 452
|
||||||
ret: 0
|
ret: 0
|
||||||
status: Ok(())
|
status: Ok(())
|
||||||
|
|
|
@ -1,14 +1,3 @@
|
||||||
foo:
|
|
||||||
ADDI64 r254, r254, -8d
|
|
||||||
ST r31, r254, 0a, 8h
|
|
||||||
LI64 r1, 3d
|
|
||||||
ANDI r2, r2, -4294967296d
|
|
||||||
ORI r2, r2, 2d
|
|
||||||
ANDI r2, r2, 4294967295d
|
|
||||||
ORI r2, r2, 8589934592d
|
|
||||||
LD r31, r254, 0a, 8h
|
|
||||||
ADDI64 r254, r254, 8d
|
|
||||||
JALA r0, r31, 0a
|
|
||||||
main:
|
main:
|
||||||
ADDI64 r254, r254, -40d
|
ADDI64 r254, r254, -40d
|
||||||
ST r31, r254, 16a, 24h
|
ST r31, r254, 16a, 24h
|
||||||
|
@ -32,6 +21,17 @@ main:
|
||||||
LD r31, r254, 16a, 24h
|
LD r31, r254, 16a, 24h
|
||||||
ADDI64 r254, r254, 40d
|
ADDI64 r254, r254, 40d
|
||||||
JALA r0, r31, 0a
|
JALA r0, r31, 0a
|
||||||
code size: 317
|
foo:
|
||||||
|
ADDI64 r254, r254, -8d
|
||||||
|
ST r31, r254, 0a, 8h
|
||||||
|
LI64 r1, 3d
|
||||||
|
ANDI r2, r2, -4294967296d
|
||||||
|
ORI r2, r2, 2d
|
||||||
|
ANDI r2, r2, 4294967295d
|
||||||
|
ORI r2, r2, 8589934592d
|
||||||
|
LD r31, r254, 0a, 8h
|
||||||
|
ADDI64 r254, r254, 8d
|
||||||
|
JALA r0, r31, 0a
|
||||||
|
code size: 313
|
||||||
ret: 0
|
ret: 0
|
||||||
status: Ok(())
|
status: Ok(())
|
||||||
|
|
|
@ -9,14 +9,14 @@ main:
|
||||||
inl:
|
inl:
|
||||||
ADDI64 r254, r254, -16d
|
ADDI64 r254, r254, -16d
|
||||||
ST r31, r254, 0a, 16h
|
ST r31, r254, 0a, 16h
|
||||||
LRA r32, r0, :luhahah
|
LRA r32, r0, :"luhahah\0"
|
||||||
LD r31, r254, 0a, 16h
|
LD r31, r254, 0a, 16h
|
||||||
ADDI64 r254, r254, 16d
|
ADDI64 r254, r254, 16d
|
||||||
JALA r0, r31, 0a
|
JALA r0, r31, 0a
|
||||||
outl:
|
outl:
|
||||||
ADDI64 r254, r254, -16d
|
ADDI64 r254, r254, -16d
|
||||||
ST r31, r254, 0a, 16h
|
ST r31, r254, 0a, 16h
|
||||||
LRA r32, r0, :whahaha
|
LRA r32, r0, :"whahaha\0"
|
||||||
LD r31, r254, 0a, 16h
|
LD r31, r254, 0a, 16h
|
||||||
ADDI64 r254, r254, 16d
|
ADDI64 r254, r254, 16d
|
||||||
JALA r0, r31, 0a
|
JALA r0, r31, 0a
|
||||||
|
|
Loading…
Reference in a new issue