* Re: GCC-3.4 reorders asm() with -O2 [not found] ` <20040125164758.79373419.ak@suse.de> @ 2004-01-25 17:03 ` Daniel Jacobowitz 2004-01-25 18:26 ` Ralf Baechle 0 siblings, 1 reply; 4+ messages in thread From: Daniel Jacobowitz @ 2004-01-25 17:03 UTC (permalink / raw) To: Andi Kleen; +Cc: Jan Hubicka, echristo, hubicka, eager, gcc, linux-mips On Sun, Jan 25, 2004 at 04:47:58PM +0100, Andi Kleen wrote: > On Sun, 25 Jan 2004 11:05:14 +0100 > Jan Hubicka <jh@suse.cz> wrote: > > > > > > > > > > > > For x86 it does. For MIPS I'm quite sure it doesn't - well, it will > > > > compile, but not work. > > > > > > but, unlike x86 this is hardly a surprise on a daily basis. > > > > I think Andi has sollution that shall fix the other architectures in the > > kernel too. > > If it's the same problem that broke i386: Current bitkeeper should sort the exception tables > and fix it. It's actually done with a patch from Paul Mackerras. Of course it could be a different > issue too that's breaking MIPS. It is. Ralf already knows about the problem, I think - we leave markers outside of functions which define an entry point, save some additional registers to the stack, and try to fall through to the following function. If the function gets emitted elsewhere, obviously, we've lost :) [This is save_static_function...] -- Daniel Jacobowitz MontaVista Software Debian GNU/Linux Developer ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: GCC-3.4 reorders asm() with -O2 2004-01-25 17:03 ` GCC-3.4 reorders asm() with -O2 Daniel Jacobowitz @ 2004-01-25 18:26 ` Ralf Baechle 2004-01-25 19:28 ` Andi Kleen 0 siblings, 1 reply; 4+ messages in thread From: Ralf Baechle @ 2004-01-25 18:26 UTC (permalink / raw) To: Andi Kleen, Jan Hubicka, echristo, hubicka, eager, gcc, linux-mips On Sun, Jan 25, 2004 at 12:03:51PM -0500, Daniel Jacobowitz wrote: > It is. Ralf already knows about the problem, I think - we leave > markers outside of functions which define an entry point, save some > additional registers to the stack, and try to fall through to the > following function. If the function gets emitted elsewhere, obviously, > we've lost :) > > [This is save_static_function...] I only recently fixed the problem with the save_static() inline function which of course was fragile, speculating on the compiler doing the right thing ... I'll cook up a fix ... Ralf ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: GCC-3.4 reorders asm() with -O2 2004-01-25 18:26 ` Ralf Baechle @ 2004-01-25 19:28 ` Andi Kleen 2004-01-26 8:36 ` Ralf Baechle 0 siblings, 1 reply; 4+ messages in thread From: Andi Kleen @ 2004-01-25 19:28 UTC (permalink / raw) To: Ralf Baechle; +Cc: jh, echristo, hubicka, eager, gcc, linux-mips On Sun, 25 Jan 2004 19:26:43 +0100 Ralf Baechle <ralf@linux-mips.org> wrote: > On Sun, Jan 25, 2004 at 12:03:51PM -0500, Daniel Jacobowitz wrote: > > > It is. Ralf already knows about the problem, I think - we leave > > markers outside of functions which define an entry point, save some > > additional registers to the stack, and try to fall through to the > > following function. If the function gets emitted elsewhere, obviously, > > we've lost :) > > > > [This is save_static_function...] > > I only recently fixed the problem with the save_static() inline function > which of course was fragile, speculating on the compiler doing the > right thing ... I'll cook up a fix ... You can always use __attribute__((noinline)) -Andi ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: GCC-3.4 reorders asm() with -O2 2004-01-25 19:28 ` Andi Kleen @ 2004-01-26 8:36 ` Ralf Baechle 0 siblings, 0 replies; 4+ messages in thread From: Ralf Baechle @ 2004-01-26 8:36 UTC (permalink / raw) To: Andi Kleen; +Cc: jh, echristo, hubicka, eager, gcc, linux-mips On Sun, Jan 25, 2004 at 08:28:07PM +0100, Andi Kleen wrote: > > > It is. Ralf already knows about the problem, I think - we leave > > > markers outside of functions which define an entry point, save some > > > additional registers to the stack, and try to fall through to the > > > following function. If the function gets emitted elsewhere, obviously, > > > we've lost :) > > > > > > [This is save_static_function...] > > > > I only recently fixed the problem with the save_static() inline function > > which of course was fragile, speculating on the compiler doing the > > right thing ... I'll cook up a fix ... > > You can always use __attribute__((noinline)) Not in this particular case. save_static's purpose was saving all caller saved registers into the stack so they can be accessed via the usual struct pt_regs pointer and to make that work it to be inline before any change of these registers. That was a small optimization but it also was fragile so I removed that. save_static_function was meant to be used immediately preceeding a syscall's C function and served the same purpose. As the implementation ``knew'' gcc wasn't going to move around the code just falling though worked fine but again that was fragile. Ralf ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2004-01-26 12:10 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <4011C72C.613E25@mvista.com>
[not found] ` <20040124011955.GA12040@nevyn.them.org>
[not found] ` <20040124012303.GJ32288@atrey.karlin.mff.cuni.cz>
[not found] ` <20040124050849.GB14951@nevyn.them.org>
[not found] ` <1075009125.3649.0.camel@dzur.sfbay.redhat.com>
[not found] ` <20040125100514.GA8810@kam.mff.cuni.cz>
[not found] ` <20040125164758.79373419.ak@suse.de>
2004-01-25 17:03 ` GCC-3.4 reorders asm() with -O2 Daniel Jacobowitz
2004-01-25 18:26 ` Ralf Baechle
2004-01-25 19:28 ` Andi Kleen
2004-01-26 8:36 ` Ralf Baechle
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox