mirror of
https://github.com/ultravideo/uvg266.git
synced 2024-11-27 19:24:06 +00:00
Small fix for __get_cpuid()
This commit is contained in:
parent
642564b6fb
commit
792a5a5dd1
|
@ -159,8 +159,9 @@ static void* strategyselector_choose_for(const strategy_list * const strategies,
|
||||||
#if defined(__GNUC__)
|
#if defined(__GNUC__)
|
||||||
#include <cpuid.h>
|
#include <cpuid.h>
|
||||||
#else
|
#else
|
||||||
|
#include <intrin.h>
|
||||||
//Adapter from __cpuid (VS) to __get_cpuid (GNU C).
|
//Adapter from __cpuid (VS) to __get_cpuid (GNU C).
|
||||||
inline int __get_cpuid(unsigned int __level, unsigned int *__eax, unsigned int *__ebx, unsigned int *__ecx, unsigned int *__edx) {
|
__inline int __get_cpuid(unsigned int __level, unsigned int *__eax, unsigned int *__ebx, unsigned int *__ecx, unsigned int *__edx) {
|
||||||
int CPUInfo[4] = {*__eax, *__ebx, *__ecx, *__edx};
|
int CPUInfo[4] = {*__eax, *__ebx, *__ecx, *__edx};
|
||||||
__cpuid(CPUInfo, 0);
|
__cpuid(CPUInfo, 0);
|
||||||
// check if the CPU supports the cpuid instruction.
|
// check if the CPU supports the cpuid instruction.
|
||||||
|
@ -172,6 +173,7 @@ inline int __get_cpuid(unsigned int __level, unsigned int *__eax, unsigned int *
|
||||||
*__edx = CPUInfo[3];
|
*__edx = CPUInfo[3];
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
|
return 0;
|
||||||
}
|
}
|
||||||
#endif //defined(__GNUC__)
|
#endif //defined(__GNUC__)
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue