calls.c (emit_library_call_value_1): Handle return values in a PARALLEL.

* calls.c (emit_library_call_value_1): Handle return values
in a PARALLEL.

From-SVN: r61826
This commit is contained in:
Alexandre Oliva 2003-01-26 09:06:36 +00:00 committed by Alexandre Oliva
parent 187515f56a
commit c329756171
2 changed files with 20 additions and 2 deletions

View File

@ -1,5 +1,8 @@
2003-01-26 Alexandre Oliva <aoliva@redhat.com>
* calls.c (emit_library_call_value_1): Handle return values
in a PARALLEL.
* rtl.c (get_mode_alignment): Moved to...
* stor-layout.c: ... here.

View File

@ -4080,7 +4080,7 @@ emit_library_call_value_1 (retval, orgfun, value, fn_type, outmode, nargs, p)
{
rtx insns;
if (valreg == 0 || GET_CODE (valreg) == PARALLEL)
if (valreg == 0)
{
insns = get_insns ();
end_sequence ();
@ -4089,9 +4089,18 @@ emit_library_call_value_1 (retval, orgfun, value, fn_type, outmode, nargs, p)
else
{
rtx note = 0;
rtx temp = gen_reg_rtx (GET_MODE (valreg));
rtx temp;
int i;
if (GET_CODE (valreg) == PARALLEL)
{
temp = gen_reg_rtx (outmode);
emit_group_store (temp, valreg, outmode);
valreg = temp;
}
temp = gen_reg_rtx (GET_MODE (valreg));
/* Construct an "equal form" for the value which mentions all the
arguments in order as well as the function name. */
for (i = 0; i < nargs; i++)
@ -4125,6 +4134,12 @@ emit_library_call_value_1 (retval, orgfun, value, fn_type, outmode, nargs, p)
if (value != mem_value)
emit_move_insn (value, mem_value);
}
else if (GET_CODE (valreg) == PARALLEL)
{
if (value == 0)
value = gen_reg_rtx (outmode);
emit_group_store (value, valreg, outmode);
}
else if (value != 0)
emit_move_insn (value, valreg);
else