From 105c31a72538d3dd3695d1a3c6ffb804fad1cca8 Mon Sep 17 00:00:00 2001 From: aesok Date: Fri, 25 Sep 2009 17:19:11 +0000 Subject: [PATCH] * config/v850/v850.h (FUNCTION_VALUE): Remove. * config/v850/v850.c (v850_function_value): New function. (TARGET_FUNCTION_VALUE): Define. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@152180 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 6 ++++++ gcc/config/v850/v850.c | 15 +++++++++++++++ gcc/config/v850/v850.h | 8 -------- 3 files changed, 21 insertions(+), 8 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 2864131cf57..53a8332c267 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2009-09-25 Anatoly Sokolov + + * config/v850/v850.h (FUNCTION_VALUE): Remove. + * config/v850/v850.c (v850_function_value): New function. + (TARGET_FUNCTION_VALUE): Define. + 2009-09-25 Jakub Jelinek * tree-vect-stmts.c (vectorizable_call): Call diff --git a/gcc/config/v850/v850.c b/gcc/config/v850/v850.c index 8e1f27bcb0c..6242ba62013 100644 --- a/gcc/config/v850/v850.c +++ b/gcc/config/v850/v850.c @@ -66,6 +66,7 @@ static section *v850_select_section (tree, int, unsigned HOST_WIDE_INT); static void v850_encode_data_area (tree, rtx); static void v850_encode_section_info (tree, rtx, int); static bool v850_return_in_memory (const_tree, const_tree); +static rtx v850_function_value (const_tree, const_tree, bool); static void v850_setup_incoming_varargs (CUMULATIVE_ARGS *, enum machine_mode, tree, int *, int); static bool v850_pass_by_reference (CUMULATIVE_ARGS *, enum machine_mode, @@ -164,6 +165,9 @@ static const struct attribute_spec v850_attribute_table[] = #undef TARGET_RETURN_IN_MEMORY #define TARGET_RETURN_IN_MEMORY v850_return_in_memory +#undef TARGET_FUNCTION_VALUE +#define TARGET_FUNCTION_VALUE v850_function_value + #undef TARGET_PASS_BY_REFERENCE #define TARGET_PASS_BY_REFERENCE v850_pass_by_reference @@ -2955,6 +2959,17 @@ v850_return_in_memory (const_tree type, const_tree fntype ATTRIBUTE_UNUSED) /* Return values > 8 bytes in length in memory. */ return int_size_in_bytes (type) > 8 || TYPE_MODE (type) == BLKmode; } + +/* Worker function for TARGET_FUNCTION_VALUE. */ + +rtx +v850_function_value (const_tree valtype, + const_tree fn_decl_or_type ATTRIBUTE_UNUSED, + bool outgoing ATTRIBUTE_UNUSED) +{ + return gen_rtx_REG (TYPE_MODE (valtype), 10); +} + /* Worker function for TARGET_SETUP_INCOMING_VARARGS. */ diff --git a/gcc/config/v850/v850.h b/gcc/config/v850/v850.h index 1a4ca742545..4a288178b7a 100644 --- a/gcc/config/v850/v850.h +++ b/gcc/config/v850/v850.h @@ -620,14 +620,6 @@ struct cum_arg { int nbytes; int anonymous_args; }; #define FUNCTION_ARG_REGNO_P(N) (N >= 6 && N <= 9) -/* Define how to find the value returned by a function. - VALTYPE is the data type of the value (as a tree). - If the precise function being called is known, FUNC is its FUNCTION_DECL; - otherwise, FUNC is 0. */ - -#define FUNCTION_VALUE(VALTYPE, FUNC) \ - gen_rtx_REG (TYPE_MODE (VALTYPE), 10) - /* Define how to find the value returned by a library function assuming the value has mode MODE. */ -- 2.11.0