This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: PATCH: [4.4/4.5 Regression] -fschedule-insns causes FAIL: gcc.target/i386/vararg-1.c execution test


On Wed, Apr 7, 2010 at 11:28 PM, Jan Hubicka <hubicka@ucw.cz> wrote:
>> How about this patch?
> Well, I am still not happy for mainline about this because it increases
> alignment for no real need, but it is OK for release branches.
> The reason why we did not hit this earlier is that the va_list variable
> itself bumps up stack alignment needs to 128 and thus we (almost) always
> have variadic functions requiring 128bit stack alignment.
>
> This is bug, I am testing more involved patch for mainline.
> Patch is OK for all release branches.

Note that the 4.5 branch is still frozen and all patches require
release manager approval there.  I see you still applied the
patch, we'll blame you for fallout.

Thanks,
Richard.

> Honza
>>
>>
>> --
>> H.J.
>
>> gcc/
>>
>> 2010-04-06 ?H.J. Lu ?<hongjiu.lu@intel.com>
>>
>> ? ? ? PR target/43668
>> ? ? ? * config/i386/i386.c (setup_incoming_varargs_64): Align stack to
>> ? ? ? 16byte for FP register save area.
>>
>> gcc/testsuite/
>>
>> 2010-04-06 ?H.J. Lu ?<hongjiu.lu@intel.com>
>>
>> ? ? ? PR target/43668
>> ? ? ? * gcc.target/i386/pr43668.c: New.
>>
>> diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
>> index c945a54..5176eb2 100644
>> --- a/gcc/config/i386/i386.c
>> +++ b/gcc/config/i386/i386.c
>> @@ -6785,6 +6785,10 @@ setup_incoming_varargs_64 (CUMULATIVE_ARGS *cum)
>>
>> ? ?if (ix86_varargs_fpr_size)
>> ? ? ?{
>> + ? ? ?/* Stack must be aligned to 16byte for FP register save area. ?*/
>> + ? ? ?if (crtl->stack_alignment_needed < 128)
>> + ? ? crtl->stack_alignment_needed = 128;
>> +
>> ? ? ? ?/* Now emit code to save SSE registers. ?The AX parameter contains number
>> ? ? ? ?of SSE parameter registers used to call this function. ?We use
>> ? ? ? ?sse_prologue_save insn template that produces computed jump across
>> --- /dev/null 2010-03-31 15:02:03.585768648 -0700
>> +++ gcc/gcc/testsuite/gcc.target/i386/pr43668.c ? ? ? 2010-04-06 22:50:40.000000000 -0700
>> @@ -0,0 +1,10 @@
>> +/* PR target/43668 */
>> +/* { dg-do run } */
>> +/* { dg-options "-fschedule-insns" } */
>> +
>> +int foo(int i, ...) {
>> + ?return i;
>> +}
>> +int main() {
>> + ?return foo(0, 0.0);
>> +}
>
>


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]