mirror of
https://sourceware.org/git/binutils-gdb.git
synced 2024-12-21 04:42:53 +08:00
1368b914e9
Now that all port tests live under testsuite/sim/*/, and none live in testsuite/ directly, flatten the structure by moving all of the dirs under testsuite/sim/ to testsuite/ directly. We need to stop passing --tool to dejagnu so that it searches all dirs and not just ones that start with "sim". Since we have no other dirs in this tree, and no plans to add any, should be fine.
32 lines
444 B
Plaintext
32 lines
444 B
Plaintext
# mach(): m32r m32rx
|
|
# output(): pass\n
|
|
|
|
.include "testutils.inc"
|
|
|
|
start
|
|
|
|
; construct bra trap2_handler in trap 2 slot
|
|
ld24 r0,#bra_insn
|
|
ld r0,@r0
|
|
ld24 r1,#trap2_handler
|
|
addi r1,#-0x48 ; pc relative address from trap 2 slot to handler
|
|
srai r1,#2
|
|
or r0,r1
|
|
ld24 r2,#0x48 ; address of trap 2 slot
|
|
st r0,@r2
|
|
|
|
; perform trap
|
|
ldi r4,#0
|
|
trap #2
|
|
test_h_gr r4,42
|
|
|
|
pass
|
|
|
|
; trap 2 handler
|
|
trap2_handler:
|
|
ldi r4,#42
|
|
rte
|
|
|
|
bra_insn:
|
|
bra.l 0
|