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

Aleksey Shipilev aleksey.shipilev at oracle.com
Fri Mar 25 16:29:33 UTC 2016


I would like to solicit comments for C1 support for new
Unsafe.compareAndExchange intrinsics (we have support for them in C2).
The rest of new Unsafe methods that are not intrinsified by C1 are
handled by Java fallbacks in Unsafe.java. compareAndExchange cannot be
emulated with existing APIs.



 * hotspot: compiler/unsafe regression tests; JPRT -testset hotspot; RBT
runs pending

Current patch implements x86 only, and paves the way for other
architectures. Before going further, I have a few open questions:

 a) What mechanism do we usually use for platform-dependent C1
intrinsics? Current patch does develop_pd flag, but it would be nicer to
have something akin to C2-ish Matcher::has_match_rule.

 b) Should we fold this into LIR_CompareAndSwap node with flag? This is
technically doable, as patch demonstrates. Would it be a good idea to
materialize LIR_CompareAndExchange node, similar to what C2 does?


-------------- 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/20160325/0424a922/signature.asc>

More information about the hotspot-compiler-dev mailing list