RFR (M) 8152753: C1 intrinsics for CompareAndExchange (x86)

Aleksey Shipilev aleksey.shipilev at oracle.com
Fri Apr 8 17:28:43 UTC 2016


On 04/08/2016 04:54 PM, Roland Westrelin wrote:
> 
>> CompareAndSwap produces boolean result, and kills cmp_value and
>> new_value. CompareAndExchange produces the "old"/null value result,
>> which is stored at the same position as cmp_value.
>>
>> So, if you omit that line, LinearScan asserts when you are trying to use
>> the result of CompareAndExchange. AFAIU, removing the "input" property
>> from cmp_value, but leaving "temp" makes things back in order for
>> CompareAndExchange.
> 
> That assert seems too restrictive but making that change to c1_LIR.cpp
> is asking for trouble, I think. I would suggest moving the final move to
> the result register to the platform dependent code (see attached patch).
> Also, I noticed you don't pass the result as the correct argument of cas_*.

D'oh. Thank you, Roland!

Merged your changes here:
  http://cr.openjdk.java.net/~shade/8152753/webrev.02/

Re-spinning the RBT testing now.

Thanks,
-Aleksey


-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: OpenPGP digital signature
URL: <http://mail.openjdk.java.net/pipermail/hotspot-compiler-dev/attachments/20160408/2c298e49/signature.asc>


More information about the hotspot-compiler-dev mailing list