From 5896d7940bf2481467794cd95eafc607794fd0c1 Mon Sep 17 00:00:00 2001 From: Clinton Popetz Date: Fri, 4 Aug 2000 11:52:08 +0000 Subject: [PATCH] (mips_legitimate_address_p): Don't allow register+offset if the offset is large and negative... * (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 | 6 ++++++ gcc/config/mips/mips.c | 4 ++++ 2 files changed, 10 insertions(+) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index bb6cdc005a4..5c8f92062ee 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +Fri Aug 4 06:53:46 2000 Clinton Popetz + + * (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 * gencodes.c (main): Define CODE_FOR_nothing as the last possible diff --git a/gcc/config/mips/mips.c b/gcc/config/mips/mips.c index e9258ba1e8f..f4d0d12f497 100644 --- a/gcc/config/mips/mips.c +++ b/gcc/config/mips/mips.c @@ -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; } -- 2.30.2