From: Doug Evans Date: Mon, 8 Jun 1998 23:08:49 +0000 (+0000) Subject: Test trap 2. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=02c614837093530e7ba59052c23cc7886c5602a9;p=binutils-gdb.git Test trap 2. --- 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