summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4>2005-11-16 07:23:40 +0000
committerebotcazou <ebotcazou@138bc75d-0d04-0410-961f-82ee72b054a4>2005-11-16 07:23:40 +0000
commitbaf8b2ccde1752f8c403606adbdd39eb1c684f8f (patch)
tree5ec86dad6963ce14881bb154a81c0c7ca9af20a9
parent015fab101976eb4dac66435b81e4958619fa652b (diff)
downloadgcc-baf8b2ccde1752f8c403606adbdd39eb1c684f8f.tar.gz
* config/alpha/alpha.c (alpha_expand_prologue): Fix off-by-one bug
in the stack probing loop. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@107069 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/config/alpha/alpha.c7
2 files changed, 8 insertions, 4 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 9e5cf17c683..21765a2e8a8 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+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>
* configure.ac: Use .machine power5 not power5x.
diff --git a/gcc/config/alpha/alpha.c b/gcc/config/alpha/alpha.c
index ec53778ce18..a14b5d31e64 100644
--- a/gcc/config/alpha/alpha.c
+++ b/gcc/config/alpha/alpha.c
@@ -7546,16 +7546,15 @@ alpha_expand_prologue (void)
{
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
? -probed + 64
: -probed)));
- while ((probed += 8192) < frame_size);
/* 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)));
}