aboutsummaryrefslogtreecommitdiff
path: root/gcc/config
diff options
context:
space:
mode:
authorTakayuki 'January June' Suwa <jjsuwa_sys3175@yahoo.co.jp>2022-12-27 15:30:12 +0900
committerMax Filippov <jcmvbkbc@gmail.com>2022-12-27 07:38:39 -0800
commit98a1b4d073b9993b0acda525332225f90714e2ec (patch)
treeea2af4ef2eb7bc990a30f480dee78ab8e5e3b695 /gcc/config
parentb22f86ba9582b1483ff970aa73740864ceaa0860 (diff)
downloadgcc-98a1b4d073b9993b0acda525332225f90714e2ec.zip
gcc-98a1b4d073b9993b0acda525332225f90714e2ec.tar.gz
gcc-98a1b4d073b9993b0acda525332225f90714e2ec.tar.bz2
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.
Diffstat (limited to 'gcc/config')
-rw-r--r--gcc/config/xtensa/xtensa.cc10
-rw-r--r--gcc/config/xtensa/xtensa.h4
2 files changed, 7 insertions, 7 deletions
diff --git a/gcc/config/xtensa/xtensa.cc b/gcc/config/xtensa/xtensa.cc
index 709b0d5..66e2534 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 60d3fdf..a7c112b 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)