lkml.org 
[lkml]   [2000]   [Sep]   [19]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: __ucmpdi2
Date
In article <20000919083901.A463@twiddle.net>,
Richard Henderson <rth@twiddle.net> wrote:
>On Tue, Sep 19, 2000 at 12:22:41PM +0200, Andreas Schwab wrote:
>> IMHO it's a bug in gcc that it does not inline the comparison inside the
>> switch expression, since it already does it in all other places. Perhaps
>> some problem with the patterns in the machine description.
>
>Perhaps, but without a test case it's hard to know. My guess is that
>he's using gcc 2.7.2 or something decrepit like that; I couldn't reproduce
>the problem on current source with a simple test case.
>
>That said, I also think it is a bug that the kernel does not link
>against libgcc.

I'd love to link against libgcc, but for the fact that

- gcc developers have sometimes done horribly stupid things, and NOT
linking against libgcc has been an excellent way of not getting
bitten by it. Things like the exception handling etc, where not
linking against libgcc caused the kernel to not link - where that was
the RIGHT thing to do, because gcc had inserted completely bogus
exception handling into the code.

Proper fix: -fno-exceptions

- Linux developers often do horribly stupid things, and use 64-bit
division etc instead of using a simple shift. Again, not linking
against libgcc finds those things early rather than late, because the
horribly stupid things end up requireing libgcc support.

In the case of __ucmpdi2, it appears to be a combination of kernel and
compiler stupidity - there's no reason why __ucmpdi2 should not be done
inline by the compiler, but at the same time there is probably also
little reason to use a slow "long long" comparison in the kernel.

So again, not linking libgcc showed a problem. Good for us.

But yes, it is often much more convenient to not know about problems
like this. And some people don't think they are a big deal. I'd rather
nip them in the bud early than be "convenient", myself.

Linus
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/

\
 
 \ /
  Last update: 2005-03-22 12:45    [W:0.106 / U:4.176 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site