mirror of https://github.com/AxioDL/boo.git
soxr: Only use intrin.h for clang-cl
This commit is contained in:
parent
f6c9595a0e
commit
954a9bab53
|
@ -197,10 +197,26 @@ 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
|
#elif defined _M_X64 && defined _MSC_VER && defined __clang__
|
||||||
#include <intrin.h>
|
#include <intrin.h>
|
||||||
#define CPUID(type, eax_, ebx_, ecx_, edx_) \
|
#define CPUID(type, eax_, ebx_, ecx_, edx_) \
|
||||||
__cpuid_count(type, 0, eax_, ebx_, ecx_, edx_)
|
__cpuid_count(type, 0, eax_, ebx_, ecx_, edx_)
|
||||||
|
#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
|
||||||
|
void __cpuidex(int CPUInfo[4], int info_type);
|
||||||
|
#pragma intrinsic(__cpuidex)
|
||||||
|
#define CPUID(type, eax_, ebx_, ecx_, edx_) do { \
|
||||||
|
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