This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[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")])


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]