OSDN Git Service

2006-06-07 Paolo Bonzini <bonzini@gnu.org>
authorbonzini <bonzini@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 7 Jun 2006 12:07:24 +0000 (12:07 +0000)
committerbonzini <bonzini@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 7 Jun 2006 12:07:24 +0000 (12:07 +0000)
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

gcc/ChangeLog
gcc/reg-stack.c

index 2d79f7b..4c72bd9 100644 (file)
@@ -1,3 +1,10 @@
+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.
+
 2006-06-06  Peter Lemieszewski  <lemie@us.ibm.com>
 
        * config/s390/t-tpf (LIB2ADDEH): Include unwind-dw2-fde-glibc.c
index bb2e1a1..83f4ebb 100644 (file)
@@ -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);
                  }
              }
          }