This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: A patch for linux 2.1.127




On Sun, 8 Nov 1998, H.J. Lu wrote:
> 
> Here is a patch for Linux 2.1.127. Now I am running Linux 2.1.127
> compiled with egcs 1.1.1 prerelease using -O6.
> 
> I don't know whom to blame. I have to say both.

WHAT?

I refuse to listen to this kind of crap. It's obviously an egcs bug.

> The problem starts when egcs 1.1.1 inlines calibrate_tsc.

Which it shouldn't have done in the first place, but never mind. The
compiler can choose to inline a function if it wants to, but if it does so
it is not an excuse for creating buggy code. 

>			 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.

Reports like this is why I no longer bother with people who say the kernel
is buggy when it comes to egcs. The linux kernel is one of the things that
stresses the compiler the most when it comes to inline asm, but that does
NOT mean that whenever you find a bug you should blame the kernel. 

Hjl, don't bother sending these kinds of bug-reports to me any longer. If
you want to change the kernel due to compiler problems, please send me a
report that says:
 - egcs register allocation is buggy wrt inline asms, and the bug triggers
   in time.c
 - we could do the register allocation by hand, avoiding the compiler bug

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).

		Linus



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]