From: "Martin Storsjö" <martin@martin.st>
To: Yufeng Zhang <Yufeng.Zhang@arm.com>
Cc: "binutils@sourceware.org" <binutils@sourceware.org>,
Marcus Shawcroft <Marcus.Shawcroft@arm.com>
Subject: Re: [PATCH] aarch64: Fix the documentation on :pg_hi21:
Date: Thu, 29 May 2014 17:57:00 -0000 [thread overview]
Message-ID: <alpine.DEB.2.02.1405292057290.14339@cone.martin.st> (raw)
In-Reply-To: <53875FE9.9080103@arm.com>
On Thu, 29 May 2014, Yufeng Zhang wrote:
> On 05/29/14 13:19, Yufeng Zhang wrote:
>> Hi Martin,
>>
>> On 05/29/14 13:00, Martin Storsjo wrote:
>>> The syntax described, including a leading '#', was not supported
>>> in practice. (For :lo12: it is optional.)
>>
>> I believe this is an issue in the parser; '#' should be optional in
>> either case.
>>
>> It looks like gas/config/tc-aarch64.c:parse_adrp () is missing the
>> skip_past_char (&p, '#') at its beginning; see parse_half () for an
>> example.
>
> After spending some time this afternoon reading ARMv8 Architecture Reference
> Manual (ARMARM) and having a discussion with a colleague, I think I'll have
> to take back what I just said. Sorry!
>
> The A64 assembly language allows the optional # character to introduce
> constant immediate operands, e.g. in LDR instructions with immediate offset:
>
> LDR <Wt>, [<Xn|SP>], #<simm>
>
> and in the bitfield move instructions:
>
> BFM <Wd>, <Wn>, #<immr>, #<imms>
>
> The ADRP instruction, however, has the following syntax:
>
> ADRP <Xd>, <label>
>
> whose second operand is a program label whose 4KB page address is to be
> calculated, and for such a operand, it doesn't make much sense to allow the #
> character as an optional prefix, e.g. ADRP X0, #foo would look weird and
> confusing.
>
> So I think your original patch is the right one to go with, and my only
> comment is to remove both # characters from the line of
>
> "
> @samp{#:pg_hi21:} and @samp{#:lo12:} respectively.
> "
>
> Apologize again for the previous wrong direction.
>
> Please get an approval from Marcus.
Ok, thanks - this explanation makes sense.
// Martin
next prev parent reply other threads:[~2014-05-29 17:57 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-05-29 12:00 Martin Storsjo
2014-05-29 12:19 ` Yufeng Zhang
2014-05-29 13:04 ` [PATCH] aarch64: Support an optional '#' in the second adrp operand Martin Storsjo
2014-05-29 16:27 ` [PATCH] aarch64: Fix the documentation on :pg_hi21: Yufeng Zhang
2014-05-29 17:57 ` Martin Storsjö [this message]
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=alpine.DEB.2.02.1405292057290.14339@cone.martin.st \
--to=martin@martin.st \
--cc=Marcus.Shawcroft@arm.com \
--cc=Yufeng.Zhang@arm.com \
--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).