aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Modra <amodra@gmail.com>2018-10-22 13:49:21 +1030
committerAlan Modra <amodra@gmail.com>2018-10-22 22:32:43 +1030
commit1f38083f425e03faf55595414daf291306738222 (patch)
treefcfd9bcacc4cd4878bf00fbf4ed4b9e017379181
parente1748c54a200f45d6e88c232ca97171be23ba0b0 (diff)
downloadgdb-1f38083f425e03faf55595414daf291306738222.zip
gdb-1f38083f425e03faf55595414daf291306738222.tar.gz
gdb-1f38083f425e03faf55595414daf291306738222.tar.bz2
gas simple-forward test
Tests that target md_apply_fix can handle fixups that have resolved down to a constant and thus do not need relocations. Also a fix for eqv-dot xfails. * testsuite/gas/all/simple-forward.d, * testsuite/gas/all/simple-forward.s: New test. * testsuite/gas/all/gas.exp: Run it. * testsuite/gas/all/eqv-dot.d: xfail tic30 and tic54x.
-rw-r--r--gas/ChangeLog7
-rw-r--r--gas/testsuite/gas/all/eqv-dot.d4
-rw-r--r--gas/testsuite/gas/all/gas.exp2
-rw-r--r--gas/testsuite/gas/all/simple-forward.d14
-rw-r--r--gas/testsuite/gas/all/simple-forward.s11
5 files changed, 36 insertions, 2 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index b0405fa..d5935b7 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,5 +1,12 @@
2018-10-22 Alan Modra <amodra@gmail.com>
+ * testsuite/gas/all/simple-forward.d,
+ * testsuite/gas/all/simple-forward.s: New test.
+ * testsuite/gas/all/gas.exp: Run it.
+ * testsuite/gas/all/eqv-dot.d: xfail tic30 and tic54x.
+
+2018-10-22 Alan Modra <amodra@gmail.com>
+
* config/tc-alpha.c (md_apply_fix): Handle BFD_RELOC_8 for fixups
without a symbol.
* testsuite/gas/all/gas.exp: Don't xfail forward test here..
diff --git a/gas/testsuite/gas/all/eqv-dot.d b/gas/testsuite/gas/all/eqv-dot.d
index 1545303..bd82506 100644
--- a/gas/testsuite/gas/all/eqv-dot.d
+++ b/gas/testsuite/gas/all/eqv-dot.d
@@ -1,8 +1,8 @@
#objdump: -s -j .data
#name: eqv involving dot
# bfin doesn't support 'symbol = expression'
-# tic4x has 4 octets per byte
-#notarget: bfin-*-* tic4x-*-*
+# tic30 and tic4x have 4 octets per byte, tic54x has 2 octets per byte
+#notarget: bfin-*-* *c30-*-* *c4x-*-* *c54x-*-*
.*: .*
diff --git a/gas/testsuite/gas/all/gas.exp b/gas/testsuite/gas/all/gas.exp
index 4296b14..7c28f43 100644
--- a/gas/testsuite/gas/all/gas.exp
+++ b/gas/testsuite/gas/all/gas.exp
@@ -98,6 +98,8 @@ if { ![istarget "bfin-*-*"] } then {
}
gas_test_error "assign-bad.s" "" "== assignment for symbol already set"
+run_dump_test simple-forward
+
# .equ works differently on some targets.
# linkrelax-ing prevents most forward references from working.
case $target_triplet in {
diff --git a/gas/testsuite/gas/all/simple-forward.d b/gas/testsuite/gas/all/simple-forward.d
new file mode 100644
index 0000000..63b4077
--- /dev/null
+++ b/gas/testsuite/gas/all/simple-forward.d
@@ -0,0 +1,14 @@
+#objdump: -s -j .data
+#name: simple forward references
+# tic30 and tic4x have 4 octets per byte, tic54x has 2 octets per byte
+#notarget: *c30-*-* *c4x-*-* *c54x-*-*
+# am33, crx and mn10300 all emit relocs unnecessarily for this test,
+# but the code they generate is correct. Others emit incorrect relocs
+# which lead to incorrect results after linking.
+#xfail: am33*-*-* crx-*-* mn10300-*-*
+
+.*: .*
+
+Contents of section \.data:
+ 0000 0c000000 (0c000000 0c000000|000c0000 0000000c) .*
+#pass
diff --git a/gas/testsuite/gas/all/simple-forward.s b/gas/testsuite/gas/all/simple-forward.s
new file mode 100644
index 0000000..fb7ee63
--- /dev/null
+++ b/gas/testsuite/gas/all/simple-forward.s
@@ -0,0 +1,11 @@
+ .data
+ .balign 4
+L0:
+ .balign 4
+ .dc.b L1-L0
+ .balign 4
+ .dc.w L1-L0
+ .balign 4
+ .dc.l L1-L0
+ .balign 4
+L1: