1
0
Fork 0
forked from koniifer/ableos

updating tests

This commit is contained in:
mlokr 2024-09-13 18:23:00 +02:00
parent 4755cb1ff4
commit 87c8f48c18
11 changed files with 37 additions and 38 deletions

View file

@ -1,12 +1,11 @@
main:
ADDI64 r254, r254, -24d
ST r31, r254, 0a, 24h
LRA r32, r0, :abඞ
56789
LRA r32, r0, :"abඞ\n\r\t56789\0"
CP r2, r32
JAL r31, r0, :str_len
CP r32, r1
LRA r33, r0, :fff
LRA r33, r0, :"fff\0"
CP r2, r33
JAL r31, r0, :str_len
CP r33, r1

View file

@ -6,6 +6,6 @@ main:
LD r31, r254, 0a, 16h
ADDI64 r254, r254, 16d
JALA r0, r31, 0a
code size: 239
code size: 95
ret: 50
status: Ok(())

View file

@ -22,6 +22,6 @@ main:
ADDI64 r254, r254, 80d
JALA r0, r31, 0a
ev: Ecall
code size: 234
code size: 230
ret: 0
status: Ok(())

View file

@ -32,6 +32,19 @@ deinit:
LD r31, r254, 0a, 24h
ADDI64 r254, r254, 24d
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:
ADDI64 r254, r254, -40d
ST r31, r254, 0a, 40h
@ -124,19 +137,6 @@ malloc:
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
code size: 1332
code size: 1201
ret: 69
status: Ok(())

View file

@ -11,6 +11,6 @@ main:
LD r31, r254, 0a, 32h
ADDI64 r254, r254, 32d
JALA r0, r31, 0a
code size: 299
code size: 146
ret: 55
status: Ok(())

View file

@ -156,6 +156,6 @@ line:
2: LD r31, r254, 48a, 32h
ADDI64 r254, r254, 80d
JALA r0, r31, 0a
code size: 1416
code size: 1400
ret: 0
status: Ok(())

View file

@ -24,6 +24,6 @@ integer_range:
LD r31, r254, 0a, 32h
ADDI64 r254, r254, 32d
JALA r0, r31, 0a
code size: 214
code size: 210
ret: 42
status: Ok(())

View file

@ -42,7 +42,7 @@ request_page:
ADDI64 r254, r254, -32d
ST r31, r254, 0a, 32h
CP r32, r2
LRA r33, r0, :"\0\u{1}xxxxxxxx"
LRA r33, r0, :"\0\u{1}xxxxxxxx\0"
CP r34, r33
ADDI64 r34, r34, 1d
ST r32, r34, 0a, 1h

View file

@ -60,6 +60,6 @@ fib:
1: LD r31, r254, 0a, 32h
ADDI64 r254, r254, 32d
JALA r0, r31, 0a
code size: 464
code size: 452
ret: 0
status: Ok(())

View file

@ -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:
ADDI64 r254, r254, -40d
ST r31, r254, 16a, 24h
@ -32,6 +21,17 @@ main:
LD r31, r254, 16a, 24h
ADDI64 r254, r254, 40d
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
status: Ok(())

View file

@ -9,14 +9,14 @@ main:
inl:
ADDI64 r254, r254, -16d
ST r31, r254, 0a, 16h
LRA r32, r0, :luhahah
LRA r32, r0, :"luhahah\0"
LD r31, r254, 0a, 16h
ADDI64 r254, r254, 16d
JALA r0, r31, 0a
outl:
ADDI64 r254, r254, -16d
ST r31, r254, 0a, 16h
LRA r32, r0, :whahaha
LRA r32, r0, :"whahaha\0"
LD r31, r254, 0a, 16h
ADDI64 r254, r254, 16d
JALA r0, r31, 0a