[lkml]   [2003]   [Jul]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: [PATCH] Kill div64.h dupes, parenthesize do_div() macro params
    >>>>> "Bernardo" == Bernardo Innocenti <> writes:

    Bernardo> On Wednesday 02 July 2003 02:36, Andrew Morton wrote:

    Bernardo> If there are architectures where gcc doesn't implement
    Bernardo> divisions correctly, this issue should be solved in gcc, not
    Bernardo> by adding a silly macro to the kernel.

    The issue is that on 32-bit platforms, 64bit divided by 32 bit is
    handed off to a subroutine _udivdi3 which isn't linked into the
    kernel, and which in any case does a full 64 bit by 64-bit division
    (which is slow).

    Using do_div() allows one to generate near-optimal code for a 64by32
    bit division/remainder on platforms (e.g., IA32) which have problems,
    and generating something sane for other platforms (e.g., IA64).

    Platforms that never expect to deal with a 64-bit number just redefine
    the macro in terms of long. Which means that printing out long longs
    doesn't work properly on those architectures.

    Dr Peter Chubb peterc AT
    You are lost in a maze of BitKeeper repositories, all slightly different.
    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to
    More majordomo info at
    Please read the FAQ at

     \ /
      Last update: 2005-03-22 13:46    [W:0.019 / U:13.272 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site