lkml.org 
[lkml]   [2009]   [Jan]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: PATCH [0/3]: Simplify the kernel build by removing perl.
Rob Landley wrote:
> This doesn't _need_ bignum support. It maxes out around 72 bits and
> the _result_ can't use more than about $SHIFT bits because you're
> dividing by the amount you shifted, so just chop off the bottom 32
> bits, do a normal 64 bit division on the top (it has to fit), and
> then do the same division on the appropriate shifted remainder, and
> combine the results. This is easy because when the shift _is_ 32
> bits or more, the bottom 32 bits all have to be zeroes so you don't
> even have to mask and add, just shift the remainder left 32 bits so
> you can continue the divide.
>
> Pulling out perl isn't always a good alternative to thinking about
> the problem.

Related query:

Does the Perl script being replaced use 64-bit arithmetic? Because
many Perl installations only do 32-bit arithmetic.

If the Perl version works in 32-bit arithmetic, why does the shell
version not do the same thing?

-- Jamie


\
 
 \ /
  Last update: 2009-01-04 03:39    [W:0.125 / U:0.928 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site