lkml.org 
[lkml]   [2012]   [Mar]   [26]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 1/1] vsprintf: optimize decimal conversion (again)
On 03/26/2012 01:13 PM, Andrew Morton wrote:
> On Mon, 26 Mar 2012 21:56:38 +0200
> Denys Vlasenko <vda.linux@googlemail.com> wrote:
>
>>>> +#if BITS_PER_LONG != 32 || (~(0ULL)>>1) != ((1ULL<<63)-1)
>>>
>>> What's this for?
>>
>> The second check should be just BITS_PER_LONG_LONG != 64,
>> but we don't have BITS_PER_LONG_LONG.
>
> So let's add BITS_PER_LONG_LONG rather than hacking around its absence!

First of all, the #if is wrong: the preprocessor doesn't support data
types and does all arithmetic at (u)intmax_t precision.

As far as BITS_PER_LONG_LONG, there are tons of places in the kernel
which already require that long long is exactly 64 bits. That may or
may not be a good thing, but for right now one could simply:

#define BITS_PER_LONG_LONG 64

-hpa



\
 
 \ /
  Last update: 2012-03-26 22:23    [W:0.381 / U:0.024 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site