lkml.org 
[lkml]   [2003]   [Jul]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] Kill div64.h dupes, parenthesize do_div() macro params

On Wed, 2 Jul 2003, Bernardo Innocenti wrote:
>
> Wait! It's not documented at all that do_div() really does a
> 64bit/32bit division with 32bit remainder.

Oh, it's documented all right. It's even documented by the architectures
that do it wrong (ie chris/arm26 say "we're not 64-bit but..")

> What's worse, it has different semantics on different archictecures:

only because some architectures on purpose get it wrong, because they
don't care.

> i386 64/32 -> 64q + 32r (inline asm + C for 64bit case)

This is the only version that has ever been valid.

It's a 64/32->64+32. No excuses, no nothing. There is no question about
it.

Linus

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

\
 
 \ /
  Last update: 2009-11-18 23:46    [W:0.048 / U:0.184 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site