public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] LoongArch: Allow s9 as a register alias
@ 2024-02-29  7:14 Xi Ruoyao
  2024-03-01  3:49 ` chenglulu
  0 siblings, 1 reply; 2+ messages in thread
From: Xi Ruoyao @ 2024-02-29  7:14 UTC (permalink / raw)
  To: gcc-patches; +Cc: chenglulu, i, xuchenghua, mengqinggang, Xi Ruoyao

The psABI allows using s9 as an alias of r22.

gcc/ChangeLog:

	* config/loongarch/loongarch.h (ADDITIONAL_REGISTER_NAMES): Add
	s9 as an alias of r22.
---

Bootstrapped and regtested on loongarch64-linux-gnu.  Ok for trunk?

 gcc/config/loongarch/loongarch.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/gcc/config/loongarch/loongarch.h b/gcc/config/loongarch/loongarch.h
index 8b453ab3140..bf2351f0968 100644
--- a/gcc/config/loongarch/loongarch.h
+++ b/gcc/config/loongarch/loongarch.h
@@ -931,6 +931,7 @@ typedef struct {
   { "t8",	20 + GP_REG_FIRST },					\
   { "x",	21 + GP_REG_FIRST },					\
   { "fp",	22 + GP_REG_FIRST },					\
+  { "s9",	22 + GP_REG_FIRST },					\
   { "s0",	23 + GP_REG_FIRST },					\
   { "s1",	24 + GP_REG_FIRST },					\
   { "s2",	25 + GP_REG_FIRST },					\
-- 
2.44.0


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

* Re: [PATCH] LoongArch: Allow s9 as a register alias
  2024-02-29  7:14 [PATCH] LoongArch: Allow s9 as a register alias Xi Ruoyao
@ 2024-03-01  3:49 ` chenglulu
  0 siblings, 0 replies; 2+ messages in thread
From: chenglulu @ 2024-03-01  3:49 UTC (permalink / raw)
  To: Xi Ruoyao, gcc-patches; +Cc: i, xuchenghua, mengqinggang


在 2024/2/29 下午3:14, Xi Ruoyao 写道:
> The psABI allows using s9 as an alias of r22.
>
> gcc/ChangeLog:
>
> 	* config/loongarch/loongarch.h (ADDITIONAL_REGISTER_NAMES): Add
> 	s9 as an alias of r22.
> ---
>
> Bootstrapped and regtested on loongarch64-linux-gnu.  Ok for trunk?

I think a test is needed.

Others LGTM.

Thanks!

>
>   gcc/config/loongarch/loongarch.h | 1 +
>   1 file changed, 1 insertion(+)
>
> diff --git a/gcc/config/loongarch/loongarch.h b/gcc/config/loongarch/loongarch.h
> index 8b453ab3140..bf2351f0968 100644
> --- a/gcc/config/loongarch/loongarch.h
> +++ b/gcc/config/loongarch/loongarch.h
> @@ -931,6 +931,7 @@ typedef struct {
>     { "t8",	20 + GP_REG_FIRST },					\
>     { "x",	21 + GP_REG_FIRST },					\
>     { "fp",	22 + GP_REG_FIRST },					\
> +  { "s9",	22 + GP_REG_FIRST },					\
>     { "s0",	23 + GP_REG_FIRST },					\
>     { "s1",	24 + GP_REG_FIRST },					\
>     { "s2",	25 + GP_REG_FIRST },					\


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

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

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-02-29  7:14 [PATCH] LoongArch: Allow s9 as a register alias Xi Ruoyao
2024-03-01  3:49 ` chenglulu

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