This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
[PATCH] aarch64: Support an optional '#' in the second adrp operand
- From: Martin Storsjo <martin at martin dot st>
- To: binutils at sourceware dot org
- Date: Thu, 29 May 2014 16:03:46 +0300
- Subject: [PATCH] aarch64: Support an optional '#' in the second adrp operand
- Authentication-results: sourceware.org; auth=none
- References: <538725B9 dot 8060102 at arm dot com>
Also test this syntax in the test suite.
This matches the examples in the documentation, which only showed
using adrp with :pg_hi21: with a leading #.
---
gas/config/tc-aarch64.c | 1 +
gas/testsuite/gas/aarch64/reloc-insn.s | 12 ++++++------
2 files changed, 7 insertions(+), 6 deletions(-)
diff --git a/gas/config/tc-aarch64.c b/gas/config/tc-aarch64.c
index 67c0871..b9c8618 100644
--- a/gas/config/tc-aarch64.c
+++ b/gas/config/tc-aarch64.c
@@ -3225,6 +3225,7 @@ parse_adrp (char **str)
char *p;
p = *str;
+ skip_past_char (&p, '#');
if (*p == ':')
{
struct reloc_table_entry *entry;
diff --git a/gas/testsuite/gas/aarch64/reloc-insn.s b/gas/testsuite/gas/aarch64/reloc-insn.s
index 99ca965..6264ecb 100644
--- a/gas/testsuite/gas/aarch64/reloc-insn.s
+++ b/gas/testsuite/gas/aarch64/reloc-insn.s
@@ -76,12 +76,12 @@ func:
adrp x5,xdata+4088
// BFD_RELOC_AARCH64_ADR_HI21_PCREL
- adrp x0,:pg_hi21:llit
- adrp x1,:pg_hi21:ldata
- adrp x2,:pg_hi21:ldata+4088
- adrp x3,:pg_hi21:xlit
- adrp x4,:pg_hi21:xdata+16
- adrp x5,:pg_hi21:xdata+4088
+ adrp x0,#:pg_hi21:llit
+ adrp x1,#:pg_hi21:ldata
+ adrp x2,#:pg_hi21:ldata+4088
+ adrp x3,#:pg_hi21:xlit
+ adrp x4,#:pg_hi21:xdata+16
+ adrp x5,#:pg_hi21:xdata+4088
// BFD_RELOC_AARCH64_ADD_LO12
add x0,x0,#:lo12:llit
--
1.8.1.2