Commit b45863ec by Richard Kenner

(movqi, movhi, movsi): Make sure that address returned from

force_const_mem is valid.

From-SVN: r4475
parent fe33bfb3
......@@ -2090,7 +2090,13 @@
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
......@@ -2162,7 +2168,13 @@
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 ""
......@@ -2190,7 +2202,13 @@
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 ""
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment