diff options
author | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-07-14 07:39:56 +0000 |
---|---|---|
committer | rguenth <rguenth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-07-14 07:39:56 +0000 |
commit | 46b3ff29296568882d5ec4f6796ae9a28879971b (patch) | |
tree | db222e8988c1c3f0439e84b38f6bc6ae99babae0 /gcc/targhooks.c | |
parent | f9eef6699aae8596611d814f6d8695432137b68c (diff) | |
download | gcc-46b3ff29296568882d5ec4f6796ae9a28879971b.tar.gz |
2005-07-14 Richard Guenther <rguenther@suse.de>
* Makefile.in (explow.o, reg-stack.o): Depend on target.h.
* calls.c (expand_call): Pass fntype to hard_function_value.
(emit_library_call_value_1): Likewise.
* explow.c: Include target.h.
(hard_function_value): Take extra argument, the fntype.
Use new target hook for function_value.
* expr.h (hard_function_value): Change prototype.
* function.c (aggregate_value_p): Pass 0 as fntype to
hard_function_value.
(assign_parms): Use new target hook for function_value.
Pass 0 as fntype to hard_function_value.
(expand_function_end): Likewise.
* reg-stack.c: Include target.h.
(stack_result): Use new target hook for function_value.
* target-def.h: New target hook function_value.
* target.h: Likewise.
* targhooks.c (default_function_value): New function.
* targhooks.h (default_function_value): Declare.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@102013 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/targhooks.c')
-rw-r--r-- | gcc/targhooks.c | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/gcc/targhooks.c b/gcc/targhooks.c index 4fc6e10a30b..c0c42019a04 100644 --- a/gcc/targhooks.c +++ b/gcc/targhooks.c @@ -417,4 +417,26 @@ hook_bool_rtx_commutative_p (rtx x, int outer_code ATTRIBUTE_UNUSED) return COMMUTATIVE_P (x); } +rtx +default_function_value (tree ret_type ATTRIBUTE_UNUSED, + tree fn_decl_or_type, + bool outgoing ATTRIBUTE_UNUSED) +{ + /* The old interface doesn't handle receiving the function type. */ + if (fn_decl_or_type + && !DECL_P (fn_decl_or_type)) + fn_decl_or_type = NULL; + +#ifdef FUNCTION_OUTGOING_VALUE + if (outgoing) + return FUNCTION_OUTGOING_VALUE (ret_type, fn_decl_or_type); +#endif + +#ifdef FUNCTION_VALUE + return FUNCTION_VALUE (ret_type, fn_decl_or_type); +#else + return NULL_RTX; +#endif +} + #include "gt-targhooks.h" |