OSDN Git Service

* rtlanal.c (reg_overlap_mentioned_p): Handle STRICT_LOW_PART. If
authorlaw <law@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 8 Jul 1998 01:58:58 +0000 (01:58 +0000)
committerlaw <law@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 8 Jul 1998 01:58:58 +0000 (01:58 +0000)
        either argument is CONSTANT_P, then return zero.
        * reload.c (reg_overlap_mentioned_for_reload_p): Similarly.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@21005 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/reload.c
gcc/rtlanal.c

index 9b3a8ef..ecce7d2 100644 (file)
@@ -1,5 +1,9 @@
 Wed Jul  8 02:43:34 1998  Jeffrey A Law  (law@cygnus.com)
 
+       * rtlanal.c (reg_overlap_mentioned_p): Handle STRICT_LOW_PART.  If
+       either argument is CONSTANT_P, then return zero.
+       * reload.c (reg_overlap_mentioned_for_reload_p): Similarly.
+
        * configure.in: Also look at $srcdir/gas/configure to find a 
        gas version #.
 
index 0520554..0b76bb7 100644 (file)
@@ -5822,7 +5822,14 @@ reg_overlap_mentioned_for_reload_p (x, in)
 {
   int regno, endregno;
 
-  if (GET_CODE (x) == SUBREG)
+  /* Overly conservative.  */
+  if (GET_CODE (x) == STRICT_LOW_PART)
+    x = XEXP (x, 0);
+
+  /* If either argument is a constant, then modifying X can not affect IN.  */
+  if (CONSTANT_P (x) || CONSTANT_P (in))
+    return 0;
+  else if (GET_CODE (x) == SUBREG)
     {
       regno = REGNO (SUBREG_REG (x));
       if (regno < FIRST_PSEUDO_REGISTER)
@@ -5844,8 +5851,6 @@ reg_overlap_mentioned_for_reload_p (x, in)
          abort ();
        }
     }
-  else if (CONSTANT_P (x))
-    return 0;
   else if (GET_CODE (x) == MEM)
     return refers_to_mem_for_reload_p (in);
   else if (GET_CODE (x) == SCRATCH || GET_CODE (x) == PC
index b410553..8f42391 100644 (file)
@@ -817,7 +817,14 @@ reg_overlap_mentioned_p (x, in)
 {
   int regno, endregno;
 
-  if (GET_CODE (x) == SUBREG)
+  /* Overly conservative.  */
+  if (GET_CODE (x) == STRICT_LOW_PART)
+    x = XEXP (x, 0);
+
+  /* If either argument is a constant, then modifying X can not affect IN.  */
+  if (CONSTANT_P (x) || CONSTANT_P (in))
+    return 0;
+  else if (GET_CODE (x) == SUBREG)
     {
       regno = REGNO (SUBREG_REG (x));
       if (regno < FIRST_PSEUDO_REGISTER)
@@ -825,8 +832,6 @@ reg_overlap_mentioned_p (x, in)
     }
   else if (GET_CODE (x) == REG)
     regno = REGNO (x);
-  else if (CONSTANT_P (x))
-    return 0;
   else if (GET_CODE (x) == MEM)
     {
       char *fmt;