Commit 4dc07bd7 by Jakub Jelinek Committed by Richard Henderson

explow.c (hard_function_value): Add outgoing argument.

        * explow.c (hard_function_value): Add outgoing argument.
        * expr.h (hard_function_value): Declare it.
        * calls.c (expand_call, emit_library_call_value): Update callers.
        * function.c (aggregate_value_p): Ditto.
        (diddle_return_value): Must look at the outgoing registers
        on archs with register windows.

From-SVN: r30550
parent 95a7b554
1999-11-16 Jakub Jelinek <jakub@redhat.com>
* explow.c (hard_function_value): Add outgoing argument.
* expr.h (hard_function_value): Declare it.
* calls.c (expand_call, emit_library_call_value): Update callers.
* function.c (aggregate_value_p): Ditto.
(diddle_return_value): Must look at the outgoing registers
on archs with register windows.
Mon Nov 15 20:46:45 1999 Richard Henderson <rth@cygnus.com>
* alpha.c (alpha_build_va_list): Use make_lang_type and
......
......@@ -2211,9 +2211,9 @@ expand_call (exp, target, ignore)
{
if (pcc_struct_value)
valreg = hard_function_value (build_pointer_type (TREE_TYPE (exp)),
fndecl);
fndecl, 0);
else
valreg = hard_function_value (TREE_TYPE (exp), fndecl);
valreg = hard_function_value (TREE_TYPE (exp), fndecl, 0);
}
/* Precompute all register parameters. It isn't safe to compute anything
......@@ -3138,7 +3138,7 @@ emit_library_call_value VPROTO((rtx orgfun, rtx value, int no_queue,
#ifdef PCC_STATIC_STRUCT_RETURN
rtx pointer_reg
= hard_function_value (build_pointer_type (type_for_mode (outmode, 0)),
0);
0, 0);
mem_value = gen_rtx_MEM (outmode, pointer_reg);
pcc_struct_value = 1;
if (value == 0)
......
......@@ -1541,14 +1541,24 @@ probe_stack_range (first, size)
in which a scalar value of data type VALTYPE
was returned by a function call to function FUNC.
FUNC is a FUNCTION_DECL node if the precise function is known,
otherwise 0. */
otherwise 0.
OUTGOING is 1 if on a machine with register windows this function
should return the register in which the function will put its result
and 0 otherwise. */
rtx
hard_function_value (valtype, func)
hard_function_value (valtype, func, outgoing)
tree valtype;
tree func ATTRIBUTE_UNUSED;
int outgoing ATTRIBUTE_UNUSED;
{
rtx val = FUNCTION_VALUE (valtype, func);
rtx val;
#ifdef FUNCTION_OUTGOING_VALUE
if (outgoing)
val = FUNCTION_OUTGOING_VALUE (valtype, func);
else
#endif
val = FUNCTION_VALUE (valtype, func);
if (GET_CODE (val) == REG
&& GET_MODE (val) == BLKmode)
{
......
......@@ -1067,7 +1067,7 @@ extern rtx trampoline_address PROTO((tree));
/* Return an rtx that refers to the value returned by a function
in its original home. This becomes invalid if any more code is emitted. */
extern rtx hard_function_value PROTO((tree, tree));
extern rtx hard_function_value PROTO((tree, tree, int));
extern rtx prepare_call_address PROTO((rtx, tree, rtx *, int));
......
......@@ -3992,7 +3992,7 @@ aggregate_value_p (exp)
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);
reg = hard_function_value (type, 0, 0);
/* If we have something other than a REG (e.g. a PARALLEL), then assume
it is OK. */
......@@ -6211,7 +6211,7 @@ diddle_return_value (code)
/* Use hard_function_value to avoid creating a reference to a BLKmode
register in the USE/CLOBBER insn. */
return_reg = hard_function_value (TREE_TYPE (decl_result),
current_function_decl);
current_function_decl, 1);
REG_FUNCTION_VALUE_P (return_reg) = 1;
emit_insn (gen_rtx_fmt_e (code, VOIDmode, return_reg));
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment