[patch i386]: Change stack probing and allocation implementation

Kai Tietz ktietz70@googlemail.com
Sat Aug 21 15:53:00 GMT 2010


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.
>
>
> Tested for i686-pc-mingw32 and x86_64-w64-mingw32. Ok for apply?

I notice that I didn't sent the updated patch.

Kai

-- 
|  (\_/) This is Bunny. Copy and paste
| (='.'=) Bunny into your signature to help
| (")_(") him gain world domination
-------------- next part --------------
A non-text attachment was scrubbed...
Name: new_chkstk.diff
Type: application/octet-stream
Size: 6055 bytes
Desc: not available
URL: <http://gcc.gnu.org/pipermail/gcc-patches/attachments/20100821/d181b0e8/attachment.obj>


More information about the Gcc-patches mailing list