diff options
author | Rémi Verschelde <rverschelde@gmail.com> | 2024-04-08 15:03:09 +0200 |
---|---|---|
committer | Rémi Verschelde <rverschelde@gmail.com> | 2024-04-08 15:03:09 +0200 |
commit | d3e8b6c6b8a366d7cd98fe3b999e450105f9290a (patch) | |
tree | 8f3396cb39dad90fee02ee647418d801489f26f1 /thirdparty/mbedtls/library/aesni.c | |
parent | 0e50807c55d4cb24a796e7ec2901cb78698e288b (diff) | |
parent | 915ca4dd456f959e4d4fd4e385715f3f0d48e77d (diff) | |
download | redot-engine-d3e8b6c6b8a366d7cd98fe3b999e450105f9290a.tar.gz |
Merge pull request #90209 from akien-mga/mbedtls-2.28.8
mbedtls: Update to upstream version 2.28.8
Diffstat (limited to 'thirdparty/mbedtls/library/aesni.c')
-rw-r--r-- | thirdparty/mbedtls/library/aesni.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/thirdparty/mbedtls/library/aesni.c b/thirdparty/mbedtls/library/aesni.c index dd84c2b4ea..74bae91f5e 100644 --- a/thirdparty/mbedtls/library/aesni.c +++ b/thirdparty/mbedtls/library/aesni.c @@ -27,10 +27,12 @@ #if defined(MBEDTLS_AESNI_HAVE_CODE) #if MBEDTLS_AESNI_HAVE_CODE == 2 -#if !defined(_WIN32) +#if defined(__GNUC__) #include <cpuid.h> -#else +#elif defined(_MSC_VER) #include <intrin.h> +#else +#error "`__cpuid` required by MBEDTLS_AESNI_C is not supported by the compiler" #endif #include <immintrin.h> #endif @@ -45,7 +47,7 @@ int mbedtls_aesni_has_support(unsigned int what) if (!done) { #if MBEDTLS_AESNI_HAVE_CODE == 2 - static unsigned info[4] = { 0, 0, 0, 0 }; + static int info[4] = { 0, 0, 0, 0 }; #if defined(_MSC_VER) __cpuid(info, 1); #else @@ -179,7 +181,7 @@ void mbedtls_aesni_gcm_mult(unsigned char c[16], const unsigned char a[16], const unsigned char b[16]) { - __m128i aa, bb, cc, dd; + __m128i aa = { 0 }, bb = { 0 }, cc, dd; /* The inputs are in big-endian order, so byte-reverse them */ for (size_t i = 0; i < 16; i++) { |