--- a/hotspot/src/share/vm/opto/c2compiler.cpp Tue Feb 23 17:59:27 2016 +0100
+++ b/hotspot/src/share/vm/opto/c2compiler.cpp Tue Feb 23 22:09:41 2016 +0300
@@ -243,14 +243,72 @@
case vmIntrinsics::_reverseBytes_l:
if (!Matcher::match_rule_supported(Op_ReverseBytesL)) return false;
break;
+
+ /* CompareAndSwap, Object: */
case vmIntrinsics::_compareAndSwapObject:
#ifdef _LP64
+ if ( UseCompressedOops && !Matcher::match_rule_supported(Op_CompareAndSwapN)) return false;
if (!UseCompressedOops && !Matcher::match_rule_supported(Op_CompareAndSwapP)) return false;
+#else
+ if (!Matcher::match_rule_supported(Op_CompareAndSwapP)) return false;
#endif
break;
+ case vmIntrinsics::_weakCompareAndSwapObject:
+ case vmIntrinsics::_weakCompareAndSwapObjectAcquire:
+ case vmIntrinsics::_weakCompareAndSwapObjectRelease:
+#ifdef _LP64
+ if ( UseCompressedOops && !Matcher::match_rule_supported(Op_WeakCompareAndSwapN)) return false;
+ if (!UseCompressedOops && !Matcher::match_rule_supported(Op_WeakCompareAndSwapP)) return false;
+#else
+ if (!Matcher::match_rule_supported(Op_WeakCompareAndSwapP)) return false;
+#endif
+ break;
+ /* CompareAndSwap, Long: */
case vmIntrinsics::_compareAndSwapLong:
if (!Matcher::match_rule_supported(Op_CompareAndSwapL)) return false;
break;
+ case vmIntrinsics::_weakCompareAndSwapLong:
+ case vmIntrinsics::_weakCompareAndSwapLongAcquire:
+ case vmIntrinsics::_weakCompareAndSwapLongRelease:
+ if (!Matcher::match_rule_supported(Op_WeakCompareAndSwapL)) return false;
+ break;
+
+ /* CompareAndSwap, Int: */
+ case vmIntrinsics::_compareAndSwapInt:
+ if (!Matcher::match_rule_supported(Op_CompareAndSwapI)) return false;
+ break;
+ case vmIntrinsics::_weakCompareAndSwapInt:
+ case vmIntrinsics::_weakCompareAndSwapIntAcquire:
+ case vmIntrinsics::_weakCompareAndSwapIntRelease:
+ if (!Matcher::match_rule_supported(Op_WeakCompareAndSwapL)) return false;
+ break;
+
+ /* CompareAndExchange, Object: */
+ case vmIntrinsics::_compareAndExchangeObjectVolatile:
+ case vmIntrinsics::_compareAndExchangeObjectAcquire:
+ case vmIntrinsics::_compareAndExchangeObjectRelease:
+#ifdef _LP64
+ if ( UseCompressedOops && !Matcher::match_rule_supported(Op_CompareAndExchangeN)) return false;
+ if (!UseCompressedOops && !Matcher::match_rule_supported(Op_CompareAndExchangeP)) return false;
+#else
+ if (!Matcher::match_rule_supported(Op_CompareAndExchangeP)) return false;
+#endif
+ break;
+
+ /* CompareAndExchange, Long: */
+ case vmIntrinsics::_compareAndExchangeLongVolatile:
+ case vmIntrinsics::_compareAndExchangeLongAcquire:
+ case vmIntrinsics::_compareAndExchangeLongRelease:
+ if (!Matcher::match_rule_supported(Op_CompareAndExchangeL)) return false;
+ break;
+
+ /* CompareAndExchange, Int: */
+ case vmIntrinsics::_compareAndExchangeIntVolatile:
+ case vmIntrinsics::_compareAndExchangeIntAcquire:
+ case vmIntrinsics::_compareAndExchangeIntRelease:
+ if (!Matcher::match_rule_supported(Op_CompareAndExchangeI)) return false;
+ break;
+
case vmIntrinsics::_getAndAddInt:
if (!Matcher::match_rule_supported(Op_GetAndAddI)) return false;
break;
@@ -382,6 +440,42 @@
case vmIntrinsics::_putLongVolatile:
case vmIntrinsics::_putFloatVolatile:
case vmIntrinsics::_putDoubleVolatile:
+ case vmIntrinsics::_getObjectAcquire:
+ case vmIntrinsics::_getBooleanAcquire:
+ case vmIntrinsics::_getByteAcquire:
+ case vmIntrinsics::_getShortAcquire:
+ case vmIntrinsics::_getCharAcquire:
+ case vmIntrinsics::_getIntAcquire:
+ case vmIntrinsics::_getLongAcquire:
+ case vmIntrinsics::_getFloatAcquire:
+ case vmIntrinsics::_getDoubleAcquire:
+ case vmIntrinsics::_putObjectRelease:
+ case vmIntrinsics::_putBooleanRelease:
+ case vmIntrinsics::_putByteRelease:
+ case vmIntrinsics::_putShortRelease:
+ case vmIntrinsics::_putCharRelease:
+ case vmIntrinsics::_putIntRelease:
+ case vmIntrinsics::_putLongRelease:
+ case vmIntrinsics::_putFloatRelease:
+ case vmIntrinsics::_putDoubleRelease:
+ case vmIntrinsics::_getObjectOpaque:
+ case vmIntrinsics::_getBooleanOpaque:
+ case vmIntrinsics::_getByteOpaque:
+ case vmIntrinsics::_getShortOpaque:
+ case vmIntrinsics::_getCharOpaque:
+ case vmIntrinsics::_getIntOpaque:
+ case vmIntrinsics::_getLongOpaque:
+ case vmIntrinsics::_getFloatOpaque:
+ case vmIntrinsics::_getDoubleOpaque:
+ case vmIntrinsics::_putObjectOpaque:
+ case vmIntrinsics::_putBooleanOpaque:
+ case vmIntrinsics::_putByteOpaque:
+ case vmIntrinsics::_putShortOpaque:
+ case vmIntrinsics::_putCharOpaque:
+ case vmIntrinsics::_putIntOpaque:
+ case vmIntrinsics::_putLongOpaque:
+ case vmIntrinsics::_putFloatOpaque:
+ case vmIntrinsics::_putDoubleOpaque:
case vmIntrinsics::_getShortUnaligned:
case vmIntrinsics::_getCharUnaligned:
case vmIntrinsics::_getIntUnaligned:
@@ -390,7 +484,6 @@
case vmIntrinsics::_putCharUnaligned:
case vmIntrinsics::_putIntUnaligned:
case vmIntrinsics::_putLongUnaligned:
- case vmIntrinsics::_compareAndSwapInt:
case vmIntrinsics::_putOrderedObject:
case vmIntrinsics::_putOrderedInt:
case vmIntrinsics::_putOrderedLong: