[patch i386]: Change stack probing and allocation implementation
Richard Henderson
rth@redhat.com
Sun Sep 26 15:11:00 GMT 2010
On 08/21/2010 08:23 AM, Kai Tietz wrote:
> 2010/8/19 Kai Tietz <ktietz70@googlemail.com>:
>> Hello,
>>
>> the behavior of i386's stack allocation with probing (via ___chkstk)
>> has some disadvantages. First the probing code is more costy on
>> execution then necessary - this hits mainly win32 targets where
>> stack-probing is active by default for stack-allocation >= 0x1000
>> bytes - and it is additionally incompatible to the variant of chkstk
>> in msvcrt.
>> Additionally this new version avoids some register clobbering for
>> 64-bit and it simplifies the prologue generation a bit.
>>
>> 2010-08-19 Kai Tietz
>>
>> * config/i386/cygwin.asm (___chkstk_ms): New.
>> * config/i386/i386.c (override_options): Replace
>> gen_allocate_stack_worker_,, by gen_allocate_stack_worker_probe_,,.
>> (ix86_expand_prologue): Adjust probed stack allocation.
>> * config/i386/i386.md (define_insn "allocate_stack_worker_32): Removed.
>> (define_insn "allocate_stack_worker_64): Removed.
>> (define_insn "allocate_stack_worker_probe_32): New.
>> (define_insn "allocate_stack_worker_probe_64): New.
>> (allocate_stack): Adjust probed stack allocation.
I altered the patch a bit. Tidied up the .md changes with macros,
tidied up the assembly file with multiple object files and dwarf2
unwind info. Adjusted the prologue code to use the value in eax.
Tested on i686-cygwin, i686-linux, x86_64-linux, x86_63-mingw.
Committed.
r~
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: z
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20100926/4d074b2b/attachment.ksh>
More information about the Gcc-patches
mailing list