mirror of
https://github.com/rehlds/rehlds.git
synced 2025-01-06 03:55:32 +03:00
Merge pull request #108 from theAsmodai/master
Fixed types in Sys_CheckCpuInstructionsSupport
This commit is contained in:
commit
4503af3ee0
@ -42,10 +42,10 @@ cpuinfo_t cpuinfo;
|
|||||||
|
|
||||||
void Sys_CheckCpuInstructionsSupport(void)
|
void Sys_CheckCpuInstructionsSupport(void)
|
||||||
{
|
{
|
||||||
int cpuid_data[4];
|
unsigned int cpuid_data[4];
|
||||||
|
|
||||||
#if defined ASMLIB_H
|
#if defined ASMLIB_H
|
||||||
cpuid_ex(cpuid_data, 1, 0);
|
cpuid_ex((int *)cpuid_data, 1, 0);
|
||||||
#elif defined(__GNUC__)
|
#elif defined(__GNUC__)
|
||||||
__get_cpuid(0x1, &cpuid_data[0], &cpuid_data[1], &cpuid_data[2], &cpuid_data[3]);
|
__get_cpuid(0x1, &cpuid_data[0], &cpuid_data[1], &cpuid_data[2], &cpuid_data[3]);
|
||||||
#else
|
#else
|
||||||
@ -59,7 +59,7 @@ void Sys_CheckCpuInstructionsSupport(void)
|
|||||||
cpuinfo.avx = (cpuid_data[2] & AVX_FLAG) ? 1 : 0;
|
cpuinfo.avx = (cpuid_data[2] & AVX_FLAG) ? 1 : 0;
|
||||||
|
|
||||||
#if defined ASMLIB_H
|
#if defined ASMLIB_H
|
||||||
cpuid_ex(cpuid_data, 7, 0);
|
cpuid_ex((int *)cpuid_data, 7, 0);
|
||||||
#elif defined(__GNUC__)
|
#elif defined(__GNUC__)
|
||||||
__get_cpuid(0x7, &cpuid_data[0], &cpuid_data[1], &cpuid_data[2], &cpuid_data[3]);
|
__get_cpuid(0x7, &cpuid_data[0], &cpuid_data[1], &cpuid_data[2], &cpuid_data[3]);
|
||||||
#else
|
#else
|
||||||
|
Loading…
Reference in New Issue
Block a user