mips.c (mips_split_const): Don't accept bare PLUS expressions.

gcc/
	* config/mips/mips.c (mips_split_const): Don't accept bare PLUS
	expressions.

From-SVN: r117950
This commit is contained in:
Richard Sandiford 2006-10-22 09:28:01 +00:00 committed by Richard Sandiford
parent 5a0aad3165
commit 7dc7d8a2e4
2 changed files with 10 additions and 4 deletions

View File

@ -1,3 +1,8 @@
2006-10-22 Richard Sandiford <richard@codesourcery.com>
* config/mips/mips.c (mips_split_const): Don't accept bare PLUS
expressions.
2006-10-21 H.J. Lu <hongjiu.lu@intel.com>
* config/i386/i386.md (UNSPEC_LDQQU): Renamed to ...

View File

@ -1282,12 +1282,13 @@ mips_split_const (rtx x, rtx *base, HOST_WIDE_INT *offset)
*offset = 0;
if (GET_CODE (x) == CONST)
x = XEXP (x, 0);
if (GET_CODE (x) == PLUS && GET_CODE (XEXP (x, 1)) == CONST_INT)
{
*offset += INTVAL (XEXP (x, 1));
x = XEXP (x, 0);
if (GET_CODE (x) == PLUS && GET_CODE (XEXP (x, 1)) == CONST_INT)
{
*offset += INTVAL (XEXP (x, 1));
x = XEXP (x, 0);
}
}
*base = x;
}