public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* [PATCH] gas/NEWS, ld/NEWS: Announce LoongArch changes in 2.42
@ 2024-01-22 19:14 Xi Ruoyao
  2024-01-23  3:56 ` mengqinggang
  0 siblings, 1 reply; 9+ messages in thread
From: Xi Ruoyao @ 2024-01-22 19:14 UTC (permalink / raw)
  To: binutils; +Cc: mengqinggang, Nick Clifton, Xi Ruoyao, WANG Xuerui

The change is self-explained, no more commit message :).

Co-authored-by: WANG Xuerui <git@xen0n.name>
Signed-off-by: Xi Ruoyao <xry111@xry111.site>
---

Nick: this is obviously for 2.42...  Sorry for sending it after the
branching, we were just too focused on "code changes" :(.

 gas/NEWS | 31 +++++++++++++++++++++++++++++++
 ld/NEWS  | 11 +++++++++++
 2 files changed, 42 insertions(+)

diff --git a/gas/NEWS b/gas/NEWS
index cf4e8ff7c95..8078a8dd2af 100644
--- a/gas/NEWS
+++ b/gas/NEWS
@@ -66,6 +66,37 @@ Changes in 2.42:
 * The BPF assembler now allows using both hash (#) and double slash (//) to
   begin line comments.
 
+* Add support for LoongArch v1.10 new instructions: estimated reciprocal
+  instructions, sub-word atomic instructions, atomic CAS instructions,
+  16-byte store-conditional instruction, load-linked instructions with
+  acquire semantics, and store-conditional instructions with release
+  semantics.
+
+* The %call36 relocation operator, along with the pseudo-instructions
+  call36 and tail36, are now usable with the LoongArch "medium" code
+  model, allowing text sections up to 128 GiB.
+
+* TLS descriptors (TLSDESC) are now supported on LoongArch. This includes
+  the following new relocation operators: %desc_pc_hi20, %desc_pc_lo12,
+  %desc_ld, and %desc_call, and the la.tls.desc pseudo-instruction.
+
+* TLS LE relaxation is now supported on LoongArch. New relocation
+  operators %le_hi20_r, %le_lo12r, and %le_add_r are now available, with
+  la.tls.le now making use of them.
+
+* Add support for LoongArch branch relaxation: a conditional branch with
+  destination out of its immediate operand range, but still within
+  a "b"'s range, is now assembled as an inverted branch and a "b". This
+  works around the unreliable branch offset estimation of the compiler
+  when .align directive is encoded into a long NOP sequence with an
+  R_LARCH_RELAX by the assembler.
+
+* Add support for encoding three-expression .align directives on LoongArch
+  with R_LARCH_ALIGN.
+
+* Symbol or label names in LoongArch assembly can now be spelled with
+  double-quotes.
+
 Changes in 2.41:
 
 * Add support for the KVX instruction set.
diff --git a/ld/NEWS b/ld/NEWS
index c3ebe320e5e..a5a5b9faee2 100644
--- a/ld/NEWS
+++ b/ld/NEWS
@@ -29,6 +29,17 @@ Changes in 2.42:
   --enable-error-rwx-segments=[yes|no] configure options to set the default for
   converting warnings into errors.
 
+* On LoongArch, various linker relaxation bugs are fixed; the most notable
+  of which is BZ 30944 (incorrect .balign semantics).
+
+* On LoongArch, the LoongArch ABI v2.30 (LoongArch ELF psABI v20231219) is
+  now implemented. This includes new relocation types, and changed
+  semantics for PC-relative relocations handling the higher half of 64-bit
+  offsets.
+
+* On LoongArch, link-time TLS optimization and TLS relaxation are now
+  supported.
+
 Changes in 2.41:
 
 * The linker now accepts a command line option of --remap-inputs
-- 
2.43.0


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] gas/NEWS, ld/NEWS: Announce LoongArch changes in 2.42
  2024-01-22 19:14 [PATCH] gas/NEWS, ld/NEWS: Announce LoongArch changes in 2.42 Xi Ruoyao
@ 2024-01-23  3:56 ` mengqinggang
  2024-01-23  8:35   ` Xi Ruoyao
  0 siblings, 1 reply; 9+ messages in thread
From: mengqinggang @ 2024-01-23  3:56 UTC (permalink / raw)
  To: Xi Ruoyao, binutils; +Cc: Nick Clifton, WANG Xuerui


在 2024/1/23 上午3:14, Xi Ruoyao 写道:
> The change is self-explained, no more commit message :).
>
> Co-authored-by: WANG Xuerui <git@xen0n.name>
> Signed-off-by: Xi Ruoyao <xry111@xry111.site>
> ---
>
> Nick: this is obviously for 2.42...  Sorry for sending it after the
> branching, we were just too focused on "code changes" :(.
>
>   gas/NEWS | 31 +++++++++++++++++++++++++++++++
>   ld/NEWS  | 11 +++++++++++
>   2 files changed, 42 insertions(+)
>
> diff --git a/gas/NEWS b/gas/NEWS
> index cf4e8ff7c95..8078a8dd2af 100644
> --- a/gas/NEWS
> +++ b/gas/NEWS
> @@ -66,6 +66,37 @@ Changes in 2.42:
>   * The BPF assembler now allows using both hash (#) and double slash (//) to
>     begin line comments.
>   
> +* Add support for LoongArch v1.10 new instructions: estimated reciprocal
> +  instructions, sub-word atomic instructions, atomic CAS instructions,
> +  16-byte store-conditional instruction, load-linked instructions with
> +  acquire semantics, and store-conditional instructions with release
> +  semantics.
> +
> +* The %call36 relocation operator, along with the pseudo-instructions
> +  call36 and tail36, are now usable with the LoongArch "medium" code
> +  model, allowing text sections up to 128 GiB.
> +
> +* TLS descriptors (TLSDESC) are now supported on LoongArch. This includes
> +  the following new relocation operators: %desc_pc_hi20, %desc_pc_lo12,
> +  %desc_ld, and %desc_call, and the la.tls.desc pseudo-instruction.
> +
> +* TLS LE relaxation is now supported on LoongArch. New relocation
> +  operators %le_hi20_r, %le_lo12r, and %le_add_r are now available, with
> +  la.tls.le now making use of them.


la.tls.le still expands to the old instruction sequences.  Gcc generates 
new TLS LE
instruction sequences when -mexplicit-relocs=[always,auto].


> +
> +* Add support for LoongArch branch relaxation: a conditional branch with
> +  destination out of its immediate operand range, but still within
> +  a "b"'s range, is now assembled as an inverted branch and a "b". This
> +  works around the unreliable branch offset estimation of the compiler
> +  when .align directive is encoded into a long NOP sequence with an
> +  R_LARCH_RELAX by the assembler.
> +
> +* Add support for encoding three-expression .align directives on LoongArch
> +  with R_LARCH_ALIGN.


R_LARCH_ALIGN only supports the first and the third expressions of .align.


> +
> +* Symbol or label names in LoongArch assembly can now be spelled with
> +  double-quotes.
> +
>   Changes in 2.41:
>   
>   * Add support for the KVX instruction set.
> diff --git a/ld/NEWS b/ld/NEWS
> index c3ebe320e5e..a5a5b9faee2 100644
> --- a/ld/NEWS
> +++ b/ld/NEWS
> @@ -29,6 +29,17 @@ Changes in 2.42:
>     --enable-error-rwx-segments=[yes|no] configure options to set the default for
>     converting warnings into errors.
>   
> +* On LoongArch, various linker relaxation bugs are fixed; the most notable
> +  of which is BZ 30944 (incorrect .balign semantics).
> +
> +* On LoongArch, the LoongArch ABI v2.30 (LoongArch ELF psABI v20231219) is
> +  now implemented. This includes new relocation types, and changed
> +  semantics for PC-relative relocations handling the higher half of 64-bit
> +  offsets.
> +
> +* On LoongArch, link-time TLS optimization and TLS relaxation are now
> +  supported.
> +
>   Changes in 2.41:
>   
>   * The linker now accepts a command line option of --remap-inputs


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] gas/NEWS, ld/NEWS: Announce LoongArch changes in 2.42
  2024-01-23  3:56 ` mengqinggang
@ 2024-01-23  8:35   ` Xi Ruoyao
  2024-01-23 11:08     ` Nick Clifton
  2024-01-24  3:24     ` [PATCH] " mengqinggang
  0 siblings, 2 replies; 9+ messages in thread
From: Xi Ruoyao @ 2024-01-23  8:35 UTC (permalink / raw)
  To: mengqinggang, binutils; +Cc: Nick Clifton, WANG Xuerui

On Tue, 2024-01-23 at 11:56 +0800, mengqinggang wrote:

> > +* TLS LE relaxation is now supported on LoongArch. New relocation
> > +  operators %le_hi20_r, %le_lo12r, and %le_add_r are now available, with
> > +  la.tls.le now making use of them.
> 
> 
> la.tls.le still expands to the old instruction sequences.  Gcc generates 
> new TLS LE
> instruction sequences when -mexplicit-relocs=[always,auto].

Indeed, I'll remove the last sentence.

> > +* Add support for encoding three-expression .align directives on LoongArch
> > +  with R_LARCH_ALIGN.
> 
> 
> R_LARCH_ALIGN only supports the first and the third expressions of .align.

Hmm, using something like .align 16,,4 now triggers a warning, so I'll
remove this paragraph and rather not announce this change to users now.
In the next release we may turn the warning off by default or support
the second expression (?).

-- 
Xi Ruoyao <xry111@xry111.site>
School of Aerospace Science and Technology, Xidian University

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] gas/NEWS, ld/NEWS: Announce LoongArch changes in 2.42
  2024-01-23  8:35   ` Xi Ruoyao
@ 2024-01-23 11:08     ` Nick Clifton
  2024-01-23 11:12       ` [PATCH v2] " Xi Ruoyao
  2024-01-24  3:24     ` [PATCH] " mengqinggang
  1 sibling, 1 reply; 9+ messages in thread
From: Nick Clifton @ 2024-01-23 11:08 UTC (permalink / raw)
  To: Xi Ruoyao, mengqinggang, binutils; +Cc: WANG Xuerui

Hi Xi,

   Ok, so an updated patch to add NEWS entries is approved for the 2.42 branch.

Cheers
   Nick


^ permalink raw reply	[flat|nested] 9+ messages in thread

* [PATCH v2] gas/NEWS, ld/NEWS: Announce LoongArch changes in 2.42
  2024-01-23 11:08     ` Nick Clifton
@ 2024-01-23 11:12       ` Xi Ruoyao
  2024-01-23 11:28         ` Nick Clifton
  0 siblings, 1 reply; 9+ messages in thread
From: Xi Ruoyao @ 2024-01-23 11:12 UTC (permalink / raw)
  To: binutils; +Cc: mengqinggang, Nick Clifton, Xi Ruoyao, WANG Xuerui

The change is self-explained, no more commit message :).

Co-authored-by: WANG Xuerui <git@xen0n.name>
Signed-off-by: Xi Ruoyao <xry111@xry111.site>
---

v1 -> v2:
- Do not falsely claim la.tls.le supported relax.
- Do not mention 3-operand .align directive support because it only
  supports an empty 2nd operand with a warning as at now.

 gas/NEWS | 27 +++++++++++++++++++++++++++
 ld/NEWS  | 11 +++++++++++
 2 files changed, 38 insertions(+)

diff --git a/gas/NEWS b/gas/NEWS
index cf4e8ff7c95..d717a430127 100644
--- a/gas/NEWS
+++ b/gas/NEWS
@@ -66,6 +66,33 @@ Changes in 2.42:
 * The BPF assembler now allows using both hash (#) and double slash (//) to
   begin line comments.
 
+* Add support for LoongArch v1.10 new instructions: estimated reciprocal
+  instructions, sub-word atomic instructions, atomic CAS instructions,
+  16-byte store-conditional instruction, load-linked instructions with
+  acquire semantics, and store-conditional instructions with release
+  semantics.
+
+* The %call36 relocation operator, along with the pseudo-instructions
+  call36 and tail36, are now usable with the LoongArch "medium" code
+  model, allowing text sections up to 128 GiB.
+
+* TLS descriptors (TLSDESC) are now supported on LoongArch. This includes
+  the following new relocation operators: %desc_pc_hi20, %desc_pc_lo12,
+  %desc_ld, and %desc_call, and the la.tls.desc pseudo-instruction.
+
+* TLS LE relaxation is now supported on LoongArch. New relocation
+  operators %le_hi20_r, %le_lo12r, and %le_add_r are now available.
+
+* Add support for LoongArch branch relaxation: a conditional branch with
+  destination out of its immediate operand range, but still within
+  a "b"'s range, is now assembled as an inverted branch and a "b". This
+  works around the unreliable branch offset estimation of the compiler
+  when .align directive is encoded into a long NOP sequence with an
+  R_LARCH_RELAX by the assembler.
+
+* Symbol or label names in LoongArch assembly can now be spelled with
+  double-quotes.
+
 Changes in 2.41:
 
 * Add support for the KVX instruction set.
diff --git a/ld/NEWS b/ld/NEWS
index c3ebe320e5e..a5a5b9faee2 100644
--- a/ld/NEWS
+++ b/ld/NEWS
@@ -29,6 +29,17 @@ Changes in 2.42:
   --enable-error-rwx-segments=[yes|no] configure options to set the default for
   converting warnings into errors.
 
+* On LoongArch, various linker relaxation bugs are fixed; the most notable
+  of which is BZ 30944 (incorrect .balign semantics).
+
+* On LoongArch, the LoongArch ABI v2.30 (LoongArch ELF psABI v20231219) is
+  now implemented. This includes new relocation types, and changed
+  semantics for PC-relative relocations handling the higher half of 64-bit
+  offsets.
+
+* On LoongArch, link-time TLS optimization and TLS relaxation are now
+  supported.
+
 Changes in 2.41:
 
 * The linker now accepts a command line option of --remap-inputs
-- 
2.43.0


^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH v2] gas/NEWS, ld/NEWS: Announce LoongArch changes in 2.42
  2024-01-23 11:12       ` [PATCH v2] " Xi Ruoyao
@ 2024-01-23 11:28         ` Nick Clifton
  2024-01-23 12:38           ` Xi Ruoyao
  0 siblings, 1 reply; 9+ messages in thread
From: Nick Clifton @ 2024-01-23 11:28 UTC (permalink / raw)
  To: Xi Ruoyao, binutils; +Cc: mengqinggang, WANG Xuerui

Hi Xi,

> The change is self-explained, no more commit message :).
> 

Just to confirm: Approved - please apply.

Cheers
   Nick



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH v2] gas/NEWS, ld/NEWS: Announce LoongArch changes in 2.42
  2024-01-23 11:28         ` Nick Clifton
@ 2024-01-23 12:38           ` Xi Ruoyao
  2024-01-23 16:01             ` Nick Clifton
  0 siblings, 1 reply; 9+ messages in thread
From: Xi Ruoyao @ 2024-01-23 12:38 UTC (permalink / raw)
  To: Nick Clifton, binutils; +Cc: mengqinggang, WANG Xuerui

On Tue, 2024-01-23 at 11:28 +0000, Nick Clifton wrote:
> Hi Xi,
> 
> > The change is self-explained, no more commit message :).
> > 
> 
> Just to confirm: Approved - please apply.

I don't have a write access, so relying on you or Qinggang to push.

-- 
Xi Ruoyao <xry111@xry111.site>
School of Aerospace Science and Technology, Xidian University

^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH v2] gas/NEWS, ld/NEWS: Announce LoongArch changes in 2.42
  2024-01-23 12:38           ` Xi Ruoyao
@ 2024-01-23 16:01             ` Nick Clifton
  0 siblings, 0 replies; 9+ messages in thread
From: Nick Clifton @ 2024-01-23 16:01 UTC (permalink / raw)
  To: Xi Ruoyao, binutils; +Cc: mengqinggang, WANG Xuerui

Hi Xi,

> I don't have a write access, so relying on you or Qinggang to push.

Applied (both mainline and the 2.42 branch).

Cheers
   Nick



^ permalink raw reply	[flat|nested] 9+ messages in thread

* Re: [PATCH] gas/NEWS, ld/NEWS: Announce LoongArch changes in 2.42
  2024-01-23  8:35   ` Xi Ruoyao
  2024-01-23 11:08     ` Nick Clifton
@ 2024-01-24  3:24     ` mengqinggang
  1 sibling, 0 replies; 9+ messages in thread
From: mengqinggang @ 2024-01-24  3:24 UTC (permalink / raw)
  To: Xi Ruoyao, binutils; +Cc: Nick Clifton, WANG Xuerui


在 2024/1/23 下午4:35, Xi Ruoyao 写道:
> On Tue, 2024-01-23 at 11:56 +0800, mengqinggang wrote:
>
>>> +* TLS LE relaxation is now supported on LoongArch. New relocation
>>> +  operators %le_hi20_r, %le_lo12r, and %le_add_r are now available, with
>>> +  la.tls.le now making use of them.
>>
>> la.tls.le still expands to the old instruction sequences.  Gcc generates
>> new TLS LE
>> instruction sequences when -mexplicit-relocs=[always,auto].
> Indeed, I'll remove the last sentence.
>
>>> +* Add support for encoding three-expression .align directives on LoongArch
>>> +  with R_LARCH_ALIGN.
>>
>> R_LARCH_ALIGN only supports the first and the third expressions of .align.
> Hmm, using something like .align 16,,4 now triggers a warning, so I'll
> remove this paragraph and rather not announce this change to users now.
> In the next release we may turn the warning off by default or support
> the second expression (?).


We currently do not plan to support the second expression because code 
section alignment typically pads the NOP instructions.
Writing other data may result in illegal instruction error.



^ permalink raw reply	[flat|nested] 9+ messages in thread

end of thread, other threads:[~2024-01-24  3:24 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-01-22 19:14 [PATCH] gas/NEWS, ld/NEWS: Announce LoongArch changes in 2.42 Xi Ruoyao
2024-01-23  3:56 ` mengqinggang
2024-01-23  8:35   ` Xi Ruoyao
2024-01-23 11:08     ` Nick Clifton
2024-01-23 11:12       ` [PATCH v2] " Xi Ruoyao
2024-01-23 11:28         ` Nick Clifton
2024-01-23 12:38           ` Xi Ruoyao
2024-01-23 16:01             ` Nick Clifton
2024-01-24  3:24     ` [PATCH] " mengqinggang

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).