RFR: 9+8u: Use uintptr_t in assembler.cpp

Aleksey Shipilev shade at redhat.com
Mon Mar 27 17:41:21 UTC 2017


On 03/27/2017 07:31 PM, Aleksey Shipilev wrote:
> On 03/22/2017 01:43 PM, Andrew Haley wrote:
>> On 22/03/17 11:54, Aleksey Shipilev wrote:
>>>  #elif defined(_LP64)
>>> +#ifdef _WINDOWS
>>> +    const unsigned long long address_bits = 0xffffffffffffffffull;
>>> +#else
>>>      const unsigned long address_bits = 0xfffffffffffffffful;
>>> +#endif // _WINDOWS
>>>  #else
>>
>> I'd use uintptr_t address_bits = ~(unitptr_t)0;
> 
> Right-o, this is much cleaner:
>  http://cr.openjdk.java.net/~shade/shenandoah/assembler-uintptr/webrev.01/
> 
> Checked this still works with x86_64 {Linux, Windows} x {9, 8u}.

Actually, let's reconsider this block now, there is no point to bitwise-and
intptr_t like that:
  http://cr.openjdk.java.net/~shade/shenandoah/assembler-uintptr/webrev.02/

Thanks,
-Aleksey




More information about the shenandoah-dev mailing list