diff --git a/src/hotspot/os_cpu/linux_x86/os_linux_x86.hpp b/src/hotspot/os_cpu/linux_x86/os_linux_x86.hpp index b9a17e33912..979006035cc 100644 --- a/src/hotspot/os_cpu/linux_x86/os_linux_x86.hpp +++ b/src/hotspot/os_cpu/linux_x86/os_linux_x86.hpp @@ -27,7 +27,6 @@ static void setup_fpu(); static bool supports_sse(); -// static bool supports_serialize(); static juint cpu_microcode_revision(); static jlong rdtsc(); diff --git a/src/hotspot/os_cpu/windows_x86/orderAccess_windows_x86.hpp b/src/hotspot/os_cpu/windows_x86/orderAccess_windows_x86.hpp old mode 100644 new mode 100755 index f7d990a64c4..30cfe1277fb --- a/src/hotspot/os_cpu/windows_x86/orderAccess_windows_x86.hpp +++ b/src/hotspot/os_cpu/windows_x86/orderAccess_windows_x86.hpp @@ -28,6 +28,7 @@ // Included in orderAccess.hpp header file. #include +#include // Compiler version last used for testing: Microsoft Visual Studio 2010 // Please update this information when this file changes @@ -59,8 +60,12 @@ inline void OrderAccess::fence() { } inline void OrderAccess::cross_modify_fence_impl() { - int regs[4]; - __cpuid(regs, 0); + if (VM_Version::supports_serialize()) { + _serialize(); + } else { + int regs[4]; + __cpuid(regs, 0); + } } #endif // OS_CPU_WINDOWS_X86_ORDERACCESS_WINDOWS_X86_HPP