Re: long long in kernel

Jes Sorensen (Jes.Sorensen@cern.ch)
06 May 1999 09:39:45 +0200


>>>>> "Bryan" == B James Phillippe <bryan@terran.org> writes:

Bryan> Hello, I'm looking at a kernel driver module which makes use of
Bryan> the gcc-ism of "long long" to represent a 64-bit variable on
Bryan> 32-bit architectures. I assume that this takes some kind of
Bryan> performance hit or other undesirable side-effect, or else it
Bryan> would be used more often. :-) What are the reasons to _not_ use
Bryan> this variable type within the kernel?

Main reason: long long generates crap code on 32 bit architectures,
you are better off doing it by hand if it is in any way near
performance critical code. Also on 32 bit archs you can often get away
with just setting the upper 32 bits to zero and leaving them like
that.

I am curious, what sorta device requires 64 bit entities on a 32 bit
architecture?

Jes

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