16 lines
375 B
ArmAsm
16 lines
375 B
ArmAsm
# expected: 000000BA, 000001C, 0000000A
|
|
.text
|
|
_start:
|
|
jal x1, step1
|
|
addi x31, x0, 0x00A
|
|
jal x0, finish
|
|
step1:
|
|
jal x2, step2
|
|
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, 4(x2) # return to step1, but 1 further
|
|
finish:
|
|
nop
|