diff options
author | Richard Sandiford <richard@codesourcery.com> | 2006-10-22 09:28:01 +0000 |
---|---|---|
committer | Richard Sandiford <rsandifo@gcc.gnu.org> | 2006-10-22 09:28:01 +0000 |
commit | 7dc7d8a2e4fe80934e66828232ef1d8c38b4b8b1 (patch) | |
tree | 37c3221fefa94316a867501bc602ecd8852a7aaf /gcc | |
parent | 5a0aad3165fd85695548dfebc3d4901b7027cf3d (diff) | |
download | gcc-7dc7d8a2e4fe80934e66828232ef1d8c38b4b8b1.zip gcc-7dc7d8a2e4fe80934e66828232ef1d8c38b4b8b1.tar.gz gcc-7dc7d8a2e4fe80934e66828232ef1d8c38b4b8b1.tar.bz2 |
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
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/config/mips/mips.c | 9 |
2 files changed, 10 insertions, 4 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 8f2f384..d5eaf5b 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -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 ... diff --git a/gcc/config/mips/mips.c b/gcc/config/mips/mips.c index 26ea020..05498c2 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; } |