[lkml]   [2000]   [Aug]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
    SubjectRe: 64 bit divide/mod in 2.4.0-test5
    In article <>,
    Jes Sorensen <> wrote:
    >Well you are seeing those because it's deprecated, you should use a
    >shift operator instead if in any way possible.

    Indeed. Basically, I _know_ that I could include libgcc, but I also do
    not believe that people should get code that looks simple but takes
    hundreds of cycles to complete.

    The fact that 64-bit divisions do not work naturally has actually saved
    us a number of times from people just not thinking about what an
    expensive operation such a division is - quite often there is a trivial
    shift that can do the same thing in two cycles or similar.

    There's some special-case code in <asm/div64.h>, which is used mainly
    for printk(), but can be used for other stuff too: a 64-by-64 divide is
    usually much slower than a 64-by-32 divide which is actually the one
    that most people are looking for anyway (but gcc isn't clever enough to
    know this). That can be used if you _really_ think you need the divide.
    I've yet to see a real reason for it outside the printk() stuff..


    To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
    the body of a message to
    Please read the FAQ at

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