1 # Basic jalr tests. 2 # mach: riscv32 riscv64 3 4 .include "testutils.inc" 5 6 start 7 8 # Load desination into register a0. 9 la a0, good_dest 10 11 # Jump to the destination in a0. 12 jalr a0, a0, 0 13 14 # If we write destination into a0 before reading it in order 15 # to jump, we might end up here. 16 bad_dest: 17 fail 18 19 # We should end up here. 20 good_dest: 21 pass 22 fail 23