public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
From: Martin Storsjo <martin@martin.st>
To: binutils@sourceware.org
Subject: [PATCH] aarch64: Support an optional '#' in the second adrp operand
Date: Thu, 29 May 2014 13:04:00 -0000	[thread overview]
Message-ID: <1401368626-6862-1-git-send-email-martin@martin.st> (raw)
In-Reply-To: <538725B9.8060102@arm.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

  reply	other threads:[~2014-05-29 13:04 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-05-29 12:00 [PATCH] aarch64: Fix the documentation on :pg_hi21: Martin Storsjo
2014-05-29 12:19 ` Yufeng Zhang
2014-05-29 13:04   ` Martin Storsjo [this message]
2014-05-29 16:27   ` Yufeng Zhang
2014-05-29 17:57     ` Martin Storsjö
2014-05-29 17:58       ` Martin Storsjo
2014-06-02 13:45         ` Marcus Shawcroft
2014-06-02 19:31           ` Martin Storsjo
2014-06-03 20:20             ` Martin Storsjö
2014-06-05 20:37               ` Martin Storsjö
2014-06-06  6:30                 ` Marcus Shawcroft
2014-06-06 10:10               ` Richard Earnshaw
2014-06-06 10:18                 ` Martin Storsjö
2014-06-06 10:22                   ` Richard Earnshaw

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1401368626-6862-1-git-send-email-martin@martin.st \
    --to=martin@martin.st \
    --cc=binutils@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).