aboutsummaryrefslogtreecommitdiff
path: root/gcc/function.c
diff options
context:
space:
mode:
authorRichard Guenther <rguenther@suse.de>2005-07-14 07:39:56 +0000
committerRichard Biener <rguenth@gcc.gnu.org>2005-07-14 07:39:56 +0000
commit1d636cc69fa14e7f7daa4eef6ecb6a6a1413cfda (patch)
treedb222e8988c1c3f0439e84b38f6bc6ae99babae0 /gcc/function.c
parent94b00ee4e1126901db295a7223b3c6d7c5b1868d (diff)
downloadgcc-1d636cc69fa14e7f7daa4eef6ecb6a6a1413cfda.zip
gcc-1d636cc69fa14e7f7daa4eef6ecb6a6a1413cfda.tar.gz
gcc-1d636cc69fa14e7f7daa4eef6ecb6a6a1413cfda.tar.bz2
Makefile.in (explow.o, [...]): Depend on target.h.
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. From-SVN: r102013
Diffstat (limited to 'gcc/function.c')
-rw-r--r--gcc/function.c22
1 files changed, 6 insertions, 16 deletions
diff --git a/gcc/function.c b/gcc/function.c
index 3fcc8b8..160c80d 100644
--- a/gcc/function.c
+++ b/gcc/function.c
@@ -1732,7 +1732,7 @@ aggregate_value_p (tree exp, tree fntype)
return 1;
/* Make sure we have suitable call-clobbered regs to return
the value in; if not, we must return it in memory. */
- reg = hard_function_value (type, 0, 0);
+ reg = hard_function_value (type, 0, fntype, 0);
/* If we have something other than a REG (e.g. a PARALLEL), then assume
it is OK. */
@@ -3055,13 +3055,8 @@ assign_parms (tree fndecl)
{
rtx real_decl_rtl;
-#ifdef FUNCTION_OUTGOING_VALUE
- real_decl_rtl = FUNCTION_OUTGOING_VALUE (TREE_TYPE (decl_result),
- fndecl);
-#else
- real_decl_rtl = FUNCTION_VALUE (TREE_TYPE (decl_result),
- fndecl);
-#endif
+ real_decl_rtl = targetm.calls.function_value (TREE_TYPE (decl_result),
+ fndecl, true);
REG_FUNCTION_VALUE_P (real_decl_rtl) = 1;
/* The delay slot scheduler assumes that current_function_return_rtx
holds the hard register containing the return value, not a
@@ -4149,7 +4144,7 @@ expand_function_start (tree subr)
/* In order to figure out what mode to use for the pseudo, we
figure out what the mode of the eventual return register will
actually be, and use that. */
- rtx hard_reg = hard_function_value (return_type, subr, 1);
+ rtx hard_reg = hard_function_value (return_type, subr, 0, 1);
/* Structures that are returned in registers are not
aggregate_value_p, so we may see a PARALLEL or a REG. */
@@ -4499,13 +4494,8 @@ expand_function_end (void)
else
value_address = XEXP (value_address, 0);
-#ifdef FUNCTION_OUTGOING_VALUE
- outgoing = FUNCTION_OUTGOING_VALUE (build_pointer_type (type),
- current_function_decl);
-#else
- outgoing = FUNCTION_VALUE (build_pointer_type (type),
- current_function_decl);
-#endif
+ outgoing = targetm.calls.function_value (build_pointer_type (type),
+ current_function_decl, true);
/* Mark this as a function return value so integrate will delete the
assignment and USE below when inlining this function. */