Re: 64-bit math in the kernel

Ingo Molnar (mingo@pc5829.hil.siemens.at)
Wed, 27 Nov 1996 08:09:09 +0100 (MET)


On Tue, 26 Nov 1996, James W. Laferriere wrote:

> > In one of my ATM drivers, I have the following non-portable and therefore
> > ugly solution (inspired by arch/i386/kernel/time.c:do_fast_gettimeoffset):
>
> Oh, Please be careful with anything coming out of
> do_fast_gettimeoffset, As this call if not done
> right on an AMD5k86-P90, you will not get what you want.

well it's not the routine's but rather the CPUs fault, and it's fixed in
2.0.25 and upwards.

yup, it doesnt do exception handling, so you should feed only values into
it that make sense.

but if you look at the 64 bit code gcc generates [on the 32 bit i386
platform], and the code in do_fast_gettimeoffset(), you will know why the
latter one was coded :)

-- mingo