(stackadjust/push peepholes): For the adjust/push/push pattern one offset was wrong.
authorRichard Kenner <kenner@gcc.gnu.org>
Tue, 6 Sep 1994 22:24:43 +0000 (18:24 -0400)
committerRichard Kenner <kenner@gcc.gnu.org>
Tue, 6 Sep 1994 22:24:43 +0000 (18:24 -0400)
(stackadjust/push peepholes): For the adjust/push/push pattern one offset
was wrong.
Don't use addr for register and and MEM refs.

From-SVN: r8027

gcc/config/ns32k/ns32k.md

index cfd4cfd2ef4f5b8c6feca9577ea338fc2f9a0133..e644740aa69fc7f62702953200c308d4e7ae0d54 100644 (file)
   if (GET_CODE (operands[1]) == CONST_INT)
        output_asm_insn (output_move_dconst (INTVAL (operands[1]), \"%$%1,0(sp)\"),
                         operands);
-  else if (address_operand (operands[1], SImode))
+  else if (GET_CODE (operands[1]) != REG
+          && GET_CODE (operands[1]) != MEM
+          && address_operand (operands[1], SImode))
        output_asm_insn (\"addr %a1,0(sp)\", operands);
   else
        output_asm_insn (\"movd %1,0(sp)\", operands);
   if (GET_CODE (operands[1]) == CONST_INT)
        output_asm_insn (output_move_dconst (INTVAL (operands[1]), \"%$%1,4(sp)\"),
                         operands);
-  else if (address_operand (operands[1], SImode))
-       output_asm_insn (\"addr %a1,0(sp)\", operands);
+  else if (GET_CODE (operands[1]) != REG
+          && GET_CODE (operands[1]) != MEM
+          && address_operand (operands[1], SImode))
+       output_asm_insn (\"addr %a1,4(sp)\", operands);
   else
        output_asm_insn (\"movd %1,4(sp)\", operands);
 
   if (GET_CODE (operands[3]) == CONST_INT)
        output_asm_insn (output_move_dconst (INTVAL (operands[3]), \"%$%3,0(sp)\"),
                         operands);
-  else if (address_operand (operands[3], SImode))
+  else if (GET_CODE (operands[3]) != REG
+          && GET_CODE (operands[3]) != MEM
+          && address_operand (operands[3], SImode))
        output_asm_insn (\"addr %a3,0(sp)\", operands);
   else
        output_asm_insn (\"movd %3,0(sp)\", operands);