From: Richard Sandiford Date: Sun, 22 Oct 2006 09:28:01 +0000 (+0000) Subject: mips.c (mips_split_const): Don't accept bare PLUS expressions. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=7dc7d8a2e4fe80934e66828232ef1d8c38b4b8b1;p=gcc.git 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 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 8f2f384c936..d5eaf5b3696 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2006-10-22 Richard Sandiford + + * config/mips/mips.c (mips_split_const): Don't accept bare PLUS + expressions. + 2006-10-21 H.J. Lu * config/i386/i386.md (UNSPEC_LDQQU): Renamed to ... diff --git a/gcc/config/mips/mips.c b/gcc/config/mips/mips.c index 26ea020d0b8..05498c2c21d 100644 --- a/gcc/config/mips/mips.c +++ b/gcc/config/mips/mips.c @@ -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; }