alias.c (find_base_value, [...]): Handle #ifdef POINTERS_EXTEND_UNSIGNED.
authorRichard Kenner <kenner@vlsi1.ultra.nyu.edu>
Tue, 12 Feb 2002 15:18:42 +0000 (15:18 +0000)
committerRichard Kenner <kenner@gcc.gnu.org>
Tue, 12 Feb 2002 15:18:42 +0000 (10:18 -0500)
* alias.c (find_base_value, case ZERO_EXTEND, case SIGN_EXTEND):
Handle #ifdef POINTERS_EXTEND_UNSIGNED.

From-SVN: r49706

gcc/ChangeLog
gcc/alias.c

index 524c6d094959ae4c4befb750b6de8aca5e6d84dc..5ef7e507b9564b0474cf2bf0789ef9a5ea1aa122 100644 (file)
@@ -1,3 +1,8 @@
+Tue Feb 12 10:12:56 2002  Richard Kenner  <kenner@vlsi1.ultra.nyu.edu>
+
+       * alias.c (find_base_value, case ZERO_EXTEND, case SIGN_EXTEND):
+       Handle #ifdef POINTERS_EXTEND_UNSIGNED.
+
 2002-02-11  Hans-Peter Nilsson  <hp@bitrange.com>
 
        * config/mmix/mmix.c (mmix_assemble_integer) <case 1, 2>: Handle
index 95b16ca1ae7181a33935d60b696f513de70b56c9..ca533ee4d823f6c8cdfa25f5dd2399e77928c078 100644 (file)
@@ -728,6 +728,7 @@ find_base_value (src)
      rtx src;
 {
   unsigned int regno;
+
   switch (GET_CODE (src))
     {
     case SYMBOL_REF:
@@ -846,8 +847,6 @@ find_base_value (src)
       if (GET_MODE_SIZE (GET_MODE (src)) < GET_MODE_SIZE (Pmode))
        break;
       /* Fall through.  */
-    case ZERO_EXTEND:
-    case SIGN_EXTEND:  /* used for NT/Alpha pointers */
     case HIGH:
     case PRE_INC:
     case PRE_DEC:
@@ -857,6 +856,19 @@ find_base_value (src)
     case POST_MODIFY:
       return find_base_value (XEXP (src, 0));
 
+    case ZERO_EXTEND:
+    case SIGN_EXTEND:  /* used for NT/Alpha pointers */
+      {
+       rtx temp = find_base_value (XEXP (src, 0));
+
+#ifdef POINTERS_EXTEND_UNSIGNED
+       if (temp != 0 && CONSTANT_P (temp) && GET_MODE (temp) != Pmode)
+         temp = convert_memory_address (Pmode, temp);
+#endif
+
+       return temp;
+      }
+
     default:
       break;
     }