mirror of https://github.com/PCSX2/pcsx2.git
common: move _xgetbv with cpuid intrin
Besides, code comes from Gabest and not reactOS
This commit is contained in:
parent
e872552fdc
commit
6e306ee44f
|
@ -67,11 +67,3 @@ static __inline__ __attribute__((always_inline)) s64 _InterlockedExchange64(vola
|
|||
__sync_synchronize();
|
||||
return __sync_lock_test_and_set(Target, Value);
|
||||
}
|
||||
|
||||
/*** System information ***/
|
||||
static __inline__ __attribute__((always_inline)) unsigned long long _xgetbv(unsigned int index)
|
||||
{
|
||||
unsigned int eax, edx;
|
||||
__asm__ __volatile__("xgetbv" : "=a"(eax), "=d"(edx) : "c"(index));
|
||||
return ((unsigned long long)edx << 32) | eax;
|
||||
}
|
||||
|
|
|
@ -49,6 +49,13 @@ static __inline__ __attribute__((always_inline)) void cpuid(int CPUInfo[], const
|
|||
__cpuid(InfoType, CPUInfo[0], CPUInfo[1], CPUInfo[2], CPUInfo[3]);
|
||||
}
|
||||
|
||||
static __inline__ __attribute__((always_inline)) unsigned long long _xgetbv(unsigned int index)
|
||||
{
|
||||
unsigned int eax, edx;
|
||||
__asm__ __volatile__("xgetbv" : "=a"(eax), "=d"(edx) : "c"(index));
|
||||
return ((unsigned long long)edx << 32) | eax;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
// Rotate instruction
|
||||
|
|
Loading…
Reference in New Issue