Re: egcs 1.0.1 miscompiles Linux 2.0.33

Jeffrey A Law (law@hurl.cygnus.com)
Fri, 27 Feb 1998 00:59:29 -0700


In message <Pine.LNX.3.95.980225210447.14073B-100000@penguin.transmeta.com>yoite:
> On 25 Feb 1998, Andi Kleen wrote:
> >
> > Last time a similar problem came up (with pgcc) it was attributed to
> > some bad contraints in asm-i386/string.h. When I remember it right Linus
> > argued at this time that gcc wasn't following its own documented
> > behaviour so that he didn't intent to fix it in the kernel.
>
> Right. As far as I can tell, Linux does completely legal asm statements.
> And here "legal" isn't some arbitrary decision by me, but according to all
> the documentation and the obvious meaning of things.
Agreed. The documentation is a little ambigious, but the natural
meaning of a clobber would be that it can't be used for an input
operand *or* in the address of an input operand.

> > Afaik the ioport.c problem (which doesn't occur on egcs 1.0.x because
> > it doesn't do the ADDRESSOF optimization yet)
>
> Note that the ADDRESSOF optimization is a completely valid one, and when I
> heard that gcc was breaking that particular thing I was very happy - it
> meant only that gcc was getting more clever. I knew that code was fragile
> when I wrote it, but it happened to work.
Ah. Good. I was under the impression it was producing incorrect
code, but apparently the asm was slightly bogus.

> > and this string.h problem
> > that bites with some drivers are the only known problems that cause the
> > Linux kernel to be miscompiled by egcs/gcc 2.8.0
>
> But the string.h one is definitely a gcc bug, and nobody has convinced me
> otherwise.
Agreed. And I've got that message from Gabriel. But what I do
not have is something I can compile which will show the bug. Can
someone please send me an actual use of the asm which generates
incorrect code? ie, something I can feed directly into the compiler
so that I can analyze why the compiler is generating the wrong code.

The asm itself isn't enough, these kinds of bugs usually depend on
the use and code surrounding the use.

Thanks,

jeff

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu