operands[1] = force_reg (SImode, operands[1]);
if (CONSTANT_P (operands[1]) && GET_CODE (operands[1]) != CONST_INT)
- operands[1] = force_const_mem (SImode, operands[1]);
+ {
+ operands[1] = force_const_mem (SImode, operands[1]);
+ if (! memory_address_p (SImode, XEXP (operands[1], 0))
+ && ! reload_in_progress)
+ operands[1] = change_address (operands[1], SImode,
+ XEXP (operands[1], 0));
+ }
if (GET_CODE (operands[1]) == CONST_INT
&& (unsigned) (INTVAL (operands[1]) + 0x8000) >= 0x10000
operands[1] = force_reg (HImode, operands[1]);
if (CONSTANT_P (operands[1]) && GET_CODE (operands[1]) != CONST_INT)
- operands[1] = force_const_mem (HImode, operands[1]);
+ {
+ operands[1] = force_const_mem (HImode, operands[1]);
+ if (! memory_address_p (HImode, XEXP (operands[1], 0))
+ && ! reload_in_progress)
+ operands[1] = change_address (operands[1], HImode,
+ XEXP (operands[1], 0));
+ }
}")
(define_insn ""
operands[1] = force_reg (QImode, operands[1]);
if (CONSTANT_P (operands[1]) && GET_CODE (operands[1]) != CONST_INT)
- operands[1] = force_const_mem (QImode, operands[1]);
+ {
+ operands[1] = force_const_mem (QImode, operands[1]);
+ if (! memory_address_p (QImode, XEXP (operands[1], 0))
+ && ! reload_in_progress)
+ operands[1] = change_address (operands[1], QImode,
+ XEXP (operands[1], 0));
+ }
}")
(define_insn ""