From 2d08fbb875f255b692dbe38a03de30e2b413ad09 Mon Sep 17 00:00:00 2001 From: twinaphex Date: Tue, 2 Sep 2014 20:50:43 +0200 Subject: [PATCH] (performance.c) Add RETRO_SIMD_AES --- libretro.h | 1 + performance.c | 4 ++++ 2 files changed, 5 insertions(+) diff --git a/libretro.h b/libretro.h index 9b58d9ceb9..a783a85d91 100755 --- a/libretro.h +++ b/libretro.h @@ -897,6 +897,7 @@ struct retro_log_callback #define RETRO_SIMD_AVX2 (1 << 12) #define RETRO_SIMD_VFPU (1 << 13) #define RETRO_SIMD_PS (1 << 14) +#define RETRO_SIMD_AES (1 << 15) typedef uint64_t retro_perf_tick_t; typedef int64_t retro_time_t; diff --git a/performance.c b/performance.c index fa846fb182..a450dbc47d 100644 --- a/performance.c +++ b/performance.c @@ -386,6 +386,9 @@ uint64_t rarch_get_cpu_features(void) if (flags[2] & (1 << 20)) cpu |= RETRO_SIMD_SSE42; + if (flags[2] & (1 << 25)) + cpu |= RETRO_SIMD_AES; + const int avx_flags = (1 << 27) | (1 << 28); // Must only perform xgetbv check if we have AVX CPU support (guaranteed to have at least i686). if (((flags[2] & avx_flags) == avx_flags) && ((xgetbv_x86(0) & 0x6) == 0x6)) @@ -417,6 +420,7 @@ uint64_t rarch_get_cpu_features(void) RARCH_LOG("[CPUID]: SSSE3: %u\n", !!(cpu & RETRO_SIMD_SSSE3)); RARCH_LOG("[CPUID]: SSE4: %u\n", !!(cpu & RETRO_SIMD_SSE4)); RARCH_LOG("[CPUID]: SSE4.2: %u\n", !!(cpu & RETRO_SIMD_SSE42)); + RARCH_LOG("[CPUID]: AES: %u\n", !!(cpu & RETRO_SIMD_AES)); RARCH_LOG("[CPUID]: AVX: %u\n", !!(cpu & RETRO_SIMD_AVX)); RARCH_LOG("[CPUID]: AVX2: %u\n", !!(cpu & RETRO_SIMD_AVX2)); #elif defined(ANDROID) && defined(ANDROID_ARM)