Stage 8: all tests passing
This commit is contained in:
@@ -1,12 +1,17 @@
|
||||
# expected: 00000004, 0000008, 0000000C
|
||||
# expected: 00000004, 0000008, 00000014, 0000000B
|
||||
.text
|
||||
_start:
|
||||
jal x31, step1
|
||||
step1:
|
||||
jal x31, step2
|
||||
step4:
|
||||
addi x31, x0, 0x00B
|
||||
jal x0, finish
|
||||
step2:
|
||||
jal x31, step3
|
||||
step3:
|
||||
jal x0, step4
|
||||
addi x31, x0, 0x00A # This instruction should never be executed
|
||||
finish:
|
||||
nop
|
||||
|
||||
|
||||
|
||||
@@ -1,15 +1,15 @@
|
||||
# expected: 000000BA, 0000018, 0000000A
|
||||
# expected: 000000BA, 000001C, 0000000A
|
||||
.text
|
||||
_start:
|
||||
jal x1, step1
|
||||
add x31, x0, 0x00A
|
||||
addi x31, x0, 0x00A
|
||||
jal x0, finish
|
||||
step1:
|
||||
jal x2, step2
|
||||
add x31, x0, 0x0AB # This instruction should never be executed
|
||||
add x31, x0, 0x0BA
|
||||
addi x31, x0, 0x0AB # This instruction should never be executed
|
||||
addi 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
|
||||
jalr x0, 4(x2) # return to step1, but 1 further
|
||||
finish:
|
||||
nop
|
||||
|
||||
Reference in New Issue
Block a user