RFR (M) 8152753: C1 intrinsics for CompareAndExchange (x86)
rwestrel at redhat.com
Fri Apr 8 13:54:32 UTC 2016
> 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
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_*.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 2704 bytes
Desc: not available
More information about the hotspot-compiler-dev