* [PATCH] aarch64: Fix the documentation on :pg_hi21: @ 2014-05-29 12:00 Martin Storsjo 2014-05-29 12:19 ` Yufeng Zhang 0 siblings, 1 reply; 14+ messages in thread From: Martin Storsjo @ 2014-05-29 12:00 UTC (permalink / raw) To: binutils The syntax described, including a leading '#', was not supported in practice. (For :lo12: it is optional.) --- gas/doc/c-aarch64.texi | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/gas/doc/c-aarch64.texi b/gas/doc/c-aarch64.texi index cce4f61..1f4ce4c 100644 --- a/gas/doc/c-aarch64.texi +++ b/gas/doc/c-aarch64.texi @@ -186,24 +186,24 @@ For example to load the 48-bit absolute address of @var{foo} into x0: @cindex ADRP, ADD, LDR/STR group relocations, AArch64 Relocations for @samp{ADRP}, and @samp{ADD}, @samp{LDR} or @samp{STR} instructions can be generated by prefixing the label with -@samp{#:pg_hi21:} and @samp{#:lo12:} respectively. +@samp{:pg_hi21:} and @samp{#:lo12:} respectively. For example to use 33-bit (+/-4GB) pc-relative addressing to load the address of @var{foo} into x0: @smallexample - adrp x0, #:pg_hi21:foo + adrp x0, :pg_hi21:foo add x0, x0, #:lo12:foo @end smallexample Or to load the value of @var{foo} into x0: @smallexample - adrp x0, #:pg_hi21:foo + adrp x0, :pg_hi21:foo ldr x0, [x0, #:lo12:foo] @end smallexample -Note that @samp{#:pg_hi21:} is optional. +Note that @samp{:pg_hi21:} is optional. @smallexample adrp x0, foo @@ -212,7 +212,7 @@ Note that @samp{#:pg_hi21:} is optional. is equivalent to @smallexample - adrp x0, #:pg_hi21:foo + adrp x0, :pg_hi21:foo @end smallexample @node AArch64 Floating Point -- 1.8.5.2 (Apple Git-48) ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH] aarch64: Fix the documentation on :pg_hi21: 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 ` [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 0 siblings, 2 replies; 14+ messages in thread From: Yufeng Zhang @ 2014-05-29 12:19 UTC (permalink / raw) To: Martin Storsjo; +Cc: binutils 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. Yufeng > --- > gas/doc/c-aarch64.texi | 10 +++++----- > 1 file changed, 5 insertions(+), 5 deletions(-) > > diff --git a/gas/doc/c-aarch64.texi b/gas/doc/c-aarch64.texi > index cce4f61..1f4ce4c 100644 > --- a/gas/doc/c-aarch64.texi > +++ b/gas/doc/c-aarch64.texi > @@ -186,24 +186,24 @@ For example to load the 48-bit absolute address of @var{foo} into x0: > @cindex ADRP, ADD, LDR/STR group relocations, AArch64 > Relocations for @samp{ADRP}, and @samp{ADD}, @samp{LDR} or @samp{STR} > instructions can be generated by prefixing the label with > -@samp{#:pg_hi21:} and @samp{#:lo12:} respectively. > +@samp{:pg_hi21:} and @samp{#:lo12:} respectively. > > For example to use 33-bit (+/-4GB) pc-relative addressing to > load the address of @var{foo} into x0: > > @smallexample > - adrp x0, #:pg_hi21:foo > + adrp x0, :pg_hi21:foo > add x0, x0, #:lo12:foo > @end smallexample > > Or to load the value of @var{foo} into x0: > > @smallexample > - adrp x0, #:pg_hi21:foo > + adrp x0, :pg_hi21:foo > ldr x0, [x0, #:lo12:foo] > @end smallexample > > -Note that @samp{#:pg_hi21:} is optional. > +Note that @samp{:pg_hi21:} is optional. > > @smallexample > adrp x0, foo > @@ -212,7 +212,7 @@ Note that @samp{#:pg_hi21:} is optional. > is equivalent to > > @smallexample > - adrp x0, #:pg_hi21:foo > + adrp x0, :pg_hi21:foo > @end smallexample > > @node AArch64 Floating Point ^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH] aarch64: Support an optional '#' in the second adrp operand 2014-05-29 12:19 ` Yufeng Zhang @ 2014-05-29 13:04 ` Martin Storsjo 2014-05-29 16:27 ` [PATCH] aarch64: Fix the documentation on :pg_hi21: Yufeng Zhang 1 sibling, 0 replies; 14+ messages in thread From: Martin Storsjo @ 2014-05-29 13:04 UTC (permalink / raw) To: binutils 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 ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH] aarch64: Fix the documentation on :pg_hi21: 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 ` Yufeng Zhang 2014-05-29 17:57 ` Martin Storsjö 1 sibling, 1 reply; 14+ messages in thread From: Yufeng Zhang @ 2014-05-29 16:27 UTC (permalink / raw) To: Martin Storsjo; +Cc: binutils, Marcus Shawcroft 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. Thanks, Yufeng > > Yufeng > >> --- >> gas/doc/c-aarch64.texi | 10 +++++----- >> 1 file changed, 5 insertions(+), 5 deletions(-) >> >> diff --git a/gas/doc/c-aarch64.texi b/gas/doc/c-aarch64.texi >> index cce4f61..1f4ce4c 100644 >> --- a/gas/doc/c-aarch64.texi >> +++ b/gas/doc/c-aarch64.texi >> @@ -186,24 +186,24 @@ For example to load the 48-bit absolute address of @var{foo} into x0: >> @cindex ADRP, ADD, LDR/STR group relocations, AArch64 >> Relocations for @samp{ADRP}, and @samp{ADD}, @samp{LDR} or @samp{STR} >> instructions can be generated by prefixing the label with >> -@samp{#:pg_hi21:} and @samp{#:lo12:} respectively. >> +@samp{:pg_hi21:} and @samp{#:lo12:} respectively. >> >> For example to use 33-bit (+/-4GB) pc-relative addressing to >> load the address of @var{foo} into x0: >> >> @smallexample >> - adrp x0, #:pg_hi21:foo >> + adrp x0, :pg_hi21:foo >> add x0, x0, #:lo12:foo >> @end smallexample >> >> Or to load the value of @var{foo} into x0: >> >> @smallexample >> - adrp x0, #:pg_hi21:foo >> + adrp x0, :pg_hi21:foo >> ldr x0, [x0, #:lo12:foo] >> @end smallexample >> >> -Note that @samp{#:pg_hi21:} is optional. >> +Note that @samp{:pg_hi21:} is optional. >> >> @smallexample >> adrp x0, foo >> @@ -212,7 +212,7 @@ Note that @samp{#:pg_hi21:} is optional. >> is equivalent to >> >> @smallexample >> - adrp x0, #:pg_hi21:foo >> + adrp x0, :pg_hi21:foo >> @end smallexample >> >> @node AArch64 Floating Point > > > ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH] aarch64: Fix the documentation on :pg_hi21: 2014-05-29 16:27 ` [PATCH] aarch64: Fix the documentation on :pg_hi21: Yufeng Zhang @ 2014-05-29 17:57 ` Martin Storsjö 2014-05-29 17:58 ` Martin Storsjo 0 siblings, 1 reply; 14+ messages in thread From: Martin Storsjö @ 2014-05-29 17:57 UTC (permalink / raw) To: Yufeng Zhang; +Cc: binutils, Marcus Shawcroft 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 ^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH] aarch64: Fix the documentation on :pg_hi21: 2014-05-29 17:57 ` Martin Storsjö @ 2014-05-29 17:58 ` Martin Storsjo 2014-06-02 13:45 ` Marcus Shawcroft 0 siblings, 1 reply; 14+ messages in thread From: Martin Storsjo @ 2014-05-29 17:58 UTC (permalink / raw) To: binutils The syntax described, including a leading '#', was not supported in practice. (For :lo12: it is optional.) --- Removed the # from the declaration of :lo12: as well - the '#' isn't a part of the :lo12: prefix itself but is part of how the symbol is used in the instruction. --- gas/doc/c-aarch64.texi | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/gas/doc/c-aarch64.texi b/gas/doc/c-aarch64.texi index cce4f61..3d84123 100644 --- a/gas/doc/c-aarch64.texi +++ b/gas/doc/c-aarch64.texi @@ -186,24 +186,24 @@ For example to load the 48-bit absolute address of @var{foo} into x0: @cindex ADRP, ADD, LDR/STR group relocations, AArch64 Relocations for @samp{ADRP}, and @samp{ADD}, @samp{LDR} or @samp{STR} instructions can be generated by prefixing the label with -@samp{#:pg_hi21:} and @samp{#:lo12:} respectively. +@samp{:pg_hi21:} and @samp{:lo12:} respectively. For example to use 33-bit (+/-4GB) pc-relative addressing to load the address of @var{foo} into x0: @smallexample - adrp x0, #:pg_hi21:foo + adrp x0, :pg_hi21:foo add x0, x0, #:lo12:foo @end smallexample Or to load the value of @var{foo} into x0: @smallexample - adrp x0, #:pg_hi21:foo + adrp x0, :pg_hi21:foo ldr x0, [x0, #:lo12:foo] @end smallexample -Note that @samp{#:pg_hi21:} is optional. +Note that @samp{:pg_hi21:} is optional. @smallexample adrp x0, foo @@ -212,7 +212,7 @@ Note that @samp{#:pg_hi21:} is optional. is equivalent to @smallexample - adrp x0, #:pg_hi21:foo + adrp x0, :pg_hi21:foo @end smallexample @node AArch64 Floating Point -- 1.8.5.2 (Apple Git-48) ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH] aarch64: Fix the documentation on :pg_hi21: 2014-05-29 17:58 ` Martin Storsjo @ 2014-06-02 13:45 ` Marcus Shawcroft 2014-06-02 19:31 ` Martin Storsjo 0 siblings, 1 reply; 14+ messages in thread From: Marcus Shawcroft @ 2014-06-02 13:45 UTC (permalink / raw) To: Martin Storsjo, binutils On 29/05/14 18:58, Martin Storsjo wrote: > The syntax described, including a leading '#', was not supported > in practice. (For :lo12: it is optional.) > --- > Removed the # from the declaration of :lo12: as well - the > '#' isn't a part of the :lo12: prefix itself but is part of how > the symbol is used in the instruction. > --- > gas/doc/c-aarch64.texi | 10 +++++----- > 1 file changed, 5 insertions(+), 5 deletions(-) > > diff --git a/gas/doc/c-aarch64.texi b/gas/doc/c-aarch64.texi > index cce4f61..3d84123 100644 > --- a/gas/doc/c-aarch64.texi > +++ b/gas/doc/c-aarch64.texi > @@ -186,24 +186,24 @@ For example to load the 48-bit absolute address of @var{foo} into x0: > @cindex ADRP, ADD, LDR/STR group relocations, AArch64 > Relocations for @samp{ADRP}, and @samp{ADD}, @samp{LDR} or @samp{STR} > instructions can be generated by prefixing the label with > -@samp{#:pg_hi21:} and @samp{#:lo12:} respectively. > +@samp{:pg_hi21:} and @samp{:lo12:} respectively. > > For example to use 33-bit (+/-4GB) pc-relative addressing to > load the address of @var{foo} into x0: > > @smallexample > - adrp x0, #:pg_hi21:foo > + adrp x0, :pg_hi21:foo > add x0, x0, #:lo12:foo > @end smallexample > > Or to load the value of @var{foo} into x0: > > @smallexample > - adrp x0, #:pg_hi21:foo > + adrp x0, :pg_hi21:foo > ldr x0, [x0, #:lo12:foo] > @end smallexample > > -Note that @samp{#:pg_hi21:} is optional. > +Note that @samp{:pg_hi21:} is optional. > > @smallexample > adrp x0, foo > @@ -212,7 +212,7 @@ Note that @samp{#:pg_hi21:} is optional. > is equivalent to > > @smallexample > - adrp x0, #:pg_hi21:foo > + adrp x0, :pg_hi21:foo > @end smallexample > > @node AArch64 Floating Point > OK with an appropriate ChangeLog entry. /Marcus ^ permalink raw reply [flat|nested] 14+ messages in thread
* [PATCH] aarch64: Fix the documentation on :pg_hi21: 2014-06-02 13:45 ` Marcus Shawcroft @ 2014-06-02 19:31 ` Martin Storsjo 2014-06-03 20:20 ` Martin Storsjö 0 siblings, 1 reply; 14+ messages in thread From: Martin Storsjo @ 2014-06-02 19:31 UTC (permalink / raw) To: binutils; +Cc: Marcus Shawcroft The syntax described, including a leading '#', was not supported in practice. (For :lo12: it is optional.) --- Added a ChangeLog entry. --- gas/ChangeLog | 4 ++++ gas/doc/c-aarch64.texi | 10 +++++----- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/gas/ChangeLog b/gas/ChangeLog index 98186d3..911511e 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,7 @@ +2014-06-02 Martin Storsjo <martin@martin.st> + + * doc/c-aarch64.texi: Fix the documentation on :pg_hi21:. + 2014-05-22 Alan Modra <amodra@gmail.com> * listing.c (listing_warning, listing_error): Add space after colon. diff --git a/gas/doc/c-aarch64.texi b/gas/doc/c-aarch64.texi index cce4f61..3d84123 100644 --- a/gas/doc/c-aarch64.texi +++ b/gas/doc/c-aarch64.texi @@ -186,24 +186,24 @@ For example to load the 48-bit absolute address of @var{foo} into x0: @cindex ADRP, ADD, LDR/STR group relocations, AArch64 Relocations for @samp{ADRP}, and @samp{ADD}, @samp{LDR} or @samp{STR} instructions can be generated by prefixing the label with -@samp{#:pg_hi21:} and @samp{#:lo12:} respectively. +@samp{:pg_hi21:} and @samp{:lo12:} respectively. For example to use 33-bit (+/-4GB) pc-relative addressing to load the address of @var{foo} into x0: @smallexample - adrp x0, #:pg_hi21:foo + adrp x0, :pg_hi21:foo add x0, x0, #:lo12:foo @end smallexample Or to load the value of @var{foo} into x0: @smallexample - adrp x0, #:pg_hi21:foo + adrp x0, :pg_hi21:foo ldr x0, [x0, #:lo12:foo] @end smallexample -Note that @samp{#:pg_hi21:} is optional. +Note that @samp{:pg_hi21:} is optional. @smallexample adrp x0, foo @@ -212,7 +212,7 @@ Note that @samp{#:pg_hi21:} is optional. is equivalent to @smallexample - adrp x0, #:pg_hi21:foo + adrp x0, :pg_hi21:foo @end smallexample @node AArch64 Floating Point -- 1.8.5.2 (Apple Git-48) ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH] aarch64: Fix the documentation on :pg_hi21: 2014-06-02 19:31 ` Martin Storsjo @ 2014-06-03 20:20 ` Martin Storsjö 2014-06-05 20:37 ` Martin Storsjö 2014-06-06 10:10 ` Richard Earnshaw 0 siblings, 2 replies; 14+ messages in thread From: Martin Storsjö @ 2014-06-03 20:20 UTC (permalink / raw) To: binutils; +Cc: Marcus Shawcroft On Mon, 2 Jun 2014, Martin Storsjo wrote: > The syntax described, including a leading '#', was not supported > in practice. (For :lo12: it is optional.) > --- > Added a ChangeLog entry. > --- > gas/ChangeLog | 4 ++++ > gas/doc/c-aarch64.texi | 10 +++++----- > 2 files changed, 9 insertions(+), 5 deletions(-) > > diff --git a/gas/ChangeLog b/gas/ChangeLog > index 98186d3..911511e 100644 > --- a/gas/ChangeLog > +++ b/gas/ChangeLog > @@ -1,3 +1,7 @@ > +2014-06-02 Martin Storsjo <martin@martin.st> > + > + * doc/c-aarch64.texi: Fix the documentation on :pg_hi21:. > + > 2014-05-22 Alan Modra <amodra@gmail.com> > > * listing.c (listing_warning, listing_error): Add space after colon. > diff --git a/gas/doc/c-aarch64.texi b/gas/doc/c-aarch64.texi > index cce4f61..3d84123 100644 > --- a/gas/doc/c-aarch64.texi > +++ b/gas/doc/c-aarch64.texi > @@ -186,24 +186,24 @@ For example to load the 48-bit absolute address of @var{foo} into x0: > @cindex ADRP, ADD, LDR/STR group relocations, AArch64 > Relocations for @samp{ADRP}, and @samp{ADD}, @samp{LDR} or @samp{STR} > instructions can be generated by prefixing the label with > -@samp{#:pg_hi21:} and @samp{#:lo12:} respectively. > +@samp{:pg_hi21:} and @samp{:lo12:} respectively. > > For example to use 33-bit (+/-4GB) pc-relative addressing to > load the address of @var{foo} into x0: > > @smallexample > - adrp x0, #:pg_hi21:foo > + adrp x0, :pg_hi21:foo > add x0, x0, #:lo12:foo > @end smallexample > > Or to load the value of @var{foo} into x0: > > @smallexample > - adrp x0, #:pg_hi21:foo > + adrp x0, :pg_hi21:foo > ldr x0, [x0, #:lo12:foo] > @end smallexample > > -Note that @samp{#:pg_hi21:} is optional. > +Note that @samp{:pg_hi21:} is optional. > > @smallexample > adrp x0, foo > @@ -212,7 +212,7 @@ Note that @samp{#:pg_hi21:} is optional. > is equivalent to > > @smallexample > - adrp x0, #:pg_hi21:foo > + adrp x0, :pg_hi21:foo > @end smallexample > > @node AArch64 Floating Point > -- > 1.8.5.2 (Apple Git-48) Can someone apply and push this one? It was approved by Marcus yesterday, but since I can't push it myself, the ChangeLog has gotten another conflicting entry now - so whoever applies it will have to fix it up. (I won't try to send a new resolved patch because someone else will probably touch the ChangeLog inbetween again, before someone gets to pushing it.) // Martin ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH] aarch64: Fix the documentation on :pg_hi21: 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 1 sibling, 1 reply; 14+ messages in thread From: Martin Storsjö @ 2014-06-05 20:37 UTC (permalink / raw) To: binutils; +Cc: Marcus Shawcroft [-- Attachment #1: Type: TEXT/PLAIN, Size: 2758 bytes --] Hi Marcus and Yufeng, On Tue, 3 Jun 2014, Martin Storsjö wrote: > On Mon, 2 Jun 2014, Martin Storsjo wrote: > >> The syntax described, including a leading '#', was not supported >> in practice. (For :lo12: it is optional.) >> --- >> Added a ChangeLog entry. >> --- >> gas/ChangeLog | 4 ++++ >> gas/doc/c-aarch64.texi | 10 +++++----- >> 2 files changed, 9 insertions(+), 5 deletions(-) >> >> diff --git a/gas/ChangeLog b/gas/ChangeLog >> index 98186d3..911511e 100644 >> --- a/gas/ChangeLog >> +++ b/gas/ChangeLog >> @@ -1,3 +1,7 @@ >> +2014-06-02 Martin Storsjo <martin@martin.st> >> + >> + * doc/c-aarch64.texi: Fix the documentation on :pg_hi21:. >> + >> 2014-05-22 Alan Modra <amodra@gmail.com> >> >> * listing.c (listing_warning, listing_error): Add space after colon. >> diff --git a/gas/doc/c-aarch64.texi b/gas/doc/c-aarch64.texi >> index cce4f61..3d84123 100644 >> --- a/gas/doc/c-aarch64.texi >> +++ b/gas/doc/c-aarch64.texi >> @@ -186,24 +186,24 @@ For example to load the 48-bit absolute address of >> @var{foo} into x0: >> @cindex ADRP, ADD, LDR/STR group relocations, AArch64 >> Relocations for @samp{ADRP}, and @samp{ADD}, @samp{LDR} or @samp{STR} >> instructions can be generated by prefixing the label with >> -@samp{#:pg_hi21:} and @samp{#:lo12:} respectively. >> +@samp{:pg_hi21:} and @samp{:lo12:} respectively. >> >> For example to use 33-bit (+/-4GB) pc-relative addressing to >> load the address of @var{foo} into x0: >> >> @smallexample >> - adrp x0, #:pg_hi21:foo >> + adrp x0, :pg_hi21:foo >> add x0, x0, #:lo12:foo >> @end smallexample >> >> Or to load the value of @var{foo} into x0: >> >> @smallexample >> - adrp x0, #:pg_hi21:foo >> + adrp x0, :pg_hi21:foo >> ldr x0, [x0, #:lo12:foo] >> @end smallexample >> >> -Note that @samp{#:pg_hi21:} is optional. >> +Note that @samp{:pg_hi21:} is optional. >> >> @smallexample >> adrp x0, foo >> @@ -212,7 +212,7 @@ Note that @samp{#:pg_hi21:} is optional. >> is equivalent to >> >> @smallexample >> - adrp x0, #:pg_hi21:foo >> + adrp x0, :pg_hi21:foo >> @end smallexample >> >> @node AArch64 Floating Point >> -- >> 1.8.5.2 (Apple Git-48) > > Can someone apply and push this one? It was approved by Marcus yesterday, but > since I can't push it myself, the ChangeLog has gotten another conflicting > entry now - so whoever applies it will have to fix it up. (I won't try to > send a new resolved patch because someone else will probably touch the > ChangeLog inbetween again, before someone gets to pushing it.) Ping - can either of you (or someone else with commit access) apply and push this approved patch? I obviously can't do it myself since I don't have push access. // Martin ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH] aarch64: Fix the documentation on :pg_hi21: 2014-06-05 20:37 ` Martin Storsjö @ 2014-06-06 6:30 ` Marcus Shawcroft 0 siblings, 0 replies; 14+ messages in thread From: Marcus Shawcroft @ 2014-06-06 6:30 UTC (permalink / raw) To: Martin Storsjö; +Cc: binutils, Marcus Shawcroft On 5 June 2014 21:37, Martin Storsjö <martin@martin.st> wrote: > Hi Marcus and Yufeng, > Ping - can either of you (or someone else with commit access) apply and push > this approved patch? I obviously can't do it myself since I don't have push > access. Pushed. Cheers /Marcus ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH] aarch64: Fix the documentation on :pg_hi21: 2014-06-03 20:20 ` Martin Storsjö 2014-06-05 20:37 ` Martin Storsjö @ 2014-06-06 10:10 ` Richard Earnshaw 2014-06-06 10:18 ` Martin Storsjö 1 sibling, 1 reply; 14+ messages in thread From: Richard Earnshaw @ 2014-06-06 10:10 UTC (permalink / raw) To: Martin Storsjö; +Cc: binutils, Marcus Shawcroft On 03/06/14 21:20, Martin Storsjö wrote: > On Mon, 2 Jun 2014, Martin Storsjo wrote: > >> The syntax described, including a leading '#', was not supported >> in practice. (For :lo12: it is optional.) >> --- >> Added a ChangeLog entry. >> --- >> gas/ChangeLog | 4 ++++ >> gas/doc/c-aarch64.texi | 10 +++++----- >> 2 files changed, 9 insertions(+), 5 deletions(-) >> >> diff --git a/gas/ChangeLog b/gas/ChangeLog >> index 98186d3..911511e 100644 >> --- a/gas/ChangeLog >> +++ b/gas/ChangeLog >> @@ -1,3 +1,7 @@ >> +2014-06-02 Martin Storsjo <martin@martin.st> >> + >> + * doc/c-aarch64.texi: Fix the documentation on :pg_hi21:. >> + >> 2014-05-22 Alan Modra <amodra@gmail.com> >> >> * listing.c (listing_warning, listing_error): Add space after colon. >> diff --git a/gas/doc/c-aarch64.texi b/gas/doc/c-aarch64.texi >> index cce4f61..3d84123 100644 >> --- a/gas/doc/c-aarch64.texi >> +++ b/gas/doc/c-aarch64.texi >> @@ -186,24 +186,24 @@ For example to load the 48-bit absolute address of @var{foo} into x0: >> @cindex ADRP, ADD, LDR/STR group relocations, AArch64 >> Relocations for @samp{ADRP}, and @samp{ADD}, @samp{LDR} or @samp{STR} >> instructions can be generated by prefixing the label with >> -@samp{#:pg_hi21:} and @samp{#:lo12:} respectively. >> +@samp{:pg_hi21:} and @samp{:lo12:} respectively. >> >> For example to use 33-bit (+/-4GB) pc-relative addressing to >> load the address of @var{foo} into x0: >> >> @smallexample >> - adrp x0, #:pg_hi21:foo >> + adrp x0, :pg_hi21:foo >> add x0, x0, #:lo12:foo >> @end smallexample >> >> Or to load the value of @var{foo} into x0: >> >> @smallexample >> - adrp x0, #:pg_hi21:foo >> + adrp x0, :pg_hi21:foo >> ldr x0, [x0, #:lo12:foo] >> @end smallexample >> >> -Note that @samp{#:pg_hi21:} is optional. >> +Note that @samp{:pg_hi21:} is optional. >> >> @smallexample >> adrp x0, foo >> @@ -212,7 +212,7 @@ Note that @samp{#:pg_hi21:} is optional. >> is equivalent to >> >> @smallexample >> - adrp x0, #:pg_hi21:foo >> + adrp x0, :pg_hi21:foo >> @end smallexample >> >> @node AArch64 Floating Point >> -- >> 1.8.5.2 (Apple Git-48) > > Can someone apply and push this one? It was approved by Marcus yesterday, > but since I can't push it myself, the ChangeLog has gotten another > conflicting entry now - so whoever applies it will have to fix it up. (I > won't try to send a new resolved patch because someone else will probably > touch the ChangeLog inbetween again, before someone gets to pushing it.) > This is why we ask for ChangeLog entries to not be sent as patches. It's far easier to paste <date> Martin Storsjo <martin@martin.st> * doc/c-aarch64.texi: Fix the documentation on :pg_hi21:. directly into the ChangeLog file (inserting the correct date) when preparing the patch for upload than to resolve the conflicts that occur when trying to apply a conflicting diff. The date is the date the patch is applied, not the date you posted it, so it will most likely have to be fixed up anyway. R. ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH] aarch64: Fix the documentation on :pg_hi21: 2014-06-06 10:10 ` Richard Earnshaw @ 2014-06-06 10:18 ` Martin Storsjö 2014-06-06 10:22 ` Richard Earnshaw 0 siblings, 1 reply; 14+ messages in thread From: Martin Storsjö @ 2014-06-06 10:18 UTC (permalink / raw) To: Richard Earnshaw; +Cc: binutils, Marcus Shawcroft [-- Attachment #1: Type: TEXT/PLAIN, Size: 3317 bytes --] On Fri, 6 Jun 2014, Richard Earnshaw wrote: > On 03/06/14 21:20, Martin Storsjö wrote: >> On Mon, 2 Jun 2014, Martin Storsjo wrote: >> >>> The syntax described, including a leading '#', was not supported >>> in practice. (For :lo12: it is optional.) >>> --- >>> Added a ChangeLog entry. >>> --- >>> gas/ChangeLog | 4 ++++ >>> gas/doc/c-aarch64.texi | 10 +++++----- >>> 2 files changed, 9 insertions(+), 5 deletions(-) >>> >>> diff --git a/gas/ChangeLog b/gas/ChangeLog >>> index 98186d3..911511e 100644 >>> --- a/gas/ChangeLog >>> +++ b/gas/ChangeLog >>> @@ -1,3 +1,7 @@ >>> +2014-06-02 Martin Storsjo <martin@martin.st> >>> + >>> + * doc/c-aarch64.texi: Fix the documentation on :pg_hi21:. >>> + >>> 2014-05-22 Alan Modra <amodra@gmail.com> >>> >>> * listing.c (listing_warning, listing_error): Add space after colon. >>> diff --git a/gas/doc/c-aarch64.texi b/gas/doc/c-aarch64.texi >>> index cce4f61..3d84123 100644 >>> --- a/gas/doc/c-aarch64.texi >>> +++ b/gas/doc/c-aarch64.texi >>> @@ -186,24 +186,24 @@ For example to load the 48-bit absolute address of @var{foo} into x0: >>> @cindex ADRP, ADD, LDR/STR group relocations, AArch64 >>> Relocations for @samp{ADRP}, and @samp{ADD}, @samp{LDR} or @samp{STR} >>> instructions can be generated by prefixing the label with >>> -@samp{#:pg_hi21:} and @samp{#:lo12:} respectively. >>> +@samp{:pg_hi21:} and @samp{:lo12:} respectively. >>> >>> For example to use 33-bit (+/-4GB) pc-relative addressing to >>> load the address of @var{foo} into x0: >>> >>> @smallexample >>> - adrp x0, #:pg_hi21:foo >>> + adrp x0, :pg_hi21:foo >>> add x0, x0, #:lo12:foo >>> @end smallexample >>> >>> Or to load the value of @var{foo} into x0: >>> >>> @smallexample >>> - adrp x0, #:pg_hi21:foo >>> + adrp x0, :pg_hi21:foo >>> ldr x0, [x0, #:lo12:foo] >>> @end smallexample >>> >>> -Note that @samp{#:pg_hi21:} is optional. >>> +Note that @samp{:pg_hi21:} is optional. >>> >>> @smallexample >>> adrp x0, foo >>> @@ -212,7 +212,7 @@ Note that @samp{#:pg_hi21:} is optional. >>> is equivalent to >>> >>> @smallexample >>> - adrp x0, #:pg_hi21:foo >>> + adrp x0, :pg_hi21:foo >>> @end smallexample >>> >>> @node AArch64 Floating Point >>> -- >>> 1.8.5.2 (Apple Git-48) >> >> Can someone apply and push this one? It was approved by Marcus yesterday, >> but since I can't push it myself, the ChangeLog has gotten another >> conflicting entry now - so whoever applies it will have to fix it up. (I >> won't try to send a new resolved patch because someone else will probably >> touch the ChangeLog inbetween again, before someone gets to pushing it.) >> > > This is why we ask for ChangeLog entries to not be sent as patches. > It's far easier to paste > > <date> Martin Storsjo <martin@martin.st> > > * doc/c-aarch64.texi: Fix the documentation on :pg_hi21:. > > directly into the ChangeLog file (inserting the correct date) when > preparing the patch for upload than to resolve the conflicts that occur > when trying to apply a conflicting diff. The date is the date the patch > is applied, not the date you posted it, so it will most likely have to > be fixed up anyway. I see, thanks. (Is this convention documented somewhere?) I'll keep it in mind when/if I end up posting more patches. // Martin ^ permalink raw reply [flat|nested] 14+ messages in thread
* Re: [PATCH] aarch64: Fix the documentation on :pg_hi21: 2014-06-06 10:18 ` Martin Storsjö @ 2014-06-06 10:22 ` Richard Earnshaw 0 siblings, 0 replies; 14+ messages in thread From: Richard Earnshaw @ 2014-06-06 10:22 UTC (permalink / raw) To: Martin Storsjö; +Cc: binutils, Marcus Shawcroft On 06/06/14 11:17, Martin Storsjö wrote: > On Fri, 6 Jun 2014, Richard Earnshaw wrote: > >> On 03/06/14 21:20, Martin Storsjö wrote: >>> On Mon, 2 Jun 2014, Martin Storsjo wrote: >>> >>>> The syntax described, including a leading '#', was not supported >>>> in practice. (For :lo12: it is optional.) >>>> --- >>>> Added a ChangeLog entry. >>>> --- >>>> gas/ChangeLog | 4 ++++ >>>> gas/doc/c-aarch64.texi | 10 +++++----- >>>> 2 files changed, 9 insertions(+), 5 deletions(-) >>>> >>>> diff --git a/gas/ChangeLog b/gas/ChangeLog >>>> index 98186d3..911511e 100644 >>>> --- a/gas/ChangeLog >>>> +++ b/gas/ChangeLog >>>> @@ -1,3 +1,7 @@ >>>> +2014-06-02 Martin Storsjo <martin@martin.st> >>>> + >>>> + * doc/c-aarch64.texi: Fix the documentation on :pg_hi21:. >>>> + >>>> 2014-05-22 Alan Modra <amodra@gmail.com> >>>> >>>> * listing.c (listing_warning, listing_error): Add space after colon. >>>> diff --git a/gas/doc/c-aarch64.texi b/gas/doc/c-aarch64.texi >>>> index cce4f61..3d84123 100644 >>>> --- a/gas/doc/c-aarch64.texi >>>> +++ b/gas/doc/c-aarch64.texi >>>> @@ -186,24 +186,24 @@ For example to load the 48-bit absolute address of @var{foo} into x0: >>>> @cindex ADRP, ADD, LDR/STR group relocations, AArch64 >>>> Relocations for @samp{ADRP}, and @samp{ADD}, @samp{LDR} or @samp{STR} >>>> instructions can be generated by prefixing the label with >>>> -@samp{#:pg_hi21:} and @samp{#:lo12:} respectively. >>>> +@samp{:pg_hi21:} and @samp{:lo12:} respectively. >>>> >>>> For example to use 33-bit (+/-4GB) pc-relative addressing to >>>> load the address of @var{foo} into x0: >>>> >>>> @smallexample >>>> - adrp x0, #:pg_hi21:foo >>>> + adrp x0, :pg_hi21:foo >>>> add x0, x0, #:lo12:foo >>>> @end smallexample >>>> >>>> Or to load the value of @var{foo} into x0: >>>> >>>> @smallexample >>>> - adrp x0, #:pg_hi21:foo >>>> + adrp x0, :pg_hi21:foo >>>> ldr x0, [x0, #:lo12:foo] >>>> @end smallexample >>>> >>>> -Note that @samp{#:pg_hi21:} is optional. >>>> +Note that @samp{:pg_hi21:} is optional. >>>> >>>> @smallexample >>>> adrp x0, foo >>>> @@ -212,7 +212,7 @@ Note that @samp{#:pg_hi21:} is optional. >>>> is equivalent to >>>> >>>> @smallexample >>>> - adrp x0, #:pg_hi21:foo >>>> + adrp x0, :pg_hi21:foo >>>> @end smallexample >>>> >>>> @node AArch64 Floating Point >>>> -- >>>> 1.8.5.2 (Apple Git-48) >>> >>> Can someone apply and push this one? It was approved by Marcus yesterday, >>> but since I can't push it myself, the ChangeLog has gotten another >>> conflicting entry now - so whoever applies it will have to fix it up. (I >>> won't try to send a new resolved patch because someone else will probably >>> touch the ChangeLog inbetween again, before someone gets to pushing it.) >>> >> >> This is why we ask for ChangeLog entries to not be sent as patches. >> It's far easier to paste >> >> <date> Martin Storsjo <martin@martin.st> >> >> * doc/c-aarch64.texi: Fix the documentation on :pg_hi21:. >> >> directly into the ChangeLog file (inserting the correct date) when >> preparing the patch for upload than to resolve the conflicts that occur >> when trying to apply a conflicting diff. The date is the date the patch >> is applied, not the date you posted it, so it will most likely have to >> be fixed up anyway. > > I see, thanks. (Is this convention documented somewhere?) I'll keep it in > mind when/if I end up posting more patches. > > // Martin > I don't know about binutils, but for GCC it is explicitly stated here: https://gcc.gnu.org/contribute.html#patches R. ^ permalink raw reply [flat|nested] 14+ messages in thread
end of thread, other threads:[~2014-06-06 10:22 UTC | newest] Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 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 ` [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ö 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
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).