This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: BUG: GCC-4.4.x changes the function frame on some functions
- From: Andrew Haley <aph at redhat dot com>
- To: Thomas Gleixner <tglx at linutronix dot de>
- Cc: Jeff Law <law at redhat dot com>, rostedt at goodmis dot org, "H. Peter Anvin" <hpa at zytor dot com>, David Daney <ddaney at caviumnetworks dot com>, Linus Torvalds <torvalds at linux-foundation dot org>, Richard Guenther <richard dot guenther at gmail dot com>, Ingo Molnar <mingo at elte dot hu>, LKML <linux-kernel at vger dot kernel dot org>, Andrew Morton <akpm at linux-foundation dot org>, Heiko Carstens <heiko dot carstens at de dot ibm dot com>, feng dot tang at intel dot com, Fr??d??ric Weisbecker <fweisbec at gmail dot com>, Peter Zijlstra <peterz at infradead dot org>, jakub at redhat dot com, gcc at gcc dot gnu dot org
- Date: Fri, 20 Nov 2009 12:22:40 +0000
- Subject: Re: BUG: GCC-4.4.x changes the function frame on some functions
- References: <viy9pk4xossnb6m2v041qu00.1258665258503@email.android.com> <4B05B7AD.20500@redhat.com> <1258670580.22249.1002.camel@gandalf.stny.rr.com> <4B05DBBF.5000804@redhat.com> <alpine.LFD.2.00.0911200122190.24119@localhost.localdomain> <4B0685B7.4060601@redhat.com>
Andrew Haley wrote:
> Thomas Gleixner wrote:
>
>> While testing various kernel configs we found out that the problem
>> comes and goes. Finally I started to compare the gcc command line
>> options and after some fiddling it turned out that the following
>> minimal deltas change the code generator behaviour:
>>
>> Bad: -march=pentium-mmx -Wa,-mtune=generic32
>> Good: -march=i686 -mtune=generic -Wa,-mtune=generic32
>> Good: -march=pentium-mmx -mtune-generic -Wa,-mtune=generic32
>>
>> I'm not supposed to understand the logic behind that, right ?
>
> I don't either. I'm seeing:
>
> timer_stats_update_stats: timer_stats_update_stats:
> pushl %edi <
> leal 8(%esp), %edi <
> andl $-16, %esp <
> pushl -4(%edi) <
> pushl %ebp pushl %ebp
> movl %esp, %ebp movl %esp, %ebp
> pushl %edi | andl $-16, %esp
> pushl %esi | subl $112, %esp
> pushl %ebx | movl %ebx, 100(%esp)
> subl $108, %esp | movl %esi, 104(%esp)
> > movl %edi, 108(%esp)
> call mcount call mcount
>
> where the only difference is -mtune=generic. I'm investigating.
Forget that, I see from the gcc-bugs list that hj has tracked it down to
the use of DRAP, and for some reason the mtune options affect that. He's
the best person to fix this.
Andrew.