Hello. This patch removes obsolete FUNCTION_VALUE_REGNO_P macro from CRIS back end in the GCC and introduces equivalent TARGET_FUNCTION_VALUE_REGNO_P target hook.
Regression tested on cris-axis-elf. OK to install? * config/cris/cris.c (cris_function_value_regno_p): Make static. (TARGET_FUNCTION_VALUE_REGNO_P): Define. * config/cris/cris.h (FUNCTION_VALUE_REGNO_P): Remove. * config/cris/cris-protos.h (cris_function_value_regno_p): Remove. Index: gcc/config/cris/cris.c =================================================================== --- gcc/config/cris/cris.c (revision 179723) +++ gcc/config/cris/cris.c (working copy) @@ -148,6 +148,7 @@ static rtx cris_function_value(const_tree, const_tree, bool); static rtx cris_libcall_value (enum machine_mode, const_rtx); +static bool cris_function_value_regno_p (const unsigned int); /* This is the parsed result of the "-max-stack-stackframe=" option. If it (still) is zero, then there was no such option given. */ @@ -241,6 +242,8 @@ #define TARGET_FUNCTION_VALUE cris_function_value #undef TARGET_LIBCALL_VALUE #define TARGET_LIBCALL_VALUE cris_libcall_value +#undef TARGET_FUNCTION_VALUE_REGNO_P +#define TARGET_FUNCTION_VALUE_REGNO_P cris_function_value_regno_p struct gcc_target targetm = TARGET_INITIALIZER; @@ -3763,7 +3768,7 @@ /* Let's assume all functions return in r[CRIS_FIRST_ARG_REG] for the time being. */ -bool +static bool cris_function_value_regno_p (const unsigned int regno) { return (regno == CRIS_FIRST_ARG_REG); Index: gcc/config/cris/cris.h =================================================================== --- gcc/config/cris/cris.h (revision 179723) +++ gcc/config/cris/cris.h (working copy) @@ -854,12 +854,6 @@ && (REGNO) < CRIS_FIRST_ARG_REG + (CRIS_MAX_ARGS_IN_REGS)) -/* Node: Scalar Return */ - -#define FUNCTION_VALUE_REGNO_P(N) cris_function_value_regno_p (N) - - - /* Node: Aggregate Return */ #define CRIS_STRUCT_VALUE_REGNUM ((CRIS_FIRST_ARG_REG) - 1) Index: gcc/config/cris/cris-protos.h =================================================================== --- gcc/config/cris/cris-protos.h (revision 179723) +++ gcc/config/cris/cris-protos.h (working copy) @@ -60,5 +60,3 @@ extern int cris_initial_elimination_offset (int, int); extern void cris_init_expanders (void); - -extern bool cris_function_value_regno_p (const unsigned int); Anatoly.