]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
* config/mips/mips.c (mips_legitimate_address_p): Limit "la" addresses.
authorAldy Hernandez <aldyh@redhat.com>
Wed, 8 Aug 2001 17:02:56 +0000 (17:02 +0000)
committerAldy Hernandez <aldyh@gcc.gnu.org>
Wed, 8 Aug 2001 17:02:56 +0000 (17:02 +0000)
From-SVN: r44721

gcc/ChangeLog
gcc/config/mips/mips.c

index 37852f3fbfbb2fe392863b0d6a56ad89de82d6b9..c8e70c326adb98ef5db6144548295e4922c0796e 100644 (file)
@@ -1,3 +1,7 @@
+2001-08-07  Aldy Hernandez  <aldyh@redhat.com>
+
+       * config/mips/mips.c (mips_legitimate_address_p): Limit "la" addresses.
+
 2001-08-08  Jason Merrill  <jason_merrill@redhat.com>
 
        * alias.c (get_alias_set): Return a previously calculated
index 7a2d962f070323d4b0968502acea734da5405104..a2caf2ac7b41a9b8c34efaeedbb984a777c778ba 100644 (file)
@@ -1364,9 +1364,12 @@ mips_legitimate_address_p (mode, xinsn, strict)
                  || code1 != CONST
                  || GET_CODE (XEXP (xplus1, 0)) != MINUS)
              /* When assembling for machines with 64 bit registers,
-                the assembler will not sign-extend the constant "foo"
-                in "la x, foo(x)" */
-             && (!TARGET_64BIT || (code1 == CONST_INT && INTVAL (xplus1) > 0))
+                the assembler will sign-extend the constant "foo"
+                in "la x, foo(x)" yielding the wrong result for:
+                (set (blah:DI) (plus x y)).  */
+             && (!TARGET_64BIT
+                 || trunc_int_for_mode (INTVAL (xplus1),
+                                        SImode) == INTVAL (xplus1))
              && !TARGET_MIPS16)
            return 1;
        }