mirror of
https://github.com/libretro/ppsspp.git
synced 2025-02-03 23:46:08 +00:00
Improve AVX check in CPUDetect. Warning fix.
Keeping the ifdef for zenfone - still doesn't work without it
This commit is contained in:
parent
7409263eb0
commit
784bf82b58
@ -196,10 +196,11 @@ void CPUInfo::Detect() {
|
||||
// So let's just not bother with AVX on Android for now.
|
||||
#ifndef ANDROID
|
||||
// AVX support requires 3 separate checks:
|
||||
// - Is the AVX bit set in CPUID?
|
||||
// - Is the XSAVE bit set in CPUID?
|
||||
// - Is the AVX bit set in CPUID? (>>28)
|
||||
// - Is the XSAVE bit set in CPUID? ( >>26)
|
||||
// - Is the OSXSAVE bit set in CPUID? ( >>27)
|
||||
// - XGETBV result has the XCR bit set.
|
||||
if (((cpu_id[2] >> 28) & 1) && ((cpu_id[2] >> 27) & 1))
|
||||
if (((cpu_id[2] >> 28) & 1) && ((cpu_id[2] >> 27) & 1) && ((cpu_id[2] >> 26) & 1))
|
||||
{
|
||||
if ((_xgetbv(_XCR_XFEATURE_ENABLED_MASK) & 0x6) == 0x6)
|
||||
{
|
||||
|
@ -22,11 +22,11 @@
|
||||
|
||||
#include "Common.h"
|
||||
|
||||
#ifdef _M_X64
|
||||
#if defined(_M_X64) && !defined(_ARCH_64)
|
||||
#define _ARCH_64
|
||||
#endif
|
||||
|
||||
#ifdef _M_X64
|
||||
#ifdef _ARCH_64
|
||||
#define PTRBITS 64
|
||||
#else
|
||||
#define PTRBITS 32
|
||||
|
Loading…
x
Reference in New Issue
Block a user