[lkml]   [2009]   [Nov]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: BUG: GCC-4.4.x changes the function frame on some functions

On Fri, 20 Nov 2009, 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 ?

Are you sure it's just the compiler flags?

There's another configuration portion: the size of the alignment itself.
That's dependent on L1_CACHE_SHIFT, which in turn is taken from the kernel

Maybe that value matters too - for example maybe gcc will not try to align
the stack if it's big?

[ Btw, looking at that, why are X86_L1_CACHE_BYTES and X86_L1_CACHE_SHIFT
totally unrelated numbers? Very confusing. ]

The compiler flags we use are tied to some of the same choices that choose
the cache shift, so the correlation you found while debugging this would
still hold.


 \ /
  Last update: 2009-11-20 02:03    [W:0.076 / U:0.372 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site