mirror of
https://github.com/Noratrieb/rustv32i.git
synced 2026-01-15 22:05:01 +01:00
add more tests
This commit is contained in:
parent
0af012d43a
commit
72f74c972d
7 changed files with 123 additions and 31 deletions
21
tests/helper.S
Normal file
21
tests/helper.S
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
.macro START_TEST
|
||||
.section .text
|
||||
.globl _start
|
||||
_start:
|
||||
.endm
|
||||
|
||||
.macro ASSERT_EQ actual expected
|
||||
li t6, \expected
|
||||
bne \actual, t6, fail
|
||||
.endm
|
||||
|
||||
.macro PASS
|
||||
li a7, -1
|
||||
li a0, 1
|
||||
ecall
|
||||
.endm
|
||||
|
||||
fail:
|
||||
li a7, -1
|
||||
li a0, 0
|
||||
ecall
|
||||
Loading…
Add table
Add a link
Reference in a new issue