Support ARM64EC in the same way as ARM64 in sha256 and sha512
Signed-off-by: Dave Rodgman <dave.rodgman@arm.com>
diff --git a/library/sha256.c b/library/sha256.c
index 223badf..20d5188 100644
--- a/library/sha256.c
+++ b/library/sha256.c
@@ -110,7 +110,7 @@
# include <signal.h>
# endif
# endif
-#elif defined(_M_ARM64)
+#elif defined(_M_ARM64) || defined(_M_ARM64EC)
# if defined(MBEDTLS_SHA256_USE_A64_CRYPTO_IF_PRESENT) || \
defined(MBEDTLS_SHA256_USE_A64_CRYPTO_ONLY)
# include <arm64_neon.h>
@@ -135,7 +135,7 @@
{
return 1;
}
-#elif defined(_M_ARM64)
+#elif defined(_M_ARM64) || defined(_M_ARM64EC)
#define WIN32_LEAN_AND_MEAN
#include <Windows.h>
#include <processthreadsapi.h>
diff --git a/library/sha512.c b/library/sha512.c
index e739af2..23e8745 100644
--- a/library/sha512.c
+++ b/library/sha512.c
@@ -154,7 +154,7 @@
NULL, 0);
return ret == 0 && value != 0;
}
-#elif defined(_M_ARM64)
+#elif defined(_M_ARM64) || defined(_M_ARM64EC)
/*
* As of March 2022, there don't appear to be any PF_ARM_V8_* flags
* available to pass to IsProcessorFeaturePresent() to check for