linux-kernels and -foptimize-sibling-calls
Jakub Jelinek
jakub@redhat.com
Thu Oct 12 22:46:00 GMT 2000
On Thu, Oct 12, 2000 at 10:46:43PM +0200, Franz Sirl wrote:
> Hi,
>
> what's the word about linux-2.4, current CVS compilers and
> -foptimize-sibling-calls (on fby default or -O2)? Unless I disable this
> option the TCP stack behaves strangely on PPC and I seem to remember a
> similar comment for x86 from someone else on the GCC lists. IIRC, this is a
> somewhat expected behaviour due to the coding used in the Linux TCP stack. If
> so, I will post a patch on linux-kernel to turn off this optimization if the
> compiler supports it, similar to what has been done to turn off
> -fstrict-aliasing during kernel compilation.
>
> Otherwise, if this is a real bug in the sibling call optimization, I will try
> to come up with a testcase.
I'm not aware of any sibling call related bugs at the moment.
There has been several, but they have been fixed since then (and to my
knowledge everything should be in CVS).
Current CVS will miscompile ia32 kernel though because of a regmove bug
where it merges stack adjustements accross an asm, so that when interrupt
comes in that asm (it is actually down or something like that), the stack
area where the semaphore is is already below %sp and thus volatile.
We have a workaround for this in RHL7 gcc, Jan Hubicka posted a patch for
this a couple of weeks ago as well. We'll need to look at that patch once
again, fix it if needed and commit it in the near future.
So, if you have problems with it, then please work on a testcase.
Jakub
More information about the Gcc
mailing list