PR gas/3041
authorAlan Modra <amodra@gmail.com>
Mon, 7 Feb 2011 00:04:09 +0000 (00:04 +0000)
committerAlan Modra <amodra@gmail.com>
Mon, 7 Feb 2011 00:04:09 +0000 (00:04 +0000)
* gas/m68k/p3041pcrel.s, * gas/m68k/p3041pcrel.d: New test.
* gas/m68k/all.exp: Add "p3041pcrel" and enable p3041 tests for
all m68k-aout targets.

gas/testsuite/ChangeLog
gas/testsuite/gas/m68k/all.exp
gas/testsuite/gas/m68k/p3041pcrel.d [new file with mode: 0644]
gas/testsuite/gas/m68k/p3041pcrel.s [new file with mode: 0644]

index 412fbc0..166d8db 100644 (file)
@@ -1,3 +1,10 @@
+2011-02-07  Vincent Riviere  <vincent.riviere@freesbee.fr>
+
+       PR gas/3041
+       * gas/m68k/p3041pcrel.s, * gas/m68k/p3041pcrel.d: New test.
+       * gas/m68k/all.exp: Add "p3041pcrel" and enable p3041 tests for
+       all m68k-aout targets.
+
 2011-02-04  Bernd Schmidt  <bernds@codesourcery.com>
 
        * gas/tic6x/dir-junk.l: Remove tests for .atomic and .noatomic.
index f4bdfa7..b3db085 100644 (file)
@@ -71,9 +71,10 @@ if { [istarget m68*-*-*] || [istarget fido*-*-*] } then {
 
     gas_test_error "p11673.s" "-march=isab" "movel immediate with offset unsupported on isab"
 
-    if { [istarget *-*-netbsd] } then {
+    if { [istarget *-*-*aout] || [istarget *-*-netbsd] || [istarget *-*-openbsd*] } then {
       run_dump_test p3041
       run_dump_test p3041data
+      run_dump_test p3041pcrel
     }
 
     set testname "68000 operands"
diff --git a/gas/testsuite/gas/m68k/p3041pcrel.d b/gas/testsuite/gas/m68k/p3041pcrel.d
new file mode 100644 (file)
index 0000000..91168cc
--- /dev/null
@@ -0,0 +1,38 @@
+#name: PR 3041 pcrel
+#as: -m68000
+#objdump: -tdr
+
+.*:     file format .*
+
+SYMBOL TABLE:
+00000024  w      \.text 0000 00 0f mytext
+0000002e  w      \.data 0000 00 10 mydata
+0000003a  w      \.bss  0000 00 11 mybss
+
+Disassembly of section \.text:
+
+00000000 <.*>:
+   0:  41fa fffe       lea %pc@\(0 <.*>\),%a0
+                       2: DISP16       mytext
+   4:  41fa fffc       lea %pc@\(2 <.*>\),%a0
+                       6: DISP16       mytext
+   8:  41fa fff2       lea %pc@\(fffffffc <.*>\),%a0
+                       a: DISP16       mytext
+   c:  41fa fff2       lea %pc@\(0 <.*>\),%a0
+                       e: DISP16       mydata
+  10:  41fa fff1       lea %pc@\(3 <.*>\),%a0
+                       12: DISP16      mydata
+  14:  41fa ffe9       lea %pc@\(ffffffff <.*>\),%a0
+                       16: DISP16      mydata
+  18:  41fa ffe6       lea %pc@\(0 <.*>\),%a0
+                       1a: DISP16      mybss
+  1c:  41fa ffe3       lea %pc@\(1 <.*>\),%a0
+                       1e: DISP16      mybss
+  20:  41fa ffdc       lea %pc@\(fffffffe <.*>\),%a0
+                       22: DISP16      mybss
+
+00000024 <mytext>:
+  24:  4e71            nop
+  26:  4e71            nop
+  28:  4e71            nop
+  2a:  4e71            nop
diff --git a/gas/testsuite/gas/m68k/p3041pcrel.s b/gas/testsuite/gas/m68k/p3041pcrel.s
new file mode 100644 (file)
index 0000000..59d61ea
--- /dev/null
@@ -0,0 +1,28 @@
+       lea     mytext(%pc),%a0
+       lea     mytext+2(%pc),%a0
+       lea     mytext-4(%pc),%a0
+       lea     mydata(%pc),%a0
+       lea     mydata+3(%pc),%a0
+       lea     mydata-1(%pc),%a0
+       lea     mybss(%pc),%a0
+       lea     mybss+1(%pc),%a0
+       lea     mybss-2(%pc),%a0
+       .weak   mytext
+mytext:
+       nop
+       nop
+       nop
+       nop
+
+       .data
+       .word   0x8081
+       .weak   mydata
+mydata:
+       .word   0x8283
+       .word   0x8485
+
+       .bss
+       .skip   6
+       .weak   mybss
+mybss:
+       .skip   2