backport: re PR target/60193 (ICE on big nested frame)

2014-02-18  Kai Tietz  <ktietz@redhat.com>

	Backport from mainline
	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  Kai Tietz  <ktietz@redhat.com>

	PR target/60193
	* gcc.target/i386/nest-1.c: New testcase.

From-SVN: r207846
This commit is contained in:
Kai Tietz 2014-02-18 14:46:38 +01:00 committed by Kai Tietz
parent 707ca89a14
commit 45cac726fa
4 changed files with 30 additions and 4 deletions

View File

@ -1,3 +1,11 @@
2014-02-18 Kai Tietz <ktietz@redhat.com>
Backport from mainline
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

View File

@ -10434,15 +10434,14 @@ ix86_expand_prologue (void)
if (r10_live && eax_live)
{
t = plus_constant (stack_pointer_rtx, allocate);
t = gen_rtx_PLUS (Pmode, stack_pointer_rtx, eax);
emit_move_insn (r10, gen_frame_mem (Pmode, t));
t = plus_constant (stack_pointer_rtx,
allocate - UNITS_PER_WORD);
t = plus_constant (t, UNITS_PER_WORD);
emit_move_insn (eax, gen_frame_mem (Pmode, t));
}
else if (eax_live || r10_live)
{
t = plus_constant (stack_pointer_rtx, allocate);
t = gen_rtx_PLUS (Pmode, stack_pointer_rtx, eax);
emit_move_insn ((eax_live ? eax : r10), gen_frame_mem (Pmode, t));
}
}

View File

@ -1,3 +1,8 @@
2014-02-18 Kai Tietz <ktietz@redhat.com>
PR target/60193
* gcc.target/i386/nest-1.c: New testcase.
2014-02-18 Eric Botcazou <ebotcazou@adacore.com>
* gnat.dg/opt32.adb: New test.

View File

@ -0,0 +1,14 @@
/* { dg-do compile { target llp64 } } */
/* { dg-options "" } */
void foo (int i)
{
void nested (void)
{
char arr[(1U << 31) + 4U];
arr[i] = 0;
}
nested ();
}