Commit 11eef578 by Eric Botcazou Committed by Eric Botcazou

alpha.c (alpha_expand_prologue): Fix off-by-one bug in the stack probing loop.

	* config/alpha/alpha.c (alpha_expand_prologue): Fix off-by-one bug
	in the stack probing loop.

From-SVN: r107069
parent 1e04bfdc
2005-11-16 Eric Botcazou <ebotcazou@adacore.com>
* config/alpha/alpha.c (alpha_expand_prologue): Fix off-by-one bug
in the stack probing loop.
2005-11-15 David Edelsohn <edelsohn@gnu.org> 2005-11-15 David Edelsohn <edelsohn@gnu.org>
* configure.ac: Use .machine power5 not power5x. * configure.ac: Use .machine power5 not power5x.
......
...@@ -7546,16 +7546,15 @@ alpha_expand_prologue (void) ...@@ -7546,16 +7546,15 @@ alpha_expand_prologue (void)
{ {
if (frame_size > 4096) if (frame_size > 4096)
{ {
int probed = 4096; int probed;
do for (probed = 4096; probed < frame_size; probed += 8192)
emit_insn (gen_probe_stack (GEN_INT (TARGET_ABI_UNICOSMK emit_insn (gen_probe_stack (GEN_INT (TARGET_ABI_UNICOSMK
? -probed + 64 ? -probed + 64
: -probed))); : -probed)));
while ((probed += 8192) < frame_size);
/* We only have to do this probe if we aren't saving registers. */ /* We only have to do this probe if we aren't saving registers. */
if (sa_size == 0 && probed + 4096 < frame_size) if (sa_size == 0 && frame_size > probed - 4096)
emit_insn (gen_probe_stack (GEN_INT (-frame_size))); emit_insn (gen_probe_stack (GEN_INT (-frame_size)));
} }
......
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