This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
PING: PATCH: PR target/37843:[4.4 Regression] unaligned stack in maindue to tail call optimizatiP
- From: "H.J. Lu" <hjl dot tools at gmail dot com>
- To: "Uros Bizjak" <ubizjak at gmail dot com>
- Cc: "Ye, Joey" <joey dot ye at intel dot com>, gcc-patches at gcc dot gnu dot org, "Guo, Xuepeng" <xuepeng dot guo at intel dot com>, "Ian Lance Taylor" <iant at google dot com>, "Richard Guenther" <rguenther at suse dot de>
- Date: Fri, 24 Oct 2008 15:38:10 -0700
- Subject: PING: PATCH: PR target/37843:[4.4 Regression] unaligned stack in maindue to tail call optimizatiP
On Fri, Oct 17, 2008 at 10:06 AM, Uros Bizjak <ubizjak@gmail.com> wrote:
> H.J. Lu wrote:
>
>>
>> The problem is sibcall optimization will use the incoming stack
>> boundary as the outgoing stack boundary. It is OK as long as
>> the incoming stack boundary >= the outgoing stack boundary.
>> ix86_function_ok_for_sibcall needs to know the precise incoming
>> stack boundary, which is set in expand_stack_alignment, to
>> check if the incoming stack boundary >= the outgoing stack
>> boundary.
>>
>> This patch moves updating stack boundary before
>> TARGET_FUNCTION_OK_FOR_SIBCALL is called. It
>> changes cfgexpand.c and i386.c. OK for trunk?
>>
>> Thanks.
>>
>> 2008-10-15 H.J. Lu <hongjiu.lu@intel.com>
>> Joey Ye <joey.ye@intel.com>
>>
>> PR target/37843
>> * cfgexpand.c (expand_stack_alignment): Move updating stack
>> boundary to ...
>> (gimple_expand_cfg): Here.
>>
>> * config/i386/i386.c (ix86_function_ok_for_sibcall): Return
>> false if we need to align the outgoing stack.
>> (ix86_update_stack_boundary): Check parm_stack_boundary.
>>
>> gcc/testsuite/
>>
>> 2008-10-15 H.J. Lu <hongjiu.lu@intel.com>
>>
>> PR target/37843
>> * gcc.target/i386/align-main-3.c: New.
>> * gcc.target/i386/pr37843-1.c: Likewise.
>> * gcc.target/i386/pr37843-2.c: Likewise.
>> * gcc.target/i386/pr37843-3.c: Likewise.
>
> x86 part is OK, but generic part needs middle-end review.
>
> Thanks,
> Uros.
>
Could middle-end reviewers take a look at cfgexpand.c change?
Thanks.
--
H.J.