summaryrefslogtreecommitdiff
path: root/test/test_compare256.cc
diff options
context:
space:
mode:
authorHans Kristian Rosbach <hk-git@circlestorm.org>2024-12-17 23:02:32 +0100
committerHans Kristian Rosbach <hk-git@circlestorm.org>2024-12-17 23:02:32 +0100
commit80fffd72f316df980bb15ea0daf06ba22e3583ec (patch)
treec6d51d423ab594b3914d245fd4920d1b47104a12 /test/test_compare256.cc
parent43d74a223b30902b44b01bf4c4888d8deb35e253 (diff)
downloadProject-Tick-80fffd72f316df980bb15ea0daf06ba22e3583ec.tar.gz
Project-Tick-80fffd72f316df980bb15ea0daf06ba22e3583ec.zip
Since we long ago make unaligned reads safe (by using memcpy or intrinsics),
it is time to replace the UNALIGNED_OK checks that have since really only been used to select the optimal comparison sizes for the arch instead.
Diffstat (limited to 'test/test_compare256.cc')
-rw-r--r--test/test_compare256.cc11
1 files changed, 6 insertions, 5 deletions
diff --git a/test/test_compare256.cc b/test/test_compare256.cc
index e1662cdf04..97e2847037 100644
--- a/test/test_compare256.cc
+++ b/test/test_compare256.cc
@@ -65,15 +65,16 @@ TEST_COMPARE256(c, compare256_c, 1)
TEST_COMPARE256(native, native_compare256, 1)
#else
-#if defined(UNALIGNED_OK) && BYTE_ORDER == LITTLE_ENDIAN
+#if BYTE_ORDER == LITTLE_ENDIAN && OPTIMAL_CMP >= 32
TEST_COMPARE256(unaligned_16, compare256_unaligned_16, 1)
-#ifdef HAVE_BUILTIN_CTZ
+# if defined(HAVE_BUILTIN_CTZ)
TEST_COMPARE256(unaligned_32, compare256_unaligned_32, 1)
-#endif
-#if defined(UNALIGNED64_OK) && defined(HAVE_BUILTIN_CTZLL)
+# endif
+# if defined(HAVE_BUILTIN_CTZLL) && OPTIMAL_CMP >= 64
TEST_COMPARE256(unaligned_64, compare256_unaligned_64, 1)
+# endif
#endif
-#endif
+
#if defined(X86_SSE2) && defined(HAVE_BUILTIN_CTZ)
TEST_COMPARE256(sse2, compare256_sse2, test_cpu_features.x86.has_sse2)
#endif