aboutsummaryrefslogtreecommitdiff
path: root/gas
diff options
context:
space:
mode:
authorJoern Rennecke <joern.rennecke@embecosm.com>2002-05-22 13:31:43 +0000
committerJoern Rennecke <joern.rennecke@embecosm.com>2002-05-22 13:31:43 +0000
commit77b63882047925261fa7e251d524fbc06bf315f3 (patch)
treefa8152024021ab15b86a434efd9aa6fa2c8d1c39 /gas
parent6c3eb89063d0db649eaecefe767b46d50fa91176 (diff)
downloadfsf-binutils-gdb-77b63882047925261fa7e251d524fbc06bf315f3.zip
fsf-binutils-gdb-77b63882047925261fa7e251d524fbc06bf315f3.tar.gz
fsf-binutils-gdb-77b63882047925261fa7e251d524fbc06bf315f3.tar.bz2
* gas/sh/pcrel-coff.s: New file.
* gas/sh/pcrel-coff.d: Likewise. * gas/sh/basic.exp: For coff, don't do dsp test, and a modified pcrel test.
Diffstat (limited to 'gas')
-rw-r--r--gas/testsuite/ChangeLog7
-rw-r--r--gas/testsuite/gas/sh/basic.exp15
-rw-r--r--gas/testsuite/gas/sh/pcrel-coff.d27
-rw-r--r--gas/testsuite/gas/sh/pcrel-coff.s14
4 files changed, 59 insertions, 4 deletions
diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog
index 08c864d..0233342 100644
--- a/gas/testsuite/ChangeLog
+++ b/gas/testsuite/ChangeLog
@@ -1,3 +1,10 @@
+Wed May 22 14:26:07 2002 J"orn Rennecke <joern.rennecke@superh.com>
+
+ * gas/sh/pcrel-coff.s: New file.
+ * gas/sh/pcrel-coff.d: Likewise.
+ * gas/sh/basic.exp: For coff, don't do dsp test,
+ and a modified pcrel test.
+
2002-05-22 Thiemo Seufer <seufer@csv.ica.uni-stuttgart.de>
* gas/mips/rol64.s: New file, test of drol, dror macros.
diff --git a/gas/testsuite/gas/sh/basic.exp b/gas/testsuite/gas/sh/basic.exp
index 1f96086..e3b4d90 100644
--- a/gas/testsuite/gas/sh/basic.exp
+++ b/gas/testsuite/gas/sh/basic.exp
@@ -88,12 +88,19 @@ proc do_fp {} {
if [istarget sh*-*-*] then {
# Test the basic instruction parser.
do_fp
- # Test DSP instructions
- run_dump_test "dsp"
+
+ # coff is missing information about the machine type, so everything is
+ # dumped as sh4.
+ if {[istarget sh*-*coff] || [istarget sh*-hms]} then {
+ run_dump_test "pcrel-coff"
+ } else {
+ # Test DSP instructions
+ run_dump_test "dsp"
+
+ run_dump_test "pcrel"
+ }
if {[istarget sh*-*elf] || [istarget sh*-linux*]} then {
run_dump_test "pic"
}
-
- run_dump_test "pcrel"
}
diff --git a/gas/testsuite/gas/sh/pcrel-coff.d b/gas/testsuite/gas/sh/pcrel-coff.d
new file mode 100644
index 0000000..4255392
--- /dev/null
+++ b/gas/testsuite/gas/sh/pcrel-coff.d
@@ -0,0 +1,27 @@
+#as: -big
+#objdump: -d
+#name: PC-relative loads
+
+.*: file format .*sh.*
+
+Disassembly of section .text:
+
+00000000 <code>:
+ 0: d1 03 mov\.l 10 <litpool>,r1 ! 0xfffffff0
+ 2: d1 03 mov\.l 10 <litpool>,r1 ! 0xfffffff0
+ 4: c7 02 mova 10 <litpool>,r0
+ 6: 61 02 mov\.l @r0,r1
+ 8: d1 01 mov\.l 10 <litpool>,r1 ! 0xfffffff0
+ a: 01 03 bsrf r1
+ c: 00 09 nop
+ e: 00 09 nop
+
+00000010 <litpool>:
+ 10: ff ff \.word 0xffff
+ 12: ff f0 fadd fr15,fr15
+ 14: 00 09 nop
+ 16: 00 09 nop
+ 18: 00 09 nop
+ 1a: 00 09 nop
+ 1c: 00 09 nop
+ 1e: 00 09 nop
diff --git a/gas/testsuite/gas/sh/pcrel-coff.s b/gas/testsuite/gas/sh/pcrel-coff.s
new file mode 100644
index 0000000..d2df07a
--- /dev/null
+++ b/gas/testsuite/gas/sh/pcrel-coff.s
@@ -0,0 +1,14 @@
+ .text
+
+ .p2align 2
+code:
+ mov.l litpool, r1
+ mov.l @(14,pc), r1
+ mova @(litpool-.,pc), r0
+ mov.l @r0,r1
+ mov.l @(litpool-.,pc), r1
+ bsrf r1
+ nop
+ nop
+litpool:
+ .long code - .