From: Takayuki 'January June' Suwa <[email protected]>
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.
---
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 709b0d52d069..66e253495211 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 60d3fdfbc706..a7c112b87538 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)
--
2.30.2