* gas/all/fwdexp.d, * gas/all/fwdexp.s: New test.
authorAlan Modra <amodra@gmail.com>
Wed, 29 Sep 2010 06:49:33 +0000 (06:49 +0000)
committerAlan Modra <amodra@gmail.com>
Wed, 29 Sep 2010 06:49:33 +0000 (06:49 +0000)
* gas/all/gas.exp: Run it.

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

index 3a73dfbce57d0ad5e86486b6a414ad83e7a5aff3..671cc03a307bae53f68c41c4572e638fad41e13f 100644 (file)
@@ -1,3 +1,8 @@
+2010-09-29  Alan Modra  <amodra@gmail.com>
+
+       * gas/all/fwdexp.d, * gas/all/fwdexp.s: New test.
+       * gas/all/gas.exp: Run it.
+
 2010-09-29  Alan Modra  <amodra@gmail.com>
 
        * lib/gas-defs.exp (is_elf_format): Merge with binutils and ld versions.
diff --git a/gas/testsuite/gas/all/fwdexp.d b/gas/testsuite/gas/all/fwdexp.d
new file mode 100644 (file)
index 0000000..b30e350
--- /dev/null
@@ -0,0 +1,11 @@
+#objdump: -rs -j .text
+#name: forward expression
+
+.*: .*
+
+RELOCATION RECORDS FOR .*
+OFFSET +TYPE +VALUE 
+0+ .*(\.data|i)(|\+0xf+e|\+0xf+c|\+0xf+8)
+
+Contents of section .*
+ 0+ (0+|feff|fffe|fcffffff|fffffffc|f8ffffff ffffffff|ffffffff fffffff8) .*
diff --git a/gas/testsuite/gas/all/fwdexp.s b/gas/testsuite/gas/all/fwdexp.s
new file mode 100644 (file)
index 0000000..e103099
--- /dev/null
@@ -0,0 +1,6 @@
+ .data
+i:
+
+ .text
+ .dc.a i + (. - .L1)
+.L1:
index 0651bb2efcf3efbd8ba52c56b6b2fa14d8fcc411..9e080f484e1bd16e87b126a2af89663a5c6bbac2 100644 (file)
@@ -86,6 +86,25 @@ case $target_triplet in {
     }
 }
 
+# aout relocs are often weird, so is mep and mips-ecoff. don't bother testing
+# som doesn't use a .text section
+# mmix doesn't like .L1:
+# ti addresses aren't octets.
+if { ![is_aout_format] } {
+    case $target_triplet in {
+       { hppa-*-hpux* } { }
+       { mep-*-* } { }
+       { mips*-*-ecoff* } { }
+       { mmix-*-* } { }
+       { tic30*-*-* } { }
+       { tic4x*-*-* } { }
+       { tic54x*-*-* } { }
+       default {
+           run_dump_test fwdexp
+       }
+    }
+}
+
 # .set works differently on some targets.
 # most of the tests won't work on targets that set linkrelax.
 # 4 octet bytes confuse address matching on ti targets.