OSDN Git Service

(SUBTARGET_CC1_SPEC): Define.
[pf3gnuchains/gcc-fork.git] / gcc / combine.c
index 2832871..a2d63ea 100644 (file)
@@ -3396,7 +3396,7 @@ simplify_rtx (x, op0_mode, last, in_dest)
         take the low bits.  On a little-endian machine, that's
         always valid.  On a big-endian machine, it's valid
         only if the constant's mode fits in one word.   Note that we
-        cannot use subreg_lowpart_p since we SUBREG_REG may be VOIDmode.  */
+        cannot use subreg_lowpart_p since SUBREG_REG may be VOIDmode.  */
       if (CONSTANT_P (SUBREG_REG (x))
          && ((GET_MODE_SIZE (op0_mode) <= UNITS_PER_WORD
              || ! WORDS_BIG_ENDIAN)
@@ -10800,7 +10800,7 @@ move_deaths (x, maybe_kill_insn, from_cuid, to_insn, pnotes)
 
          if (note != 0 && regno < FIRST_PSEUDO_REGISTER
              && (GET_MODE_SIZE (GET_MODE (XEXP (note, 0)))
-                 != GET_MODE_SIZE (GET_MODE (x))))
+                 > GET_MODE_SIZE (GET_MODE (x))))
            {
              int deadregno = REGNO (XEXP (note, 0));
              int deadend
@@ -10816,18 +10816,28 @@ move_deaths (x, maybe_kill_insn, from_cuid, to_insn, pnotes)
                               gen_rtx (REG, reg_raw_mode[i], i),
                               REG_NOTES (where_dead));
            }
-         /* If we didn't find any note, and we have a multi-reg hard
+         /* If we didn't find any note, or if we found a REG_DEAD note that
+            covers only part of the given reg, and we have a multi-reg hard
             register, then to be safe we must check for REG_DEAD notes
             for each register other than the first.  They could have
             their own REG_DEAD notes lying around.  */
-         else if (note == 0 && regno < FIRST_PSEUDO_REGISTER
+         else if ((note == 0
+                   || (note != 0
+                       && (GET_MODE_SIZE (GET_MODE (XEXP (note, 0)))
+                           < GET_MODE_SIZE (GET_MODE (x)))))
+                  && regno < FIRST_PSEUDO_REGISTER
                   && HARD_REGNO_NREGS (regno, GET_MODE (x)) > 1)
            {
              int ourend = regno + HARD_REGNO_NREGS (regno, GET_MODE (x));
-             int i;
+             int i, offset;
              rtx oldnotes = 0;
 
-             for (i = regno + 1; i < ourend; i++)
+             if (note)
+               offset = HARD_REGNO_NREGS (regno, GET_MODE (XEXP (note, 0)));
+             else
+               offset = 1;
+
+             for (i = regno + offset; i < ourend; i++)
                move_deaths (gen_rtx (REG, reg_raw_mode[i], i),
                             maybe_kill_insn, from_cuid, to_insn, &oldnotes);
            }
@@ -10985,6 +10995,14 @@ distribute_notes (notes, from_insn, i3, i2, elim_i2, elim_i1)
       next_note = XEXP (note, 1);
       switch (REG_NOTE_KIND (note))
        {
+       case REG_BR_PROB:
+       case REG_EXEC_COUNT:
+         /* Doesn't matter much where we put this, as long as it's somewhere.
+            It is preferable to keep these notes on branches, which is most
+            likely to be i3.  */
+         place = i3;
+         break;
+
        case REG_UNUSED:
          /* Any clobbers for i3 may still exist, and so we must process
             REG_UNUSED notes from that insn.