diff options
author | Doug Evans <dje@google.com> | 1998-06-08 23:08:49 +0000 |
---|---|---|
committer | Doug Evans <dje@google.com> | 1998-06-08 23:08:49 +0000 |
commit | 02c614837093530e7ba59052c23cc7886c5602a9 (patch) | |
tree | 5899a801594f68ae320947c2d7839e30b79aa862 /sim | |
parent | 2dc7ca5026e491598efa6525a36fadef1a60d8a3 (diff) | |
download | fsf-binutils-gdb-02c614837093530e7ba59052c23cc7886c5602a9.zip fsf-binutils-gdb-02c614837093530e7ba59052c23cc7886c5602a9.tar.gz fsf-binutils-gdb-02c614837093530e7ba59052c23cc7886c5602a9.tar.bz2 |
Test trap 2.
Diffstat (limited to 'sim')
-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 |