(features CPU) add CMOV

This commit is contained in:
twinaphex 2016-09-04 06:07:32 +02:00
parent f0485db137
commit 4811e1124d
2 changed files with 10 additions and 0 deletions

View File

@ -542,6 +542,12 @@ uint64_t cpu_features_get(void)
cpu |= RETRO_SIMD_MMXEXT;
}
len = sizeof(size_t);
if (sysctlbyname("hw.optional.floatingpoint", NULL, &len, NULL, 0) == 0)
{
cpu |= RETRO_SIMD_CMOV;
}
len = sizeof(size_t);
if (sysctlbyname("hw.optional.sse", NULL, &len, NULL, 0) == 0)
cpu |= RETRO_SIMD_SSE;
@ -608,6 +614,9 @@ uint64_t cpu_features_get(void)
x86_cpuid(1, flags);
if (flags[3] & (1 << 15))
cpu |= RETRO_SIMD_CMOV;
if (flags[3] & (1 << 23))
cpu |= RETRO_SIMD_MMX;

View File

@ -1284,6 +1284,7 @@ struct retro_log_callback
#define RETRO_SIMD_VFPV4 (1 << 17)
#define RETRO_SIMD_POPCNT (1 << 18)
#define RETRO_SIMD_MOVBE (1 << 19)
#define RETRO_SIMD_CMOV (1 << 20)
typedef uint64_t retro_perf_tick_t;
typedef int64_t retro_time_t;