Skip to content

Commit

Permalink
revert MSVC x64 __cpuidex part of commit 865e832 -- not really needed.
Browse files Browse the repository at this point in the history
  • Loading branch information
sezero committed May 19, 2023
1 parent 2f23ad9 commit 9d4a969
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/SDL12_compat.c
Original file line number Diff line number Diff line change
Expand Up @@ -1667,13 +1667,12 @@ SDL_revcpy(void *_dst, const void *_src, size_t len)
__asm mov c, ecx \
__asm mov d, edx \
}
#elif (defined(_MSC_VER) && defined(_M_X64))
/* Use __cpuidex instead of __cpuid because ICL does not clear ecx register */
#elif defined(_MSC_VER) && defined(_M_X64)
#include <intrin.h>
#define cpuid(func, a, b, c, d) \
{ \
int CPUInfo[4]; \
__cpuidex(CPUInfo, func, 0); \
__cpuid(CPUInfo, func); \
a = CPUInfo[0]; \
b = CPUInfo[1]; \
c = CPUInfo[2]; \
Expand Down

0 comments on commit 9d4a969

Please sign in to comment.