RFR(s): 8013171: G1: C1 x86_64 barriers use 32-bit accesses to 64-bit PtrQueue::_index

Roland Westrelin roland.westrelin at oracle.com
Thu Apr 23 11:43:40 UTC 2015


> 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.

Roland.


More information about the hotspot-dev mailing list