+2013-06-27 Yufeng Zhang <yufeng.zhang@arm.com>
+
+ * config/aarch64/aarch64.c (aarch64_force_temporary): Add an extra
+ parameter 'mode' of type 'enum machine_mode mode'; change to pass
+ 'mode' to force_reg.
+ (aarch64_add_offset): Update calls to aarch64_force_temporary.
+ (aarch64_expand_mov_immediate): Likewise.
+
2013-06-27 Yufeng Zhang <yufeng.zhang@arm.com>
* config/aarch64/aarch64.c (aarch64_add_offset): Change to pass
}
static rtx
-aarch64_force_temporary (rtx x, rtx value)
+aarch64_force_temporary (enum machine_mode mode, rtx x, rtx value)
{
if (can_create_pseudo_p ())
- return force_reg (Pmode, value);
+ return force_reg (mode, value);
else
{
x = aarch64_emit_move (x, value);
might be improvable in the future. */
high = GEN_INT (offset);
offset = 0;
- high = aarch64_force_temporary (temp, high);
- reg = aarch64_force_temporary (temp, gen_rtx_PLUS (mode, high, reg));
+ high = aarch64_force_temporary (mode, temp, high);
+ reg = aarch64_force_temporary (mode, temp,
+ gen_rtx_PLUS (mode, high, reg));
}
return plus_constant (mode, reg, offset);
}
&& targetm.cannot_force_const_mem (mode, imm))
{
gcc_assert(can_create_pseudo_p ());
- base = aarch64_force_temporary (dest, base);
+ base = aarch64_force_temporary (mode, dest, base);
base = aarch64_add_offset (mode, NULL, base, INTVAL (offset));
aarch64_emit_move (dest, base);
return;
if (offset != const0_rtx)
{
gcc_assert(can_create_pseudo_p ());
- base = aarch64_force_temporary (dest, base);
+ base = aarch64_force_temporary (mode, dest, base);
base = aarch64_add_offset (mode, NULL, base, INTVAL (offset));
aarch64_emit_move (dest, base);
return;