From 82423cbad3a82b066e23d0c5aa569c24fc12cc66 Mon Sep 17 00:00:00 2001 From: Aldy Hernandez Date: Wed, 8 Aug 2001 17:02:56 +0000 Subject: [PATCH] * config/mips/mips.c (mips_legitimate_address_p): Limit "la" addresses. From-SVN: r44721 --- gcc/ChangeLog | 4 ++++ gcc/config/mips/mips.c | 9 ++++++--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 37852f3fbfb..c8e70c326ad 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,7 @@ +2001-08-07 Aldy Hernandez + + * config/mips/mips.c (mips_legitimate_address_p): Limit "la" addresses. + 2001-08-08 Jason Merrill * alias.c (get_alias_set): Return a previously calculated diff --git a/gcc/config/mips/mips.c b/gcc/config/mips/mips.c index 7a2d962f070..a2caf2ac7b4 100644 --- a/gcc/config/mips/mips.c +++ b/gcc/config/mips/mips.c @@ -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; } -- 2.30.2