This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: A patch for linux 2.1.127
- To: Linus Torvalds <torvalds at transmeta dot com>
- Subject: Re: A patch for linux 2.1.127
- From: Bernd Schmidt <crux at pool dot informatik dot rwth-aachen dot de>
- Date: Sun, 8 Nov 1998 23:54:52 +0100 (MET)
- cc: "H.J. Lu" <hjl at lucon dot org>, egcs at cygnus dot com, linux kernel <linux-kernel at vger dot rutgers dot edu>
On Sun, 8 Nov 1998, Linus Torvalds wrote:
> On Sun, 8 Nov 1998, H.J. Lu wrote:
>
> > For
> >
> > : "r" (5 * 1000020/HZ)
> >
> > It puts 5 * 1000020/HZ in eax.
>
> Which is very obviously buggy, as the asm also has a clobber of "eax".
>
> This is not one of the cases where the documentation is unclear - it's
> very clear on this issue.. It is very very obviously a compiler bug, and
> anybody saying anything else is just misguided.
[...]
> However, even then I'd wonder what ELSE is broken. I don't see any other
> real fix than fixing egcs (at least making it raise an error when it can't
> do register allocation, rather than generating incorrect code).
The most recent egcs snapshot has a fix for this and other known bugs with
asm statements (as well as fixes for -mregparm). Can we now please fix
those cases in the kernel as well where it uses asm statements that are
really incorrect?
Bernd