aboutsummaryrefslogtreecommitdiff
path: root/gas
diff options
context:
space:
mode:
authorMarcus Shawcroft <marcus.shawcroft@arm.com>2015-02-18 18:32:43 +0000
committerMarcus Shawcroft <marcus.shawcroft@arm.com>2015-02-26 22:23:09 +0000
commit27228ca23e80c31ecbf3da261224b1d2ece4be83 (patch)
tree134334ecdd65f2df62443a56308d2c195931dff9 /gas
parent6f4a313ba49c84d9f8b266d8d90c9cedbd11b1bc (diff)
downloadgdb-27228ca23e80c31ecbf3da261224b1d2ece4be83.zip
gdb-27228ca23e80c31ecbf3da261224b1d2ece4be83.tar.gz
gdb-27228ca23e80c31ecbf3da261224b1d2ece4be83.tar.bz2
Adding test case for abuse of :got: in offset load
The :got: modifier is not meaningful in a register offset load store instruction and should result in a diagnostic.
Diffstat (limited to 'gas')
-rw-r--r--gas/testsuite/ChangeLog5
-rw-r--r--gas/testsuite/gas/aarch64/diagnostic.l1
-rw-r--r--gas/testsuite/gas/aarch64/diagnostic.s1
3 files changed, 7 insertions, 0 deletions
diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog
index 8884e35..630fa91 100644
--- a/gas/testsuite/ChangeLog
+++ b/gas/testsuite/ChangeLog
@@ -1,5 +1,10 @@
2015-02-26 Marcus Shawcroft <marcus.shawcroft@arm.com>
+ * gas/aarch64/diagnostic.s: Add LDR test.
+ * gas/aarch64/diagnostic.l: Likewise.
+
+2015-02-26 Marcus Shawcroft <marcus.shawcroft@arm.com>
+
* gas/aarch64/diagnostic.s: Add ADR test.
* gas/aarch64/diagnostic.l: Likewise.
diff --git a/gas/testsuite/gas/aarch64/diagnostic.l b/gas/testsuite/gas/aarch64/diagnostic.l
index 50f2a6d..7a89f8e 100644
--- a/gas/testsuite/gas/aarch64/diagnostic.l
+++ b/gas/testsuite/gas/aarch64/diagnostic.l
@@ -115,3 +115,4 @@
[^:]*:124: Warning: unpredictable transfer with writeback -- `stp x0,x1,\[x0,#16\]!'
[^:]*:125: Warning: unpredictable transfer with writeback -- `ldp x0,x1,\[x1\],#16'
[^:]*:126: Error: this relocation modifier is not allowed on this instruction at operand 2 -- `adr x2,:got:s1'
+[^:]*:127: Error: this relocation modifier is not allowed on this instruction at operand 2 -- `ldr x0,\[x0,:got:s1\]'
diff --git a/gas/testsuite/gas/aarch64/diagnostic.s b/gas/testsuite/gas/aarch64/diagnostic.s
index 6dbe6e1..7650b65c 100644
--- a/gas/testsuite/gas/aarch64/diagnostic.s
+++ b/gas/testsuite/gas/aarch64/diagnostic.s
@@ -124,3 +124,4 @@
stp x0, x1, [x0, #16]!
ldp x0, x1, [x1], #16
adr x2, :got:s1
+ ldr x0, [x0, :got:s1]