]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
Another goof in last change.
authorJeff Law <law@gcc.gnu.org>
Fri, 24 Oct 1997 19:56:45 +0000 (13:56 -0600)
committerJeff Law <law@gcc.gnu.org>
Fri, 24 Oct 1997 19:56:45 +0000 (13:56 -0600)
From-SVN: r16165

gcc/config/mn10300/mn10300.c

index e022063ddd546970f2c260b5fbb9e55213f232b1..158cb2b34cdd93463f4f169b37960e951d9f3c66 100644 (file)
@@ -1051,11 +1051,15 @@ legitimize_address (x, oldx, mode)
       if (GET_CODE (y) == CONST)
         y = XEXP (y, 0);
 
-      regx1 = force_reg (Pmode, force_operand (XEXP (x, 0), 0));
-      regy1 = force_reg (Pmode, force_operand (XEXP (y, 0), 0));
-      regy2 = force_reg (Pmode, force_operand (XEXP (y, 1), 0));
-      regx1 = force_reg (Pmode, gen_rtx (GET_CODE (y), Pmode, regx1, regy2));
-      return force_reg (Pmode, gen_rtx (PLUS, Pmode, regx1, regy1));
+      if (GET_CODE (y) == PLUS || GET_CODE (y) == MINUS)
+       {
+         regx1 = force_reg (Pmode, force_operand (XEXP (x, 0), 0));
+         regy1 = force_reg (Pmode, force_operand (XEXP (y, 0), 0));
+         regy2 = force_reg (Pmode, force_operand (XEXP (y, 1), 0));
+         regx1 = force_reg (Pmode,
+                            gen_rtx (GET_CODE (y), Pmode, regx1, regy2));
+         return force_reg (Pmode, gen_rtx (PLUS, Pmode, regx1, regy1));
+       }
     }
   return x;
 }