Re: __udivdi3 and linux kernel u64 division question [x86]
From: Arjan van de Ven
Date: Tue May 24 2005 - 07:39:10 EST
On Tue, 2005-05-24 at 14:29 +0200, Mateusz Berezecki wrote:
> Hi list members,
>
> After a failure of compilation of the similar code snippet
>
>
> u64 mconst = somebig64bitvalue;
> u64 tmp = some32bitvalue;
> u64 r = mconst / tmp;
you shouldn't do this in linux
> I've also found a do_div() and it was sufficent for my purposes but Im
> still curious about
> __udivdi3. Can someone explain this issue to me?
do_div is a very small subset of divides.
Also.. you forgot to put the URL of your module into your email..
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/