From 27228ca23e80c31ecbf3da261224b1d2ece4be83 Mon Sep 17 00:00:00 2001 From: Marcus Shawcroft Date: Wed, 18 Feb 2015 18:32:43 +0000 Subject: [PATCH] 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. --- gas/testsuite/ChangeLog | 5 +++++ gas/testsuite/gas/aarch64/diagnostic.l | 1 + gas/testsuite/gas/aarch64/diagnostic.s | 1 + 3 files changed, 7 insertions(+) diff --git a/gas/testsuite/ChangeLog b/gas/testsuite/ChangeLog index 8884e3563e3..630fa91e6cd 100644 --- a/gas/testsuite/ChangeLog +++ b/gas/testsuite/ChangeLog @@ -1,3 +1,8 @@ +2015-02-26 Marcus Shawcroft + + * gas/aarch64/diagnostic.s: Add LDR test. + * gas/aarch64/diagnostic.l: Likewise. + 2015-02-26 Marcus Shawcroft * gas/aarch64/diagnostic.s: Add ADR test. diff --git a/gas/testsuite/gas/aarch64/diagnostic.l b/gas/testsuite/gas/aarch64/diagnostic.l index 50f2a6db2b2..7a89f8ee74b 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 6dbe6e19fb5..7650b65c3e4 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] -- 2.30.2