From: Takayuki 'January June' Suwa Date: Tue, 27 Dec 2022 06:30:12 +0000 (+0900) Subject: xtensa: Change GP_RETURN{,_REG_COUNT} to GP_RETURN_{FIRST,LAST} X-Git-Tag: upstream/13.1.0~2344 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=98a1b4d073b9993b0acda525332225f90714e2ec;p=platform%2Fupstream%2Fgcc.git 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 --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)