summaryrefslogtreecommitdiff
path: root/gcc/reg-stack.c
diff options
context:
space:
mode:
authorbonzini <bonzini@138bc75d-0d04-0410-961f-82ee72b054a4>2006-06-07 12:07:24 +0000
committerbonzini <bonzini@138bc75d-0d04-0410-961f-82ee72b054a4>2006-06-07 12:07:24 +0000
commit389d0d0467e2f6ed6f4757fc4fb2e2ca50d96cf1 (patch)
treed535bd11e0e10ab904853586862b8d7741f5d78d /gcc/reg-stack.c
parentc6b395ddd534bc6f5779ad4689b650cf60bd22e7 (diff)
downloadgcc-389d0d0467e2f6ed6f4757fc4fb2e2ca50d96cf1.tar.gz
2006-06-07 Paolo Bonzini <bonzini@gnu.org>
PR target/27390 * reg-stack.c (subst_stack_regs_pat): Reorder resetting of the imaginary and real parts of a clobbered register. Emit insn to set the imaginary part. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@114462 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/reg-stack.c')
-rw-r--r--gcc/reg-stack.c18
1 files changed, 11 insertions, 7 deletions
diff --git a/gcc/reg-stack.c b/gcc/reg-stack.c
index bb2e1a1f9c6..83f4ebb081e 100644
--- a/gcc/reg-stack.c
+++ b/gcc/reg-stack.c
@@ -1371,16 +1371,20 @@ subst_stack_regs_pat (rtx insn, stack regstack, rtx pat)
if (!note)
{
rtx t = *dest;
- if (get_hard_regnum (regstack, t) == -1)
- control_flow_insn_deleted
- |= move_nan_for_stack_reg (insn, regstack, t);
if (COMPLEX_MODE_P (GET_MODE (t)))
{
- t = FP_MODE_REG (REGNO (t) + 1, DFmode);
- if (get_hard_regnum (regstack, t) == -1)
- control_flow_insn_deleted
- |= move_nan_for_stack_reg (insn, regstack, t);
+ rtx u = FP_MODE_REG (REGNO (t) + 1, SFmode);
+ if (get_hard_regnum (regstack, u) == -1)
+ {
+ rtx pat2 = gen_rtx_CLOBBER (VOIDmode, u);
+ rtx insn2 = emit_insn_before (pat2, insn);
+ control_flow_insn_deleted
+ |= move_nan_for_stack_reg (insn2, regstack, u);
+ }
}
+ if (get_hard_regnum (regstack, t) == -1)
+ control_flow_insn_deleted
+ |= move_nan_for_stack_reg (insn, regstack, t);
}
}
}