[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

64 bit arithmetic?

From: Colin D Bennett
Subject: 64 bit arithmetic?
Date: Tue, 10 Jun 2008 09:26:42 -0700

I'm working on implementing a higher resolution timer using the x86
TSC.  However, this entails 64-bit arithmetic since on a 2GHz machine
it will overflow a 32-bit number every couple of seconds (the TSC
counter CPU cycles since boot).

So to convert the TSC value into a value in milliseconds, I need to do
64-bit division, but when I try to build GRUB now, I get

   undefined reference to `__udivdi3'

Is this expected?  Should it be possible for me to do division on
grub_uint64_t types?

BTW, I'm trying to add it to the kernel image, if this makes a


Attachment: signature.asc
Description: PGP signature

reply via email to

[Prev in Thread] Current Thread [Next in Thread]