Attempts to implement jalr, test not passing

This commit is contained in:
2025-11-07 13:37:46 +01:00
parent 3828850dd6
commit c88662403e
3 changed files with 91 additions and 47 deletions

15
bench/tests/op/jalr.s Normal file
View File

@@ -0,0 +1,15 @@
# expected: 000000BA, 0000018, 0000000A
.text
_start:
jal x1, step1
add x31, x0, 0x00A
jal x0, finish
step1:
jal x2, step2
add x31, x0, 0x0AB # This instruction should never be executed
add x31, x0, 0x0BA
jalr x31, 0(x1) # Check if return address is written to x31
step2:
jalr x0, 1(x2) # return to step1, but 1 further
finish:
nop