public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [PATCH] RISC-V: Add vxsat as a register
@ 2024-03-27 19:54 Palmer Dabbelt
  2024-03-28  6:34 ` Kito Cheng
  0 siblings, 1 reply; 2+ messages in thread
From: Palmer Dabbelt @ 2024-03-27 19:54 UTC (permalink / raw)
  To: gcc-patches; +Cc: Palmer Dabbelt

We aren't doing anything with vxsat right now, but I'd like to add it as
an accepted register to the clobber list.  If we get this into GCC-14
then we'll avoid some preprocessor-based twiddling if we ever start
using vxsat in the future.

gcc/ChangeLog:

	* config/riscv/riscv.h (REGISTER_NAMES): Add vxsat.
---
IIUC we aren't using these N/A regnos for anything, they're just there to pad
out the types.  So I think this is safe, but Juzhe would likely know best here.

See
https://inbox.sourceware.org/libc-alpha/20240327193601.28903-2-palmer@rivosinc.com/
a use of this.
---
 gcc/config/riscv/riscv.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gcc/config/riscv/riscv.h b/gcc/config/riscv/riscv.h
index da089a03e9d..d5779512994 100644
--- a/gcc/config/riscv/riscv.h
+++ b/gcc/config/riscv/riscv.h
@@ -933,7 +933,7 @@ extern enum riscv_cc get_riscv_cc (const rtx use);
   "fs0", "fs1", "fa0", "fa1", "fa2", "fa3", "fa4", "fa5",	\
   "fa6", "fa7", "fs2", "fs3", "fs4", "fs5", "fs6", "fs7",	\
   "fs8", "fs9", "fs10","fs11","ft8", "ft9", "ft10","ft11",	\
-  "arg", "frame", "vl", "vtype", "vxrm", "frm", "N/A", "N/A",   \
+  "arg", "frame", "vl", "vtype", "vxrm", "frm", "vxsat", "N/A", \
   "N/A", "N/A", "N/A", "N/A", "N/A", "N/A", "N/A", "N/A",	\
   "N/A", "N/A", "N/A", "N/A", "N/A", "N/A", "N/A", "N/A",	\
   "N/A", "N/A", "N/A", "N/A", "N/A", "N/A", "N/A", "N/A",	\
-- 
2.44.0


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

* Re: [PATCH] RISC-V: Add vxsat as a register
  2024-03-27 19:54 [PATCH] RISC-V: Add vxsat as a register Palmer Dabbelt
@ 2024-03-28  6:34 ` Kito Cheng
  0 siblings, 0 replies; 2+ messages in thread
From: Kito Cheng @ 2024-03-28  6:34 UTC (permalink / raw)
  To: Palmer Dabbelt; +Cc: gcc-patches

LGTM, and committed to trunk :)

On Thu, Mar 28, 2024 at 5:37 AM Palmer Dabbelt <palmer@rivosinc.com> wrote:
>
> We aren't doing anything with vxsat right now, but I'd like to add it as
> an accepted register to the clobber list.  If we get this into GCC-14
> then we'll avoid some preprocessor-based twiddling if we ever start
> using vxsat in the future.
>
> gcc/ChangeLog:
>
>         * config/riscv/riscv.h (REGISTER_NAMES): Add vxsat.
> ---
> IIUC we aren't using these N/A regnos for anything, they're just there to pad
> out the types.  So I think this is safe, but Juzhe would likely know best here.
>
> See
> https://inbox.sourceware.org/libc-alpha/20240327193601.28903-2-palmer@rivosinc.com/
> a use of this.
> ---
>  gcc/config/riscv/riscv.h | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/gcc/config/riscv/riscv.h b/gcc/config/riscv/riscv.h
> index da089a03e9d..d5779512994 100644
> --- a/gcc/config/riscv/riscv.h
> +++ b/gcc/config/riscv/riscv.h
> @@ -933,7 +933,7 @@ extern enum riscv_cc get_riscv_cc (const rtx use);
>    "fs0", "fs1", "fa0", "fa1", "fa2", "fa3", "fa4", "fa5",      \
>    "fa6", "fa7", "fs2", "fs3", "fs4", "fs5", "fs6", "fs7",      \
>    "fs8", "fs9", "fs10","fs11","ft8", "ft9", "ft10","ft11",     \
> -  "arg", "frame", "vl", "vtype", "vxrm", "frm", "N/A", "N/A",   \
> +  "arg", "frame", "vl", "vtype", "vxrm", "frm", "vxsat", "N/A", \
>    "N/A", "N/A", "N/A", "N/A", "N/A", "N/A", "N/A", "N/A",      \
>    "N/A", "N/A", "N/A", "N/A", "N/A", "N/A", "N/A", "N/A",      \
>    "N/A", "N/A", "N/A", "N/A", "N/A", "N/A", "N/A", "N/A",      \
> --
> 2.44.0
>

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

end of thread, other threads:[~2024-03-28  6:34 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-03-27 19:54 [PATCH] RISC-V: Add vxsat as a register Palmer Dabbelt
2024-03-28  6:34 ` Kito Cheng

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