RFR: JDK-8223244: Fix usage of ARRAYCOPY_DISJOINT decorator

Aleksey Shipilev shade at redhat.com
Tue May 7 14:20:45 UTC 2019


On 5/7/19 4:13 PM, Roman Kennke wrote:
>>> Right. Added a comment there, and also checked and fixed x86_32:
>>> http://cr.openjdk.java.net/~rkennke/JDK-8223244/webrev.02/
>>
>> Um. Old code:
>>
>>    39     if (!checkcast && !obj_int) {
>>    40       // Save count for barrier
>>    41       __ movptr(r11, count);
>>    42     } else if (disjoint && obj_int) {
>>    43       // Save dst in r11 in the disjoint case
>>    44       __ movq(r11, dst);
>>    45     }
>>
>> New code:
>>
>>    39     if (!checkcast) {
>>    40       if (!obj_int) {
>>    41         // Save count for barrier
>>    42         __ movptr(r11, count);
>>    43       } else if (disjoint) {
>>    44         // Save dst in r11 in the disjoint case
>>    45         __ movq(r11, dst);
>>    46       }
>>    47     }
>>
>> (Scribbles down truth tables). With checkcast=T, obj_int=T, disjoint=T old code saves "dst". New
>> code does not save anything. Is that the fix for new Shenandoah code?
> 
> With old code, checkcast and disjoint are never true at the same time. The checkcast generator
> doesn't do that, even though the arraycopy is implicitely disjoint (why would we need checkcast
> otherwise). We are now always asking checkcast=T && disjoint=T, and end up with the same
> configuration as previously with checkcast=T && disjoint=F. Agree?

Agreed. Looks good then!

-Aleksey


-- 
Thanks,
-Aleksey

Red Hat GmbH, http://www.de.redhat.com/, Registered seat: Grasbrunn,
Commercial register: Amtsgericht Muenchen, HRB 153243,
Managing Directors: Charles Cachera, Michael O'Neill, Tom Savage, Eric Shander

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 833 bytes
Desc: OpenPGP digital signature
URL: <https://mail.openjdk.org/pipermail/hotspot-gc-dev/attachments/20190507/ae6ef082/signature.asc>


More information about the hotspot-gc-dev mailing list