mirror of https://github.com/AxioDL/boo.git
soxr: Fix CPUID for clang-cl
This commit is contained in:
parent
39eb95a824
commit
f6c9595a0e
|
@ -197,22 +197,10 @@ soxr_io_spec_t soxr_io_spec(
|
||||||
"xchg %%edi, %%ebx \n\t" \
|
"xchg %%edi, %%ebx \n\t" \
|
||||||
: "=a" (eax_), "=D" (ebx_), "=c" (ecx_), "=d" (edx_) \
|
: "=a" (eax_), "=D" (ebx_), "=c" (ecx_), "=d" (edx_) \
|
||||||
: "a" (type), "c" (0));
|
: "a" (type), "c" (0));
|
||||||
#elif defined _M_X64 && defined _MSC_VER && _MSC_VER > 1500
|
|
||||||
void __cpuidex(int CPUInfo[4], int info_type, int ecxvalue);
|
|
||||||
#pragma intrinsic(__cpuidex)
|
|
||||||
#define CPUID(type, eax_, ebx_, ecx_, edx_) do { \
|
|
||||||
int regs[4]; \
|
|
||||||
__cpuidex(regs, type, 0); \
|
|
||||||
eax_ = regs[0], ebx_ = regs[1], ecx_ = regs[2], edx_ = regs[3]; \
|
|
||||||
} while(0)
|
|
||||||
#elif defined _M_X64 && defined _MSC_VER
|
#elif defined _M_X64 && defined _MSC_VER
|
||||||
void __cpuidex(int CPUInfo[4], int info_type);
|
#include <intrin.h>
|
||||||
#pragma intrinsic(__cpuidex)
|
#define CPUID(type, eax_, ebx_, ecx_, edx_) \
|
||||||
#define CPUID(type, eax_, ebx_, ecx_, edx_) do { \
|
__cpuid_count(type, 0, eax_, ebx_, ecx_, edx_)
|
||||||
int regs[4]; \
|
|
||||||
__cpuidex(regs, type); \
|
|
||||||
eax_ = regs[0], ebx_ = regs[1], ecx_ = regs[2], edx_ = regs[3]; \
|
|
||||||
} while(0)
|
|
||||||
#elif defined _M_IX86 && defined _MSC_VER
|
#elif defined _M_IX86 && defined _MSC_VER
|
||||||
#define CPUID(type, eax_, ebx_, ecx_, edx_) \
|
#define CPUID(type, eax_, ebx_, ecx_, edx_) \
|
||||||
__asm pushad \
|
__asm pushad \
|
||||||
|
|
Loading…
Reference in New Issue