1
mirror of https://github.com/jedisct1/libsodium.git synced 2024-12-23 20:15:19 -07:00

_M_AMD64 is the same as _M_X64

This commit is contained in:
Frank Denis 2023-11-02 06:40:17 +01:00
parent 1d03ea77fb
commit 51126865d0
3 changed files with 3 additions and 4 deletions

View File

@ -230,7 +230,7 @@ xor_buf(unsigned char *out, const unsigned char *in, size_t n)
#ifdef _MSC_VER #ifdef _MSC_VER
# if defined(_M_X64) || defined(_M_AMD64) || defined(_M_IX86) # if defined(_M_X64) || defined(_M_IX86)
# include <intrin.h> # include <intrin.h>
# define HAVE_INTRIN_H 1 # define HAVE_INTRIN_H 1

View File

@ -9,7 +9,7 @@
#if defined(HAVE_EMMINTRIN_H) && \ #if defined(HAVE_EMMINTRIN_H) && \
!(defined(__amd64) || defined(__amd64__) || defined(__x86_64__) || \ !(defined(__amd64) || defined(__amd64__) || defined(__x86_64__) || \
defined(_M_X64) || defined(_M_AMD64)) defined(_M_X64))
# include <emmintrin.h> # include <emmintrin.h>
# include <stdint.h> # include <stdint.h>

View File

@ -150,8 +150,7 @@ _sodium_runtime_arm_cpu_features(CPUFeatures * const cpu_features)
static void static void
_cpuid(unsigned int cpu_info[4U], const unsigned int cpu_info_type) _cpuid(unsigned int cpu_info[4U], const unsigned int cpu_info_type)
{ {
#if defined(_MSC_VER) && \ #if defined(_MSC_VER) && (defined(_M_X64) || defined(_M_IX86))
(defined(_M_X64) || defined(_M_AMD64) || defined(_M_IX86))
__cpuid((int *) cpu_info, cpu_info_type); __cpuid((int *) cpu_info, cpu_info_type);
#elif defined(HAVE_CPUID) #elif defined(HAVE_CPUID)
cpu_info[0] = cpu_info[1] = cpu_info[2] = cpu_info[3] = 0; cpu_info[0] = cpu_info[1] = cpu_info[2] = cpu_info[3] = 0;