Commit b36a8cc2 by Olivier Hainque Committed by Olivier Hainque

function.c (assign_parms): For a struct value address passed as first argument...

	* function.c (assign_parms): For a struct value address passed as
	first argument, delay the function's result RTL setup code until
	after the emission of parameter conversions.

From-SVN: r64493
parent 3897ea90
2003-03-17 Olivier Hainque <hainque@act-europe.fr>
* function.c (assign_parms): For a struct value address passed as
first argument, delay the function's result RTL setup code until
after the emission of parameter conversions.
2003-03-17 Dave Love <fx@gnu.org> 2003-03-17 Dave Love <fx@gnu.org>
Rainer Orth <ro@TechFak.Uni-Bielefeld.DE> Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
......
...@@ -5009,13 +5009,20 @@ assign_parms (fndecl) ...@@ -5009,13 +5009,20 @@ assign_parms (fndecl)
SET_DECL_RTL (parm, stack_parm); SET_DECL_RTL (parm, stack_parm);
} }
}
/* Output all parameter conversion instructions (possibly including calls)
now that all parameters have been copied out of hard registers. */
emit_insn (conversion_insns);
/* If this "parameter" was the place where we are receiving the /* If we are receiving a struct value address as the first argument, set up
function's incoming structure pointer, set up the result. */ the RTL for the function result. As this might require code to convert
if (parm == function_result_decl) the transmitted address to Pmode, we do this here to ensure that possible
preliminary conversions of the address have been emitted already. */
if (function_result_decl)
{ {
tree result = DECL_RESULT (fndecl); tree result = DECL_RESULT (fndecl);
rtx addr = DECL_RTL (parm); rtx addr = DECL_RTL (function_result_decl);
rtx x; rtx x;
#ifdef POINTERS_EXTEND_UNSIGNED #ifdef POINTERS_EXTEND_UNSIGNED
...@@ -5027,11 +5034,6 @@ assign_parms (fndecl) ...@@ -5027,11 +5034,6 @@ assign_parms (fndecl)
set_mem_attributes (x, result, 1); set_mem_attributes (x, result, 1);
SET_DECL_RTL (result, x); SET_DECL_RTL (result, x);
} }
}
/* Output all parameter conversion instructions (possibly including calls)
now that all parameters have been copied out of hard registers. */
emit_insn (conversion_insns);
last_parm_insn = get_last_insn (); last_parm_insn = get_last_insn ();
......
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