performance.c - detect MMX too

This commit is contained in:
twinaphex 2013-12-25 21:34:03 +01:00
parent 1eafcfe1a2
commit 831f708ede
2 changed files with 5 additions and 0 deletions

View File

@ -613,6 +613,7 @@ struct retro_log_callback
#define RETRO_SIMD_NEON (1 << 5)
#define RETRO_SIMD_SSE3 (1 << 6)
#define RETRO_SIMD_SSSE3 (1 << 7)
#define RETRO_SIMD_MMX (1 << 8)
typedef uint64_t retro_perf_tick_t;
typedef int64_t retro_time_t;

View File

@ -257,6 +257,9 @@ uint64_t rarch_get_cpu_features(void)
x86_cpuid(1, flags);
if (flags[3] & (1 << 23))
cpu |= RETRO_SIMD_MMX;
if (flags[3] & (1 << 25))
cpu |= RETRO_SIMD_SSE;
@ -273,6 +276,7 @@ uint64_t rarch_get_cpu_features(void)
if ((flags[2] & avx_flags) == avx_flags)
cpu |= RETRO_SIMD_AVX;
RARCH_LOG("[CPUID]: MMX: %u\n", !!(cpu & RETRO_SIMD_MMX));
RARCH_LOG("[CPUID]: SSE: %u\n", !!(cpu & RETRO_SIMD_SSE));
RARCH_LOG("[CPUID]: SSE2: %u\n", !!(cpu & RETRO_SIMD_SSE2));
RARCH_LOG("[CPUID]: SSE3: %u\n", !!(cpu & RETRO_SIMD_SSE3));