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 Tue, 1 Jul 2003, Andrew Morton wrote:
>
> By requiring an explicit do_div we are made aware of all those 64-bit
> divides and are made to think about them.

do_div() is NOT a 64-bit divide.

It's a 64/32->64+32 div/mod operation, which is a totally different thing
than a full 64/64 divide, and is usually much faster to compute on most
32-bit architectures.

> Why 64-bit divides in particular were victimised in this manner is a matter
> for speculation ;)

Because gcc historically _cannot_ generate an efficient 64/32->64 divide.
It ends up doing a full 64/64 divide thing.

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.068 / U:0.548 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site