This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Patch: Re: optimization/8750: Cygwin prolog generation erroneously emitting __alloca as regular function call
- From: Danny Smith <danny_r_smith_2001 at yahoo dot co dot nz>
- To: GCC Patches <gcc-patches at gcc dot gnu dot org>
- Cc: rth at redhat dot com, Christopher Faylor <cgf at redhat dot com>
- Date: Fri, 20 Dec 2002 07:24:34 +1100 (EST)
- Subject: Patch: Re: optimization/8750: Cygwin prolog generation erroneously emitting __alloca as regular function call
http://gcc.gnu.org/cgi-bin/gnatsweb.pl?cmd=view%20audit-trail&database=gcc&pr=8750
The followin fixes PR optimization/8750, a serious regression from 2.95
on W32 targets (which set TARGET_STACK_PROBE)
Tested on 3.2 and 3.3 branches with i386-pc-mingw32.
Can someone with more knowledge of 1386 backend please review and
perhaps suggest less naive fix.
ChangeLog
2002-12-19 Danny Smith <dannysmith@users.sourceforge.net>
PR optimization/8750
* config/i386/i386.c (ix86_expand_prologue): Don't allow
scheduling pass to move insns across __alloca call.
Index: i386.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/i386/i386.c,v
retrieving revision 1.495
diff -c -3 -p -r1.495 i386.c
*** i386.c 9 Dec 2002 23:53:59 -0000 1.495
--- i386.c 19 Dec 2002 10:44:08 -0000
*************** ix86_expand_prologue ()
*** 4516,4521 ****
--- 4516,4525 ----
CALL_INSN_FUNCTION_USAGE (insn)
= gen_rtx_EXPR_LIST (VOIDmode, gen_rtx_USE (VOIDmode, arg0),
CALL_INSN_FUNCTION_USAGE (insn));
+
+ /* Don't allow scheduling pass to move insns across __alloca
+ call. */
+ emit_insn (gen_blockage (const0_rtx));
}
if (use_mov)
{
http://greetings.yahoo.com.au - Yahoo! Greetings
- Send your seasons greetings online this year!