+2014-02-18 Kai Tietz <ktietz@redhat.com>
+
+ PR target/60193
+ * config/i386/i386.c (ix86_expand_prologue): Use
+ rax register as displacement for restoring %r10, %rax.
+ Additional fix wrong offset for restoring both-registers.
+
2014-02-18 Eric Botcazou <ebotcazou@adacore.com>
* ipa-prop.c (compute_complex_ancestor_jump_func): Replace overzealous
rtx r10 = NULL;
rtx (*adjust_stack_insn)(rtx, rtx, rtx);
const bool sp_is_cfa_reg = (m->fs.cfa_reg == stack_pointer_rtx);
- bool eax_live = false;
+ bool eax_live = ix86_eax_live_at_start_p ();
bool r10_live = false;
if (TARGET_64BIT)
r10_live = (DECL_STATIC_CHAIN (current_function_decl) != 0);
- eax_live = ix86_eax_live_at_start_p ();
if (eax_live)
{
insn = emit_insn (gen_push (eax));
works for realigned stack, too. */
if (r10_live && eax_live)
{
- t = plus_constant (Pmode, stack_pointer_rtx, allocate);
+ t = gen_rtx_PLUS (Pmode, stack_pointer_rtx, eax);
emit_move_insn (gen_rtx_REG (word_mode, R10_REG),
gen_frame_mem (word_mode, t));
- t = plus_constant (Pmode, stack_pointer_rtx,
- allocate - UNITS_PER_WORD);
+ t = plus_constant (Pmode, t, UNITS_PER_WORD);
emit_move_insn (gen_rtx_REG (word_mode, AX_REG),
gen_frame_mem (word_mode, t));
}
else if (eax_live || r10_live)
{
- t = plus_constant (Pmode, stack_pointer_rtx, allocate);
+ t = gen_rtx_PLUS (Pmode, stack_pointer_rtx, eax);
emit_move_insn (gen_rtx_REG (word_mode,
(eax_live ? AX_REG : R10_REG)),
gen_frame_mem (word_mode, t));