diff options
author | Alexandre Oliva <aoliva@redhat.com> | 2003-01-26 09:06:36 +0000 |
---|---|---|
committer | Alexandre Oliva <aoliva@gcc.gnu.org> | 2003-01-26 09:06:36 +0000 |
commit | c3297561714960b9ab81ae28213b8f18f8ed6085 (patch) | |
tree | 05229dbe977068726b1fe2d56cd11dea707cc8ec /gcc | |
parent | 187515f56ae5f7e672771ee07b5a6f9b387739ab (diff) | |
download | gcc-c3297561714960b9ab81ae28213b8f18f8ed6085.zip gcc-c3297561714960b9ab81ae28213b8f18f8ed6085.tar.gz gcc-c3297561714960b9ab81ae28213b8f18f8ed6085.tar.bz2 |
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
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 3 | ||||
-rw-r--r-- | gcc/calls.c | 19 |
2 files changed, 20 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 6c6e027..ef9354b 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -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. diff --git a/gcc/calls.c b/gcc/calls.c index d85e238..d6f68cd 100644 --- a/gcc/calls.c +++ b/gcc/calls.c @@ -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 |