diff options
-rw-r--r-- | sim/testsuite/sim/m32r/trap.cgs | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/sim/testsuite/sim/m32r/trap.cgs b/sim/testsuite/sim/m32r/trap.cgs new file mode 100644 index 0000000..386fe7f --- /dev/null +++ b/sim/testsuite/sim/m32r/trap.cgs @@ -0,0 +1,30 @@ +# m32r testcase for trap #$uimm4 +# mach(): m32r m32rx + + .include "testutils.inc" + + start + + .global trap +trap: + +; Create a trap 2 handler and call it. + + ld24 r0,#0x48 ; address of trap 2 handler + ld24 r1,#trap2_handler + addi r0,#-4 ; adjust for pre-increment stores + ld r2,@r1+ + st r2,@+r0 + ld r2,@r1+ + st r2,@+r0 + trap #2 + + fail + +trap2_ok: + pass + + .data +trap2_handler: + ld24 r0,#trap2_ok + jmp r0 |