re PR target/56807 (mingw32: Conflict between stack realignment and stack probe destroys function argument in EAX)

PR target/56807
    * config/i386/i386.c (ix86_expand_prologue): Address saved
    registers stack-relative, not via frame-pointer.

From-SVN: r205860
This commit is contained in:
Kai Tietz 2013-12-10 17:36:53 +01:00 committed by Kai Tietz
parent bf2d1a6526
commit e7b4ce6414
2 changed files with 12 additions and 3 deletions

View File

@ -1,3 +1,9 @@
2013-12-10 Kai Tietz <ktietz@redhat.com>
PR target/56807
* config/i386/i386.c (ix86_expand_prologue): Address saved
registers stack-relative, not via frame-pointer.
2013-12-10 Richard Biener <rguenther@suse.de>
PR middle-end/38474

View File

@ -10946,18 +10946,21 @@ ix86_expand_prologue (void)
}
m->fs.sp_offset += allocate;
/* Use stack_pointer_rtx for relative addressing so that code
works for realigned stack, too. */
if (r10_live && eax_live)
{
t = choose_baseaddr (m->fs.sp_offset - allocate);
t = plus_constant (Pmode, stack_pointer_rtx, allocate);
emit_move_insn (gen_rtx_REG (word_mode, R10_REG),
gen_frame_mem (word_mode, t));
t = choose_baseaddr (m->fs.sp_offset - allocate - UNITS_PER_WORD);
t = plus_constant (Pmode, stack_pointer_rtx,
allocate - 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 = choose_baseaddr (m->fs.sp_offset - allocate);
t = plus_constant (Pmode, stack_pointer_rtx, allocate);
emit_move_insn (gen_rtx_REG (word_mode,
(eax_live ? AX_REG : R10_REG)),
gen_frame_mem (word_mode, t));