Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(330)

Unified Diff: include/core/SkPreConfig.h

Issue 2322033002: Apple devices do not support CRC32 instructions. Don't believe Clang's lies. (Closed)
Patch Set: Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | src/core/SkCpu.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/core/SkPreConfig.h
diff --git a/include/core/SkPreConfig.h b/include/core/SkPreConfig.h
index f241bab2ff7b1a9cbf4618e3120d9fb014a2080e..b165ae1255b8730cfd586cd14588b240773df5ed 100644
--- a/include/core/SkPreConfig.h
+++ b/include/core/SkPreConfig.h
@@ -193,6 +193,12 @@
#define SK_ARM_HAS_NEON
#endif
+// Really this __APPLE__ check shouldn't be necessary, but it seems that Apple's Clang defines
+// __ARM_FEATURE_CRC32 for -arch arm64, even though their chips don't support those instructions!
+#if defined(__ARM_FEATURE_CRC32) && !defined(__APPLE__)
+ #define SK_ARM_HAS_CRC32
+#endif
+
//////////////////////////////////////////////////////////////////////
#if !defined(SKIA_IMPLEMENTATION)
« no previous file with comments | « no previous file | src/core/SkCpu.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698