From 02c614837093530e7ba59052c23cc7886c5602a9 Mon Sep 17 00:00:00 2001 From: Doug Evans Date: Mon, 8 Jun 1998 23:08:49 +0000 Subject: [PATCH] Test trap 2. --- sim/testsuite/sim/m32r/trap.cgs | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 sim/testsuite/sim/m32r/trap.cgs diff --git a/sim/testsuite/sim/m32r/trap.cgs b/sim/testsuite/sim/m32r/trap.cgs new file mode 100644 index 00000000000..386fe7fc851 --- /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 -- 2.30.2