xoperands[2]
= gen_rtx (MEM, QImode,
gen_rtx (PLUS, VOIDmode, stack_pointer_rtx, const1_rtx));
- xoperands[3] = stack_pointer_rtx;
/* Just pushing a byte puts it in the high byte of the halfword. */
/* We must put it in the low-order, high-numbered byte. */
- output_asm_insn (\"subq%.w %#2,%3\;move%.b %1,%2\", xoperands);
+ output_asm_insn (\"move%.b %1,%-\;move%.b %@,%2\", xoperands);
return \"\";
}
+ /* Moving a byte into an address register is not possible. */
+ /* Use d0 as an intermediate, but don't clobber its contents. */
if (ADDRESS_REG_P (operands[0]) && GET_CODE (operands[1]) == MEM)
- {
- xoperands[1] = operands[1];
- xoperands[2]
- = gen_rtx (MEM, QImode,
- gen_rtx (PLUS, VOIDmode, stack_pointer_rtx, const1_rtx));
- xoperands[3] = stack_pointer_rtx;
- /* Just pushing a byte puts it in the high byte of the halfword. */
- /* We must put it in the low half, the second byte. */
- output_asm_insn (\"subq%.w %#2,%3\;move%.b %1,%2\", xoperands);
- return \"move%.w %+,%0\";
- }
+ return \"exg %/d0,%0\;move%.b %1,%/d0\;exg %/d0,%0\";
+ /* Likewise for moving from an address reg. */
if (ADDRESS_REG_P (operands[1]) && GET_CODE (operands[0]) == MEM)
- {
- xoperands[0] = operands[0];
- xoperands[1] = operands[1];
- xoperands[2]
- = gen_rtx (MEM, QImode,
- gen_rtx (PLUS, VOIDmode, stack_pointer_rtx, const1_rtx));
- xoperands[3] = stack_pointer_rtx;
- output_asm_insn (\"move%.w %1,%-\;move%.b %2,%0\;addq%.w %#2,%3\", xoperands);
- return \"\";
- }
+ return \"exg %/d0,%1\;move%.b %/d0,%0\;exg %/d0,%1\";
+
/* clr and st insns on 68000 read before writing.
This isn't so on the 68010, but we have no alternative for it. */
if (TARGET_68020