This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: long long / long long
- To: gcc at gcc dot gnu dot org
- Subject: Re: long long / long long
- From: Florian Weimer <Florian dot Weimer at RUS dot Uni-Stuttgart dot DE>
- Date: 10 Sep 2001 21:18:28 +0200
- References: <200109100451.VAA25485@racerx.synopsys.com>
Joe Buck <jbuck@synopsys.COM> writes:
> Well, the Linux kernel developers found that they couldn't let gcc
> do long long arithmetic because it did such a poor job, so they do
> it in assembly or in C on pairs of 32 bit values instead. So at
> least some folks probably wouldn't mind seeing an improvement.
Anything up to and including GCC 2.95 is probably quite broken with
regard to 64 bit support on x86, performancewise. For example, if you
pass a 64 bit constant in a function call, the constant is but into
some data segment and is copied to the stack from there. IIRC, the
generated code is not even shorter if the constant is used multiple
times.
The kernel folks still work with ancient GCC (even gcc) versions, and
it is not clear if their experience carries over to newer GCCs.
Of course, Frank's floating point implementation cannot be used in
kernel space at the moment. AFAIK, floating point is still not
possible there for technical reasons.
--
Florian Weimer Florian.Weimer@RUS.Uni-Stuttgart.DE
University of Stuttgart http://cert.uni-stuttgart.de/
RUS-CERT +49-711-685-5973/fax +49-711-685-5898