OSDN Git Service

gcc/
authorrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 22 Oct 2006 09:28:01 +0000 (09:28 +0000)
committerrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 22 Oct 2006 09:28:01 +0000 (09:28 +0000)
* config/mips/mips.c (mips_split_const): Don't accept bare PLUS
expressions.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@117950 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/config/mips/mips.c

index 8f2f384..d5eaf5b 100644 (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 ...
index 26ea020..05498c2 100644 (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;
 }