public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* [Committed][AArch64] Adding test case for abuse of :got: in offset load.
@ 2015-02-26 22:42 Marcus Shawcroft
  0 siblings, 0 replies; only message in thread
From: Marcus Shawcroft @ 2015-02-26 22:42 UTC (permalink / raw)
  To: binutils

[-- Attachment #1: Type: text/plain, Size: 126 bytes --]

The :got: modifier is not meaningful in a register offset load store 
instruction and should result in a diagnostic.

/Marcus

[-- Attachment #2: 0007-AArch64-Adding-test-case-for-abuse-of-got-in-offset-.patch --]
[-- Type: text/x-patch, Size: 1432 bytes --]

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..7650b65 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]
-- 
1.9.1


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2015-02-26 22:27 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-02-26 22:42 [Committed][AArch64] Adding test case for abuse of :got: in offset load Marcus Shawcroft

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).