This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [Patch] Adjustments for Windows x64 SEH
On Jun 18, 2012, at 4:28 PM, Kai Tietz wrote:
> Hello Tristan,
>
> patch works for me, too. Just one nit about the patch.
>
> 2012/6/18 Tristan Gingold <gingold@adacore.com>:
>> @@ -8558,6 +8558,11 @@ ix86_frame_pointer_required (void)
>> if (TARGET_32BIT_MS_ABI && cfun->calls_setjmp)
>> return true;
>>
>> + /* Win64 SEH, very large frames need a frame-pointer as maximum stack
>> + allocation is 4GB (add a safety guard for saved registers). */
>> + if (TARGET_64BIT_MS_ABI && get_frame_size () + 4096 > SEH_MAX_FRAME_SIZE)
>> + return true;
> Where does this magic 4096 comes from? Is it intended to be the
> page-size, or is it meant to be the maximum stack-frame consumed by
> prologue? I would suggest to use here instead:
> + if (TARGET_64BIT_MS_ABI && get_frame_size () > (SEH_MAX_FRAME_SIZE - 4096))
> + return true;
>
> Additional a testcase for big-stackframe would be interesting. You
> won't need to make here a execution test, a assembler-scan would be
> enough.
I suppose this is checked by large-frame.c. But it requires lp64; what is the correct writing to enable this test only on 64bit mode ?
Tristan.