summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCameron Cawley <ccawley2011@gmail.com>2024-12-22 13:43:30 +0000
committerHans Kristian Rosbach <hk-github@circlestorm.org>2024-12-23 14:07:06 +0100
commitfc90e7b3fc57497b315e03fcd3b8465022a08855 (patch)
tree2392151ce2378550801111fde0629fbe75203f3e
parent06bba674706a238e4b7bee49cf76911851bf8f0c (diff)
downloadProject-Tick-fc90e7b3fc57497b315e03fcd3b8465022a08855.tar.gz
Project-Tick-fc90e7b3fc57497b315e03fcd3b8465022a08855.zip
Improved setting of OPTIMAL_CMP on ARM
-rw-r--r--zbuild.h14
1 files changed, 9 insertions, 5 deletions
diff --git a/zbuild.h b/zbuild.h
index c48b860a55..623ff7f792 100644
--- a/zbuild.h
+++ b/zbuild.h
@@ -249,17 +249,21 @@
defined(__i686__) || defined(_X86_) || defined(_M_IX86)
# define OPTIMAL_CMP 32
#elif defined(__aarch64__) || defined(_M_ARM64) || defined(_M_ARM64EC)
-# if (defined(__GNUC__) && defined(__ARM_FEATURE_UNALIGNED)) || !defined(__GNUC__)
+# if defined(__ARM_FEATURE_UNALIGNED) || defined(_WIN32)
# define OPTIMAL_CMP 64
+# else
+# define OPTIMAL_CMP 8
# endif
-#elif defined(__arm__) || (_M_ARM >= 7)
-# if (defined(__GNUC__) && defined(__ARM_FEATURE_UNALIGNED)) || !defined(__GNUC__)
+#elif defined(__arm__) || defined(_M_ARM)
+# if defined(__ARM_FEATURE_UNALIGNED) || defined(_WIN32)
# define OPTIMAL_CMP 32
+# else
+# define OPTIMAL_CMP 8
# endif
#elif defined(__powerpc64__) || defined(__ppc64__)
-# define OPTIMAL_CMP 64
+# define OPTIMAL_CMP 64
#elif defined(__powerpc__) || defined(__ppc__) || defined(__PPC__)
-# define OPTIMAL_CMP 32
+# define OPTIMAL_CMP 32
#endif
#if defined(NO_UNALIGNED)
# undef OPTIMAL_CMP