Skip to content

Commit

Permalink
Added SSE version check for MSC
Browse files Browse the repository at this point in the history
  • Loading branch information
crozone committed Aug 1, 2018
1 parent c712f90 commit a1e2f83
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions spectre.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,20 @@
#pragma optimize("gt",on)
#else
#include <x86intrin.h> /* for rdtsc, rdtscp, clflush */
#endif /* ifdef _MSC_VER */

/* Automatically detect if SSE2 is not available when SSE is advertized */
#if defined(__SSE__) && !defined(__SSE2__)
#ifdef _MSC_VER
/* MSC */
#if _M_IX86_FP==1
#define NOSSE2
#endif

#else
/* Not MSC */
#if defined(__SSE__) && !defined(__SSE2__)
#define NOSSE2
#endif
#endif /* ifdef _MSC_VER */

#ifdef NOSSE2
#define NORDTSCP
Expand Down

0 comments on commit a1e2f83

Please sign in to comment.