forked from AbleOS/holey-bytes
cleaning up tests
This commit is contained in:
parent
3c12c0e288
commit
2c2f0c048b
|
@ -776,7 +776,7 @@ sqrt := fn(x: uint): uint {
|
||||||
}
|
}
|
||||||
```
|
```
|
||||||
|
|
||||||
#### structs_in_registers
|
#### struct_in_register
|
||||||
```hb
|
```hb
|
||||||
ColorBGRA := struct {b: u8, g: u8, r: u8, a: u8}
|
ColorBGRA := struct {b: u8, g: u8, r: u8, a: u8}
|
||||||
MAGENTA := ColorBGRA.{b: 205, g: 0, r: 205, a: 255}
|
MAGENTA := ColorBGRA.{b: 205, g: 0, r: 205, a: 255}
|
||||||
|
|
|
@ -3684,7 +3684,7 @@ mod tests {
|
||||||
different_types;
|
different_types;
|
||||||
struct_return_from_module_function;
|
struct_return_from_module_function;
|
||||||
sort_something_viredly;
|
sort_something_viredly;
|
||||||
//structs_in_registers;
|
struct_in_register;
|
||||||
comptime_function_from_another_file;
|
comptime_function_from_another_file;
|
||||||
inline_test;
|
inline_test;
|
||||||
inlined_generic_functions;
|
inlined_generic_functions;
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
main:
|
main:
|
||||||
ADDI64 r254, r254, -36d
|
ADDI64 r254, r254, -36d
|
||||||
ST r31, r254, 28a, 8h
|
ST r31, r254, 28a, 8h
|
||||||
LI8 r1, 0b
|
LI8 r2, 0b
|
||||||
ST r1, r254, 0a, 1h
|
ST r2, r254, 0a, 1h
|
||||||
ST r1, r254, 1a, 1h
|
ST r2, r254, 1a, 1h
|
||||||
LI8 r5, 255b
|
LI16 r4, 511h
|
||||||
ST r5, r254, 2a, 1h
|
ST r4, r254, 2a, 1h
|
||||||
LI8 r8, 1b
|
LI16 r8, 1h
|
||||||
ST r8, r254, 3a, 1h
|
ST r8, r254, 3a, 1h
|
||||||
LI64 r11, 1d
|
LI64 r11, 1d
|
||||||
ADDI64 r2, r254, 4d
|
ADDI64 r2, r254, 4d
|
||||||
|
@ -31,6 +31,6 @@ pass:
|
||||||
LD r1, r10, 0a, 8h
|
LD r1, r10, 0a, 8h
|
||||||
ADD64 r1, r1, r9
|
ADD64 r1, r1, r9
|
||||||
JALA r0, r31, 0a
|
JALA r0, r31, 0a
|
||||||
code size: 316
|
code size: 318
|
||||||
ret: 8
|
ret: 8
|
||||||
status: Ok(())
|
status: Ok(())
|
||||||
|
|
|
@ -16,15 +16,14 @@ set:
|
||||||
ADDI64 r254, r254, -25d
|
ADDI64 r254, r254, -25d
|
||||||
LI8 r7, 5b
|
LI8 r7, 5b
|
||||||
ST r7, r254, 0a, 1h
|
ST r7, r254, 0a, 1h
|
||||||
ANDI r10, r4, 4294967295d
|
ST r4, r254, 1a, 4h
|
||||||
ST r10, r254, 1a, 4h
|
LI64 r11, 8d
|
||||||
LI32 r1, 8w
|
ST r11, r254, 5a, 4h
|
||||||
ST r1, r254, 5a, 4h
|
|
||||||
ST r2, r254, 9a, 8h
|
ST r2, r254, 9a, 8h
|
||||||
ST r3, r254, 17a, 8h
|
ST r3, r254, 17a, 8h
|
||||||
LD r1, r254, 1a, 4h
|
LD r1, r254, 1a, 4h
|
||||||
ADDI64 r254, r254, 25d
|
ADDI64 r254, r254, 25d
|
||||||
JALA r0, r31, 0a
|
JALA r0, r31, 0a
|
||||||
code size: 284
|
code size: 277
|
||||||
ret: 1024
|
ret: 1024
|
||||||
status: Ok(())
|
status: Ok(())
|
||||||
|
|
|
@ -3,7 +3,6 @@ create_back_buffer:
|
||||||
ST r31, r254, 0a, 48h
|
ST r31, r254, 0a, 48h
|
||||||
LI64 r32, 255d
|
LI64 r32, 255d
|
||||||
JGTS r2, r32, :0
|
JGTS r2, r32, :0
|
||||||
AND r2, r2, r32
|
|
||||||
JAL r31, r0, :request_page
|
JAL r31, r0, :request_page
|
||||||
JMP :1
|
JMP :1
|
||||||
0: CP r33, r2
|
0: CP r33, r2
|
||||||
|
@ -21,7 +20,7 @@ create_back_buffer:
|
||||||
CP r2, r34
|
CP r2, r34
|
||||||
JAL r31, r0, :request_page
|
JAL r31, r0, :request_page
|
||||||
JMP :4
|
JMP :4
|
||||||
3: AND r2, r33, r32
|
3: CP r2, r33
|
||||||
JAL r31, r0, :request_page
|
JAL r31, r0, :request_page
|
||||||
4: SUB64 r33, r33, r32
|
4: SUB64 r33, r33, r32
|
||||||
JMP :5
|
JMP :5
|
||||||
|
@ -44,6 +43,6 @@ request_page:
|
||||||
LI64 r2, 3d
|
LI64 r2, 3d
|
||||||
ECA
|
ECA
|
||||||
JALA r0, r31, 0a
|
JALA r0, r31, 0a
|
||||||
code size: 336
|
code size: 331
|
||||||
ret: 42
|
ret: 42
|
||||||
status: Ok(())
|
status: Ok(())
|
||||||
|
|
|
@ -1,7 +1,6 @@
|
||||||
main:
|
main:
|
||||||
LI32 r1, 1w
|
LI64 r1, 1d
|
||||||
ANDI r1, r1, 4294967295d
|
|
||||||
JALA r0, r31, 0a
|
JALA r0, r31, 0a
|
||||||
code size: 36
|
code size: 29
|
||||||
ret: 1
|
ret: 1
|
||||||
status: Ok(())
|
status: Ok(())
|
||||||
|
|
|
@ -33,22 +33,22 @@ fib_iter:
|
||||||
JMP :2
|
JMP :2
|
||||||
1: JALA r0, r31, 0a
|
1: JALA r0, r31, 0a
|
||||||
main:
|
main:
|
||||||
ADDI64 r254, r254, -26d
|
ADDI64 r254, r254, -18d
|
||||||
ST r31, r254, 2a, 24h
|
ST r31, r254, 2a, 16h
|
||||||
LI8 r32, 10b
|
LI8 r1, 10b
|
||||||
ST r32, r254, 0a, 1h
|
ST r1, r254, 0a, 1h
|
||||||
ST r32, r254, 1a, 1h
|
ST r1, r254, 1a, 1h
|
||||||
LD r5, r254, 0a, 1h
|
LD r5, r254, 0a, 1h
|
||||||
ANDI r2, r5, 255d
|
ANDI r2, r5, 255d
|
||||||
JAL r31, r0, :fib
|
JAL r31, r0, :fib
|
||||||
CP r33, r1
|
CP r32, r1
|
||||||
ANDI r2, r32, 255d
|
LI64 r2, 10d
|
||||||
JAL r31, r0, :fib_iter
|
JAL r31, r0, :fib_iter
|
||||||
CP r4, r33
|
CP r4, r32
|
||||||
SUB64 r1, r4, r1
|
SUB64 r1, r4, r1
|
||||||
LD r31, r254, 2a, 24h
|
LD r31, r254, 2a, 16h
|
||||||
ADDI64 r254, r254, 26d
|
ADDI64 r254, r254, 18d
|
||||||
JALA r0, r31, 0a
|
JALA r0, r31, 0a
|
||||||
code size: 354
|
code size: 353
|
||||||
ret: 0
|
ret: 0
|
||||||
status: Ok(())
|
status: Ok(())
|
||||||
|
|
Loading…
Reference in a new issue