This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[Patch] [mingw/cygwin] Use "__chkstk" label rather than "_alloca" to probe the stack
- From: "Danny Smith" <dansmister at gmail dot com>
- To: "GCC Patches" <gcc-patches at gcc dot gnu dot org>
- Date: Tue, 4 Mar 2008 22:57:16 +1300
- Subject: [Patch] [mingw/cygwin] Use "__chkstk" label rather than "_alloca" to probe the stack
As indicated by PR 35124
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=35124
the use of the name _alloca to probe the stack may cause user confusion
with the regular function named alloca (and in MSVC-land the regular
function name _alloca). This patch changes the insn
"allocate_stack_worker_32" to call "__chkstk" rather than the _alloca
alias, as per the TARGET_64BIT path
As committed.
2008-03-04 Danny Smith <dannysmith@users.sourceforge.net>
* config/i386/i386.md (allocate_stack_worker_32): Use __chkstk
label to probe the stack.
Index: config/i386/i386.md
===================================================================
--- config/i386/i386.md (revision 132853)
+++ config/i386/i386.md (working copy)
@@ -19873,7 +19873,7 @@
(set (reg:SI SP_REG) (minus:SI (reg:SI SP_REG) (match_dup 0)))
(clobber (reg:CC FLAGS_REG))]
"!TARGET_64BIT && TARGET_STACK_PROBE"
- "call\t__alloca"
+ "call\t___chkstk"
[(set_attr "type" "multi")
(set_attr "length" "5")])