Commit 518e5ce8 by Jim Wilson

(mips_expand_prologue): Handle structure return values as

the first argument if necessary.

From-SVN: r5619
parent b206a757
......@@ -4313,6 +4313,18 @@ mips_expand_prologue ()
tree cur_arg;
CUMULATIVE_ARGS args_so_far;
/* If struct value address is treated as the first argument, make it so. */
if (aggregate_value_p (DECL_RESULT (fndecl))
&& ! current_function_returns_pcc_struct
&& struct_value_incoming_rtx == 0)
{
tree type = build_pointer_type (fntype);
tree function_result_decl = build_decl (PARM_DECL, NULL_TREE, type);
DECL_ARG_TYPE (function_result_decl) = type;
TREE_CHAIN (function_result_decl) = fnargs;
fnargs = function_result_decl;
}
/* Determine the last argument, and get its name. */
INIT_CUMULATIVE_ARGS (args_so_far, fntype, (rtx)0);
......
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