8004318: JEP-171: Support Unsafe fences intrinsics

Add three memory-ordering intrinsics to the sun.misc.Unsafe class.

Reviewed-by: twisti, kvn
This commit is contained in:
Aleksey Shipilev 2012-12-18 17:37:44 -08:00 committed by Vladimir Kozlov
parent 52da261983
commit 4c293ebcd6
5 changed files with 70 additions and 0 deletions

View file

@ -2977,6 +2977,16 @@ void LIRGenerator::do_Intrinsic(Intrinsic* x) {
do_CompareAndSwap(x, longType);
break;
case vmIntrinsics::_loadFence :
if (os::is_MP()) __ membar_acquire();
break;
case vmIntrinsics::_storeFence:
if (os::is_MP()) __ membar_release();
break;
case vmIntrinsics::_fullFence :
if (os::is_MP()) __ membar();
break;
case vmIntrinsics::_Reference_get:
do_Reference_get(x);
break;