src/hotspot/os_cpu/bsd_x86/orderAccess_bsd_x86.hpp
changeset 54323 846bc643f4ef
parent 53244 9807daeb47c4
child 59247 56bf71d64d51
--- a/src/hotspot/os_cpu/bsd_x86/orderAccess_bsd_x86.hpp	Mon Mar 25 09:35:40 2019 +0100
+++ b/src/hotspot/os_cpu/bsd_x86/orderAccess_bsd_x86.hpp	Thu Mar 28 11:08:23 2019 +0100
@@ -59,6 +59,11 @@
   compiler_barrier();
 }
 
+inline void OrderAccess::cross_modify_fence() {
+  int idx = 0;
+  __asm__ volatile ("cpuid " : "+a" (idx) : : "ebx", "ecx", "edx", "memory");
+}
+
 template<>
 struct OrderAccess::PlatformOrderedStore<1, RELEASE_X_FENCE>
 {