mirror of
https://github.com/alliedmodders/hl2sdk.git
synced 2025-12-09 03:28:24 +00:00
Don't invoke asm for cpu info on 64. Assume sse, sse2, etc. are supported there.
This commit is contained in:
parent
f560b5bd37
commit
b134f103a3
@ -11,30 +11,43 @@
|
|||||||
|
|
||||||
bool CheckMMXTechnology(void)
|
bool CheckMMXTechnology(void)
|
||||||
{
|
{
|
||||||
|
#ifndef PLATFORM_64BITS
|
||||||
unsigned long eax,ebx,edx,unused;
|
unsigned long eax,ebx,edx,unused;
|
||||||
cpuid(1,eax,ebx,unused,edx);
|
cpuid(1,eax,ebx,unused,edx);
|
||||||
|
|
||||||
return edx & 0x800000;
|
return edx & 0x800000;
|
||||||
|
#else
|
||||||
|
return true;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CheckSSETechnology(void)
|
bool CheckSSETechnology(void)
|
||||||
{
|
{
|
||||||
|
#ifndef PLATFORM_64BITS
|
||||||
unsigned long eax,ebx,edx,unused;
|
unsigned long eax,ebx,edx,unused;
|
||||||
cpuid(1,eax,ebx,unused,edx);
|
cpuid(1,eax,ebx,unused,edx);
|
||||||
|
|
||||||
return edx & 0x2000000L;
|
return edx & 0x2000000L;
|
||||||
|
#else
|
||||||
|
return true;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CheckSSE2Technology(void)
|
bool CheckSSE2Technology(void)
|
||||||
{
|
{
|
||||||
|
#ifndef PLATFORM_64BITS
|
||||||
unsigned long eax,ebx,edx,unused;
|
unsigned long eax,ebx,edx,unused;
|
||||||
cpuid(1,eax,ebx,unused,edx);
|
cpuid(1,eax,ebx,unused,edx);
|
||||||
|
|
||||||
return edx & 0x04000000;
|
return edx & 0x04000000;
|
||||||
|
#else
|
||||||
|
return true;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
bool Check3DNowTechnology(void)
|
bool Check3DNowTechnology(void)
|
||||||
{
|
{
|
||||||
|
#ifndef PLATFORM_64BITS
|
||||||
unsigned long eax, unused;
|
unsigned long eax, unused;
|
||||||
cpuid(0x80000000,eax,unused,unused,unused);
|
cpuid(0x80000000,eax,unused,unused,unused);
|
||||||
|
|
||||||
@ -44,4 +57,7 @@ bool Check3DNowTechnology(void)
|
|||||||
return ( eax & 1<<31 );
|
return ( eax & 1<<31 );
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
#else
|
||||||
|
return true;
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user