aboutsummaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/core/SkOnce.h8
-rw-r--r--include/core/SkPreConfig.h4
2 files changed, 7 insertions, 5 deletions
diff --git a/include/core/SkOnce.h b/include/core/SkOnce.h
index daeb819d42..d5330b9408 100644
--- a/include/core/SkOnce.h
+++ b/include/core/SkOnce.h
@@ -85,12 +85,10 @@ inline static void compiler_barrier() {
#endif
inline static void full_barrier_on_arm() {
-#ifdef SK_CPU_ARM
-# if SK_ARM_ARCH >= 7
- asm volatile("dmb" : : : "memory");
-# else
+#if (defined(SK_CPU_ARM) && SK_ARM_ARCH >= 7) || defined(SK_CPU_ARM64)
+ asm volatile("dmb ish" : : : "memory");
+#elif defined(SK_CPU_ARM)
asm volatile("mcr p15, 0, %0, c7, c10, 5" : : "r" (0) : "memory");
-# endif
#endif
}
diff --git a/include/core/SkPreConfig.h b/include/core/SkPreConfig.h
index 406a159d89..73b54886bf 100644
--- a/include/core/SkPreConfig.h
+++ b/include/core/SkPreConfig.h
@@ -174,6 +174,10 @@
#endif
#endif
+#if defined(__aarch64__)
+ #define SK_CPU_ARM64
+#endif
+
//////////////////////////////////////////////////////////////////////
#if !defined(SKIA_IMPLEMENTATION)