lkml.org 
[lkml]   [2009]   [Mar]   [16]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [crash] Re: Latest brk patchset
Jeremy Fitzhardinge wrote:
> H. Peter Anvin wrote:
>> Or simplified:
>>
>> PAGE_TABLE_SIZE(((1 << 32)-PAGE_OFFSET) >> PAGE_SHIFT) << PAGE_SHIFT
>
> Was worried about 1<<32 overflowing. Never really sure what gas's type
> system is.
>

It's bignum-based.

You could also write:

PAGE_TABLE_SIZE((-PAGE_OFFSET & 0xffffffff) >> PAGE_SHIFT) << PAGE_SHIFT

(the & 0xffffffff is necessary, or you'll get a signed shift.)

-hpa


\
 
 \ /
  Last update: 2009-03-16 23:43    [W:0.126 / U:0.356 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site