(mips_legitimate_address_p): Don't allow register+offset if the offset is large and...
authorClinton Popetz <cpopetz@cygnus.com>
Fri, 4 Aug 2000 11:52:08 +0000 (11:52 +0000)
committerClinton Popetz <cpopetz@gcc.gnu.org>
Fri, 4 Aug 2000 11:52:08 +0000 (07:52 -0400)
* (mips_legitimate_address_p): Don't allow register+offset
if the offset is large and negative, and we are compiling
for 64 bit registers.

From-SVN: r35477

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

index bb6cdc005a4664dac85fa8a7f4afb48ae5781897..5c8f92062ee1ff08d923fc94701345ea1ca42be9 100644 (file)
@@ -1,3 +1,9 @@
+Fri Aug  4 06:53:46 2000  Clinton Popetz  <cpopetz@cygnus.com>
+
+       * (mips_legitimate_address_p): Don't allow register+offset              
+       if the offset is large and negative, and we are compiling               
+       for 64 bit registers.                                                   
+
 2000-08-04 Herman A.J. ten Brugge <Haj.Ten.Brugge@net.HCC.nl>
 
        * gencodes.c (main): Define CODE_FOR_nothing as the last possible
index e9258ba1e8fe0f5c618288574cf059933c547f4f..f4d0d12f497421b1cfe5c297939c9a6a53f2c20f 100644 (file)
@@ -1329,6 +1329,10 @@ mips_legitimate_address_p (mode, xinsn, strict)
              && (!TARGET_EMBEDDED_PIC                                  
                  || 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 || (INTVAL (xplus1) > 0))
              && !TARGET_MIPS16)                                        
            return 1;                                                   
        }