OSDN Git Service

(NEEDS_UNTYPED_CALL): Define.
[pf3gnuchains/gcc-fork.git] / gcc / integrate.c
index c324fac..95917c8 100644 (file)
@@ -1981,9 +1981,11 @@ copy_rtx_and_substitute (orig, map)
     case USE:
     case CLOBBER:
       /* USE and CLOBBER are ordinary, but we convert (use (subreg foo))
-        to (use foo).  */
+        to (use foo) if the original insn didn't have a subreg.
+        Removing the subreg distorts the VAX movstrhi pattern
+        by changing the mode of an operand.  */
       copy = copy_rtx_and_substitute (XEXP (orig, 0), map);
-      if (GET_CODE (copy) == SUBREG)
+      if (GET_CODE (copy) == SUBREG && GET_CODE (XEXP (orig, 0)) != SUBREG)
        copy = SUBREG_REG (copy);
       return gen_rtx (code, VOIDmode, copy);
 
@@ -2411,7 +2413,8 @@ subst_constants (loc, insn, map)
            && GET_MODE_SIZE (GET_MODE (SUBREG_REG (dest))) <= UNITS_PER_WORD
            && (GET_MODE_SIZE (GET_MODE (SUBREG_REG (dest)))
                      <= GET_MODE_SIZE (GET_MODE (dest)))
-           && (tem = gen_lowpart_if_possible (GET_MODE (dest), src)))
+           && (tem = gen_lowpart_if_possible (GET_MODE (SUBREG_REG (dest)),
+                                              src)))
          src = tem, dest = SUBREG_REG (dest);
 
        /* If storing a recognizable value save it for later recording.  */
@@ -2537,11 +2540,29 @@ mark_stores (dest, x)
      rtx dest;
      rtx x;
 {
-  if (GET_CODE (dest) == SUBREG)
-    dest = SUBREG_REG (dest);
+  int regno = -1;
+  enum machine_mode mode;
+
+  /* DEST is always the innermost thing set, except in the case of
+     SUBREGs of hard registers.  */
 
   if (GET_CODE (dest) == REG)
-    global_const_equiv_map[REGNO (dest)] = 0;
+    regno = REGNO (dest), mode = GET_MODE (dest);
+  else if (GET_CODE (dest) == SUBREG && GET_CODE (SUBREG_REG (dest)) == REG)
+    {
+      regno = REGNO (SUBREG_REG (dest)) + SUBREG_WORD (dest);
+      mode = GET_MODE (SUBREG_REG (dest));
+    }
+
+  if (regno >= 0)
+    {
+      int last_reg = (regno >= FIRST_PSEUDO_REGISTER ? regno
+                     : regno + HARD_REGNO_NREGS (regno, mode) - 1);
+      int i;
+
+      for (i = regno; i <= last_reg; i++)
+       global_const_equiv_map[i] = 0;
+    }
 }
 \f
 /* If any CONST expressions with RTX_INTEGRATED_P are present in the rtx