OSDN Git Service

(reload_outdf): Don't emit an add insn if the address is just a register.
authorerich <erich@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 9 Oct 1994 16:39:43 +0000 (16:39 +0000)
committererich <erich@138bc75d-0d04-0410-961f-82ee72b054a4>
Sun, 9 Oct 1994 16:39:43 +0000 (16:39 +0000)
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@8244 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/config/arm/arm.md

index e72acd3..5ace526 100644 (file)
    (match_operand:SI 2 "s_register_operand" "=&r")]
   ""
   "
-  emit_insn (gen_addsi3 (operands[2], XEXP (XEXP (operands[0], 0), 0),
-                        XEXP (XEXP (operands[0], 0), 1)));
+  if (GET_CODE (XEXP (operands[0], 0)) == REG)
+    operands[2] = XEXP (operands[0], 0);
+  else
+    emit_insn (gen_addsi3 (operands[2], XEXP (XEXP (operands[0], 0), 0),
+                          XEXP (XEXP (operands[0], 0), 1)));
   emit_insn (gen_rtx (SET, VOIDmode, gen_rtx (MEM, DFmode, operands[2]),
                      operands[1]));
   DONE;