Re: gcc 4.5.1 / as 2.20.51.0.11 miscompiling drivers/char/i8k.c ?

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Jakub Jelinek
Date: Monday, November 15, 2010 - 1:56 am

On Sun, Nov 14, 2010 at 07:21:50PM -0800, Linus Torvalds wrote:

I'll leave the discussion about meaning of "memory" clobber aside to
Richard,


just to say that of course there are sane options left.

	    :"=a"(rc), "+m" (*regs)
            :    "a"(regs)
            :    "%ebx", "%ecx", "%edx", "%esi", "%edi", "memory");

is simply too high register pressure for i386 if you force also
-fno-omit-frame-pointer, there is not a single register left.

Yes, reload should figure out it has address of regs already tied to %eax,
unfortunately starting with IRA it doesn't (I'll file a GCC bug about that;
so that leaves 4.4/4.5/4.6 currently not being able to compile it).

That said, changing the inline asm to just clobber one less register
would be completely sufficient to make it work well with all gccs out there,
just push/pop one of the register around the whole body.  I doubt calling
out SMM BIOS is actually so performance critical that one push and one pop
would ruin it.  Of course x86_64 version can stay as is, there are enough
registers left...

	Jakub
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH] i8k: Tell gcc that *regs gets clobbered, Jim Bos, (Sat Nov 13, 4:13 am)
Re: gcc 4.5.1 / as 2.20.51.0.11 miscompiling drivers/char/ ..., Jakub Jelinek, (Mon Nov 15, 1:56 am)
Re: gcc 4.5.1 / as 2.20.51.0.11 miscompiling drivers/char/ ..., Richard Henderson, (Mon Nov 15, 12:53 pm)