Skip to content

Commit

Permalink
x86_64 always has at least SSE2
Browse files Browse the repository at this point in the history
  • Loading branch information
sneves committed Jul 2, 2020
1 parent 37e4b4b commit 186ffdf
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/blake2-dispatch.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,11 @@ typedef enum
XOP = 5,
/* AVX2 = 6, */
#endif
#if defined(__x86_64__) || defined(_M_X64)
DEFAULT = SSE2
#else
DEFAULT = NONE
#endif
} cpu_feature_t;

static const char feature_names[][8] =
Expand Down Expand Up @@ -98,7 +103,7 @@ static inline cpu_feature_t get_cpu_features( void )
{
#if defined(HAVE_X86)
static volatile int initialized = 0;
static cpu_feature_t feature = NONE; // Safe default
static cpu_feature_t feature = DEFAULT;
uint32_t eax, ecx, edx, ebx;

if( initialized )
Expand Down

0 comments on commit 186ffdf

Please sign in to comment.