RFR(s): 8013171: G1: C1 x86_64 barriers use 32-bit accesses to 64-bit PtrQueue::_index
Per Liden
per.liden at oracle.com
Thu Apr 23 13:07:22 UTC 2015
Hi Roland,
On 2015-04-23 13:43, Roland Westrelin wrote:
>> Webrev: http://cr.openjdk.java.net/~pliden/8013171/webrev.0/
>
> movptr is movq/movl, cmpptr is cmpq/cmpl and subptr is subq/subl on 32bits/64bits so you could replace:
>
>
> 1654 #ifdef _LP64
> 1655 __ movq(tmp, queue_index);
> 1656 __ cmpq(tmp, 0);
> 1657 #else
> 1658 __ movl(tmp, queue_index);
> 1659 __ cmpl(tmp, 0);
> 1660 #endif
> 1661 __ jcc(Assembler::equal, runtime);
> 1662 #ifdef _LP64
> 1663 __ subq(tmp, wordSize);
> 1664 __ movq(queue_index, tmp);
>
> 1665 #else
> 1666 __ subl(tmp, wordSize);
> 1667 __ movl(queue_index, tmp);
>
> 1668 #endif
>
> with:
>
> __ movptr(tmp, queue_index);
> __ cmpptr(tmp, 0);
> __ jcc(Assembler::equal, runtime);
> __ subptr(tmp, wordSize);
> __ movptr(queue_index, tmp);
>
> even if the quantities that are manipulated are not actual pointers, unless I miss something.
Thanks for looking at this!
Yes, it happens to be the same thing is this case, but bordering on
being sloppy given that it's not a pointer. But if this is the preferred
way then I can live with that.
Updated webrev: http://cr.openjdk.java.net/~pliden/8013171/webrev.1/
/Per
More information about the hotspot-dev
mailing list