* gas/sh/pcrel-coff.s: New file.
authorJoern Rennecke <joern.rennecke@embecosm.com>
Wed, 22 May 2002 13:31:43 +0000 (13:31 +0000)
committerJoern Rennecke <joern.rennecke@embecosm.com>
Wed, 22 May 2002 13:31:43 +0000 (13:31 +0000)
* gas/sh/pcrel-coff.d: Likewise.
* gas/sh/basic.exp: For coff, don't do dsp test,
and a modified pcrel test.

gas/testsuite/ChangeLog
gas/testsuite/gas/sh/basic.exp
gas/testsuite/gas/sh/pcrel-coff.d [new file with mode: 0644]
gas/testsuite/gas/sh/pcrel-coff.s [new file with mode: 0644]

index 08c864d6e7e41206369bee7d250e1c66794904bb..0233342f3a47b152631f67c7daa776c75fe1fecc 100644 (file)
@@ -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.
index 1f9608696f79e8d4edaebd83583adc3fc884ee83..e3b4d90f35ed23629abe2138adc8c9746e4caca8 100644 (file)
@@ -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 (file)
index 0000000..4255392
--- /dev/null
@@ -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 (file)
index 0000000..d2df07a
--- /dev/null
@@ -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 - .