aboutsummaryrefslogtreecommitdiff
path: root/sim/testsuite/d30v-elf
diff options
context:
space:
mode:
authorFrank Ch. Eigler <fche@redhat.com>1998-04-29 17:01:23 +0000
committerFrank Ch. Eigler <fche@redhat.com>1998-04-29 17:01:23 +0000
commit2325ac592fbb17b5605270f65e089e793da4e6c3 (patch)
tree5e1fbfbaa253be1a9a56ac3d192629af74e2dda2 /sim/testsuite/d30v-elf
parent56c0f25a5b0431603ccc90db5f17ecefbda609d1 (diff)
downloadgdb-2325ac592fbb17b5605270f65e089e793da4e6c3.zip
gdb-2325ac592fbb17b5605270f65e089e793da4e6c3.tar.gz
gdb-2325ac592fbb17b5605270f65e089e793da4e6c3.tar.bz2
* Test case for modular arithmetic hardware erratum, c.f. PR 14887.
Wed Apr 29 12:49:00 1998 Frank Ch. Eigler <fche@cygnus.com> * ls-modaddr.S: New test for modular addressing. * Makefile.in: Run it.
Diffstat (limited to 'sim/testsuite/d30v-elf')
-rw-r--r--sim/testsuite/d30v-elf/.Sanitize1
-rw-r--r--sim/testsuite/d30v-elf/ls-modaddr.S37
2 files changed, 38 insertions, 0 deletions
diff --git a/sim/testsuite/d30v-elf/.Sanitize b/sim/testsuite/d30v-elf/.Sanitize
index e9325bd..fd1fd13 100644
--- a/sim/testsuite/d30v-elf/.Sanitize
+++ b/sim/testsuite/d30v-elf/.Sanitize
@@ -53,6 +53,7 @@ ls-ldhu.S
ls-ldw.S
ls-moddec.S
ls-modinc.S
+ls-modaddr.S
ls-st2h.S
ls-st2w.S
ls-st4hb.S
diff --git a/sim/testsuite/d30v-elf/ls-modaddr.S b/sim/testsuite/d30v-elf/ls-modaddr.S
new file mode 100644
index 0000000..55634e9
--- /dev/null
+++ b/sim/testsuite/d30v-elf/ls-modaddr.S
@@ -0,0 +1,37 @@
+ ; Modular address postincrement test
+
+start:
+ ; set modular address limits: 0x18 bytes
+ add r1,r0,0x20000070 ; [start, ...
+ nop || nop
+ mvtsys mod_s,r1 || nop
+ nop || nop
+ add r1,r0,0x20000088 ; ..., end)
+ nop || nop
+ mvtsys mod_e,r1 || nop
+
+ ; program PSW for modular address mode
+ add r1,r0,0x81000000
+ nop || nop
+ mvtsys psw,r1 || nop
+ nop || nop
+
+ ; modular autoincrement test
+ add r30,r0,0x20000070 ; base address = mod_s
+ ld2w r40,@(r30+,r0) || nop ; after: r30 = ...078
+ ld2w r40,@(r30+,r0) || nop ; after: r30 = ...080
+ ld2w r40,@(r30+,r0) || nop ; after: r30 = ...070
+
+ add r29,r0,0x20000070 ; expected end address; wrapping around
+ cmpeq f1,r30,r29
+ bra/xf fail
+
+ ; Q: what about autodecrement?
+
+ok:
+ add r2,r0,0
+ .long 0x0e000004, 0x00f00000
+
+fail:
+ add r2,r0,47
+ .long 0x0e000004, 0x00f00000