Revert "Use __cpuid from intrin.h in Windows when available"

This reverts commit 6b870714a9.
This commit is contained in:
Chris Robinson
2012-10-07 08:08:11 -07:00
parent 6b870714a9
commit ebdf636759
3 changed files with 0 additions and 44 deletions
-33
View File
@@ -54,9 +54,6 @@ DEFINE_DEVPROPKEY(DEVPKEY_Device_FriendlyName, 0xa45c254e, 0xdf1c, 0x4efd, 0x80,
#ifdef HAVE_DLFCN_H
#include <dlfcn.h>
#endif
#ifdef HAVE_INTRIN_H
#include <intrin.h>
#endif
#ifdef HAVE_CPUID_H
#include <cpuid.h>
#endif
@@ -112,36 +109,6 @@ void FillCPUCaps(ALuint capfilter)
#endif
}
}
#elif defined(HAVE___CPUID)
union {
int regs[4];
char str[sizeof(int[4])];
} cpuinf[3];
unsigned int maxfunc = 0;
unsigned int maxextfunc = 0;
(__cpuid)(cpuinf[0].regs, 0);
maxfunc = cpuinf[0].regs[0];
(__cpuid)(cpuinf[0].regs, 0x80000000);
maxextfunc = cpuinf[0].regs[0];
TRACE("Detected max CPUID function: 0x%x (ext. 0x%x)\n", maxfunc, maxextfunc);
TRACE("Vendor ID: \"%.4s%.4s%.4s\"\n", cpuinf[0].str+4, cpuinf[0].str+12, cpuinf[0].str+8);
if(maxextfunc >= 0x80000004)
{
(__cpuid)(cpuinf[0].regs, 0x80000002);
(__cpuid)(cpuinf[1].regs, 0x80000003);
(__cpuid)(cpuinf[2].regs, 0x80000004);
TRACE("Name: \"%.16s%.16s%.16s\"\n", cpuinf[0].str, cpuinf[1].str, cpuinf[2].str);
}
if(maxfunc >= 1)
{
(__cpuid)(cpuinf[0].regs, 1);
if((cpuinf[0].regs[3]&(1<<25)))
caps |= CPU_CAP_SSE;
}
#endif
#endif
#ifdef HAVE_NEON
-5
View File
@@ -191,8 +191,6 @@ IF(WIN32)
MESSAGE(STATUS "Could not find Wine header files" )
ENDIF()
ENDIF()
CHECK_INCLUDE_FILE(intrin.h HAVE_INTRIN_H)
ELSE()
SET(OLD_REQUIRED_FLAGS "${CMAKE_REQUIRED_FLAGS}")
# Yes GCC, really don't accept visibility modes you don't support
@@ -280,9 +278,6 @@ IF(HAVE_FLOAT_H)
CHECK_SYMBOL_EXISTS(_controlfp float.h HAVE__CONTROLFP)
CHECK_SYMBOL_EXISTS(__control87_2 float.h HAVE___CONTROL87_2)
ENDIF()
IF(HAVE_INTRIN_H)
CHECK_SYMBOL_EXISTS(__cpuid intrin.h HAVE___CPUID)
ENDIF()
CHECK_FUNCTION_EXISTS(strtof HAVE_STRTOF)
CHECK_FUNCTION_EXISTS(stat HAVE_STAT)
-6
View File
@@ -100,9 +100,6 @@
/* Define if we have the floorf function */
#cmakedefine HAVE_FLOORF
/* Define if we have the __cpuid function */
#cmakedefine HAVE___CPUID
/* Define if we have the strtof function */
#cmakedefine HAVE_STRTOF
@@ -148,9 +145,6 @@
/* Define if we have initguid.h */
#cmakedefine HAVE_INITGUID_H
/* Define if we have intrin.h */
#cmakedefine HAVE_INTRIN_H
/* Define if we have ieeefp.h */
#cmakedefine HAVE_IEEEFP_H