Skip to content

Instantly share code, notes, and snippets.

@mo-beck
Created November 18, 2020 16:52
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mo-beck/2dc66d068741030b4a422b57607bea8e to your computer and use it in GitHub Desktop.
Save mo-beck/2dc66d068741030b4a422b57607bea8e to your computer and use it in GitHub Desktop.
cross_modify_fence compiler intrinsic for Windows-Arm64q
diff --git a/src/hotspot/os_cpu/windows_aarch64/orderAccess_windows_aarch64.hpp b/src/hotspot/os_cpu/windows_aarch64/orderAccess_windows_aarch64.hpp
index 11ec7322a9f..eb7144d1773 100644
--- a/src/hotspot/os_cpu/windows_aarch64/orderAccess_windows_aarch64.hpp
+++ b/src/hotspot/os_cpu/windows_aarch64/orderAccess_windows_aarch64.hpp
@@ -28,7 +28,7 @@
// Included in orderAccess.hpp header file.
#include <atomic>
using std::atomic_thread_fence;
-#include <intrin.h>
+#include <arm64intr.h>
#include "vm_version_aarch64.hpp"
#include "runtime/vm_version.hpp"
@@ -55,6 +55,8 @@ inline void OrderAccess::fence() {
FULL_MEM_BARRIER;
}
-inline void OrderAccess::cross_modify_fence() { }
+inline void OrderAccess::cross_modify_fence_impl() {
+ __isb(_ARM64_BARRIER_SY);
+}
#endif // OS_CPU_WINDOWS_AARCH64_ORDERACCESS_WINDOWS_AARCH64_HPP
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment