aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim Wilson <wilson@gcc.gnu.org>1996-06-06 16:14:12 -0700
committerJim Wilson <wilson@gcc.gnu.org>1996-06-06 16:14:12 -0700
commite5eeae6506bed8f70e16fd7be890d13408f08f51 (patch)
tree9427b19a8fa0cbd84982d1e85f828504060c56ea
parent5c4cdc9fdf288148cc63bd30e37c49a5b147b6a0 (diff)
downloadgcc-e5eeae6506bed8f70e16fd7be890d13408f08f51.zip
gcc-e5eeae6506bed8f70e16fd7be890d13408f08f51.tar.gz
gcc-e5eeae6506bed8f70e16fd7be890d13408f08f51.tar.bz2
(expand_value_return): Handle PARALLEL return_reg.
From-SVN: r12192
-rw-r--r--gcc/stmt.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/gcc/stmt.c b/gcc/stmt.c
index d9551f6..687520e 100644
--- a/gcc/stmt.c
+++ b/gcc/stmt.c
@@ -2529,6 +2529,21 @@ expand_value_return (val)
if (GET_CODE (return_reg) == REG
&& REGNO (return_reg) < FIRST_PSEUDO_REGISTER)
emit_insn (gen_rtx (USE, VOIDmode, return_reg));
+ /* Handle calls that return values in multiple non-contiguous locations.
+ The Irix 6 ABI has examples of this. */
+ else if (GET_CODE (return_reg) == PARALLEL)
+ {
+ int i;
+
+ for (i = 0; i < XVECLEN (return_reg, 0); i++)
+ {
+ rtx x = XEXP (XVECEXP (return_reg, 0, i), 0);
+
+ if (GET_CODE (x) == REG
+ && REGNO (x) < FIRST_PSEUDO_REGISTER)
+ emit_insn (gen_rtx (USE, VOIDmode, x));
+ }
+ }
/* Does any pending block have cleanups? */