diff options
author | Anatoly Sokolov <aesok@post.ru> | 2009-09-24 22:58:22 +0400 |
---|---|---|
committer | Anatoly Sokolov <aesok@gcc.gnu.org> | 2009-09-24 22:58:22 +0400 |
commit | 3faa6313d1548d90255dabc7607a417a3c269057 (patch) | |
tree | 3f74843fd388c6c0a30cfb7e79f09ed94da0f978 /gcc/config | |
parent | 4851726d28a60d59345e8a8ab06575885d98e74f (diff) | |
download | gcc-3faa6313d1548d90255dabc7607a417a3c269057.zip gcc-3faa6313d1548d90255dabc7607a417a3c269057.tar.gz gcc-3faa6313d1548d90255dabc7607a417a3c269057.tar.bz2 |
rs6000.h (FUNCTION_VALUE): Remove macro.
* config/rs6000/rs6000.h (FUNCTION_VALUE): Remove macro.
* config/rs6000/rs6000-protos.h (rs6000_function_value): Remove.
* config/rs6000/rs6000.c (rs6000_function_value): Make static, add
'outgoing' argument.
(TARGET_FUNCTION_VALUE): Define.
From-SVN: r152137
Diffstat (limited to 'gcc/config')
-rw-r--r-- | gcc/config/rs6000/rs6000-protos.h | 1 | ||||
-rw-r--r-- | gcc/config/rs6000/rs6000.c | 13 | ||||
-rw-r--r-- | gcc/config/rs6000/rs6000.h | 7 |
3 files changed, 8 insertions, 13 deletions
diff --git a/gcc/config/rs6000/rs6000-protos.h b/gcc/config/rs6000/rs6000-protos.h index 9eaddc3..ca5e584 100644 --- a/gcc/config/rs6000/rs6000-protos.h +++ b/gcc/config/rs6000/rs6000-protos.h @@ -141,7 +141,6 @@ extern void function_arg_advance (CUMULATIVE_ARGS *, enum machine_mode, extern int function_arg_boundary (enum machine_mode, tree); extern rtx function_arg (CUMULATIVE_ARGS *, enum machine_mode, tree, int); extern tree altivec_resolve_overloaded_builtin (location_t, tree, void *); -extern rtx rs6000_function_value (const_tree, const_tree); extern rtx rs6000_libcall_value (enum machine_mode); extern rtx rs6000_va_arg (tree, tree); extern int function_ok_for_sibcall (tree); diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c index c4a7152..2967ff5 100644 --- a/gcc/config/rs6000/rs6000.c +++ b/gcc/config/rs6000/rs6000.c @@ -846,6 +846,7 @@ static void rs6000_output_mi_thunk (FILE *, tree, HOST_WIDE_INT, HOST_WIDE_INT, tree); static rtx rs6000_emit_set_long_const (rtx, HOST_WIDE_INT, HOST_WIDE_INT); static bool rs6000_return_in_memory (const_tree, const_tree); +static rtx rs6000_function_value (const_tree, const_tree, bool); static void rs6000_file_start (void); #if TARGET_ELF static int rs6000_elf_reloc_rw_mask (void); @@ -1471,6 +1472,9 @@ static const struct attribute_spec rs6000_attribute_table[] = #undef TARGET_TRAMPOLINE_INIT #define TARGET_TRAMPOLINE_INIT rs6000_trampoline_init +#undef TARGET_FUNCTION_VALUE +#define TARGET_FUNCTION_VALUE rs6000_function_value + struct gcc_target targetm = TARGET_INITIALIZER; /* Return number of consecutive hard regs needed starting at reg REGNO @@ -25099,10 +25103,7 @@ rs6000_complex_function_value (enum machine_mode mode) return gen_rtx_PARALLEL (mode, gen_rtvec (2, r1, r2)); } -/* 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. +/* Target hook for TARGET_FUNCTION_VALUE. On the SPE, both FPs and vectors are returned in r3. @@ -25110,7 +25111,9 @@ rs6000_complex_function_value (enum machine_mode mode) fp1, unless -msoft-float. */ rtx -rs6000_function_value (const_tree valtype, const_tree func ATTRIBUTE_UNUSED) +rs6000_function_value (const_tree valtype, + const_tree fn_decl_or_type ATTRIBUTE_UNUSED, + bool outgoing ATTRIBUTE_UNUSED) { enum machine_mode mode; unsigned int regno; diff --git a/gcc/config/rs6000/rs6000.h b/gcc/config/rs6000/rs6000.h index e52a9a0..9116f47 100644 --- a/gcc/config/rs6000/rs6000.h +++ b/gcc/config/rs6000/rs6000.h @@ -1518,13 +1518,6 @@ extern enum rs6000_abi rs6000_current_abi; /* available for use by subtarget */ #define RETURN_POPS_ARGS(FUNDECL,FUNTYPE,SIZE) 0 -/* 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) rs6000_function_value ((VALTYPE), (FUNC)) - /* Define how to find the value returned by a library function assuming the value has mode MODE. */ |