public inbox for gcc-cvs@sourceware.org
help / color / mirror / Atom feed
* [gcc r13-4900] xtensa: Change GP_RETURN{, _REG_COUNT} to GP_RETURN_{FIRST, LAST}
@ 2022-12-27 15:39 Max Filippov
0 siblings, 0 replies; only message in thread
From: Max Filippov @ 2022-12-27 15:39 UTC (permalink / raw)
To: gcc-cvs
https://gcc.gnu.org/g:98a1b4d073b9993b0acda525332225f90714e2ec
commit r13-4900-g98a1b4d073b9993b0acda525332225f90714e2ec
Author: Takayuki 'January June' Suwa <jjsuwa_sys3175@yahoo.co.jp>
Date: Tue Dec 27 15:30:12 2022 +0900
xtensa: Change GP_RETURN{,_REG_COUNT} to GP_RETURN_{FIRST,LAST}
gcc/ChangeLog:
* config/xtensa/xtensa.h (GP_RETURN, GP_RETURN_REG_COUNT):
Change to GP_RETURN_FIRST and GP_RETURN_LAST, respectively.
* config/xtensa/xtensa.cc (xtensa_function_value,
xtensa_libcall_value, xtensa_function_value_regno_p): Ditto.
Diff:
---
gcc/config/xtensa/xtensa.cc | 10 +++++-----
gcc/config/xtensa/xtensa.h | 4 ++--
2 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/gcc/config/xtensa/xtensa.cc b/gcc/config/xtensa/xtensa.cc
index 709b0d52d06..66e25349521 100644
--- a/gcc/config/xtensa/xtensa.cc
+++ b/gcc/config/xtensa/xtensa.cc
@@ -4526,9 +4526,9 @@ xtensa_function_value (const_tree valtype, const_tree func ATTRIBUTE_UNUSED,
bool outgoing)
{
return gen_rtx_REG ((INTEGRAL_TYPE_P (valtype)
- && TYPE_PRECISION (valtype) < BITS_PER_WORD)
- ? SImode : TYPE_MODE (valtype),
- outgoing ? GP_OUTGOING_RETURN : GP_RETURN);
+ && TYPE_PRECISION (valtype) < BITS_PER_WORD)
+ ? SImode : TYPE_MODE (valtype),
+ outgoing ? GP_OUTGOING_RETURN : GP_RETURN_FIRST);
}
/* Worker function for TARGET_LIBCALL_VALUE. */
@@ -4538,7 +4538,7 @@ xtensa_libcall_value (machine_mode mode, const_rtx fun ATTRIBUTE_UNUSED)
{
return gen_rtx_REG ((GET_MODE_CLASS (mode) == MODE_INT
&& GET_MODE_SIZE (mode) < UNITS_PER_WORD)
- ? SImode : mode, GP_RETURN);
+ ? SImode : mode, GP_RETURN_FIRST);
}
/* Worker function TARGET_FUNCTION_VALUE_REGNO_P. */
@@ -4546,7 +4546,7 @@ xtensa_libcall_value (machine_mode mode, const_rtx fun ATTRIBUTE_UNUSED)
static bool
xtensa_function_value_regno_p (const unsigned int regno)
{
- return (regno >= GP_RETURN && regno < GP_RETURN + GP_RETURN_REG_COUNT);
+ return IN_RANGE (regno, GP_RETURN_FIRST, GP_RETURN_LAST);
}
/* The static chain is passed in memory. Provide rtx giving 'mem'
diff --git a/gcc/config/xtensa/xtensa.h b/gcc/config/xtensa/xtensa.h
index 60d3fdfbc70..a7c112b8753 100644
--- a/gcc/config/xtensa/xtensa.h
+++ b/gcc/config/xtensa/xtensa.h
@@ -474,9 +474,9 @@ enum reg_class
/* Symbolic macros for the registers used to return integer, floating
point, and values of coprocessor and user-defined modes. */
-#define GP_RETURN (GP_REG_FIRST + 2 + WINDOW_SIZE)
+#define GP_RETURN_FIRST (GP_REG_FIRST + 2 + WINDOW_SIZE)
+#define GP_RETURN_LAST (GP_RETURN_FIRST + 3)
#define GP_OUTGOING_RETURN (GP_REG_FIRST + 2)
-#define GP_RETURN_REG_COUNT 4
/* Symbolic macros for the first/last argument registers. */
#define GP_ARG_FIRST (GP_REG_FIRST + 2)
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2022-12-27 15:39 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-12-27 15:39 [gcc r13-4900] xtensa: Change GP_RETURN{, _REG_COUNT} to GP_RETURN_{FIRST, LAST} Max Filippov
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).