[AArch64] Add missing feature disable flags to unit_test.cc
Allow users to set LIBYUV_DISABLE_${FEATURE} environment variables to
disable individual architecture extensions.
Change-Id: I555dd64311789bd6d760e48045ac6734177a730b
Reviewed-on: https://chromium-review.googlesource.com/c/libyuv/libyuv/+/5712929
Reviewed-by: Justin Green <greenjustin@google.com>
Reviewed-by: Frank Barchard <fbarchard@chromium.org>
diff --git a/unit_test/unit_test.cc b/unit_test/unit_test.cc
index 4abd655..6e2b539 100644
--- a/unit_test/unit_test.cc
+++ b/unit_test/unit_test.cc
@@ -73,6 +73,23 @@
cpu_info &= ~libyuv::kCpuHasNEON;
}
#endif
+#if defined(__aarch64__)
+ if (TestEnv("LIBYUV_DISABLE_NEON_DOTPROD")) {
+ cpu_info &= ~libyuv::kCpuHasNeonDotProd;
+ }
+ if (TestEnv("LIBYUV_DISABLE_NEON_I8MM")) {
+ cpu_info &= ~libyuv::kCpuHasNeonI8MM;
+ }
+ if (TestEnv("LIBYUV_DISABLE_SVE")) {
+ cpu_info &= ~libyuv::kCpuHasSVE;
+ }
+ if (TestEnv("LIBYUV_DISABLE_SVE2")) {
+ cpu_info &= ~libyuv::kCpuHasSVE2;
+ }
+ if (TestEnv("LIBYUV_DISABLE_SME")) {
+ cpu_info &= ~libyuv::kCpuHasSME;
+ }
+#endif
#if defined(__mips__) && defined(__linux__)
if (TestEnv("LIBYUV_DISABLE_MSA")) {
cpu_info &= ~libyuv::kCpuHasMSA;