aboutsummaryrefslogtreecommitdiff
path: root/gcc/expr.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/expr.c')
-rw-r--r--gcc/expr.c12
1 files changed, 9 insertions, 3 deletions
diff --git a/gcc/expr.c b/gcc/expr.c
index 2d5c359..f579e27 100644
--- a/gcc/expr.c
+++ b/gcc/expr.c
@@ -1890,8 +1890,13 @@ emit_group_store (rtx orig_dst, rtx src, tree type ATTRIBUTE_UNUSED, int ssize)
for (i = start; i < XVECLEN (src, 0); i++)
{
rtx reg = XEXP (XVECEXP (src, 0, i), 0);
- tmps[i] = gen_reg_rtx (GET_MODE (reg));
- emit_move_insn (tmps[i], reg);
+ if (!REG_P (reg) || REGNO (reg) < FIRST_PSEUDO_REGISTER)
+ {
+ tmps[i] = gen_reg_rtx (GET_MODE (reg));
+ emit_move_insn (tmps[i], reg);
+ }
+ else
+ tmps[i] = reg;
}
/* If we won't be storing directly into memory, protect the real destination
@@ -1918,7 +1923,8 @@ emit_group_store (rtx orig_dst, rtx src, tree type ATTRIBUTE_UNUSED, int ssize)
}
else if (!MEM_P (dst) && GET_CODE (dst) != CONCAT)
{
- dst = gen_reg_rtx (GET_MODE (orig_dst));
+ if (!REG_P (dst) || REGNO (dst) < FIRST_PSEUDO_REGISTER)
+ dst = gen_reg_rtx (GET_MODE (orig_dst));
/* Make life a bit easier for combine. */
emit_move_insn (dst, CONST0_RTX (GET_MODE (orig_dst)));
}