From 752849dcb23887733fde73fb0612e9613b98a98f Mon Sep 17 00:00:00 2001 From: twinaphex Date: Sat, 2 May 2015 08:08:42 +0200 Subject: [PATCH] (Android) Add VFPv3/VFPv4 flags --- libretro.h | 2 ++ performance.c | 5 ++++- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/libretro.h b/libretro.h index 766eeb1557..0381e388bd 100755 --- a/libretro.h +++ b/libretro.h @@ -1127,6 +1127,8 @@ struct retro_log_callback #define RETRO_SIMD_VFPU (1 << 13) #define RETRO_SIMD_PS (1 << 14) #define RETRO_SIMD_AES (1 << 15) +#define RETRO_SIMD_VFPV3 (1 << 16) +#define RETRO_SIMD_VFPV4 (1 << 17) typedef uint64_t retro_perf_tick_t; typedef int64_t retro_time_t; diff --git a/performance.c b/performance.c index 06b9647113..5c8d0e6df2 100644 --- a/performance.c +++ b/performance.c @@ -484,7 +484,6 @@ uint64_t rarch_get_cpu_features(void) #elif defined(ANDROID) && defined(ANDROID_ARM) uint64_t cpu_flags = android_getCpuFeatures(); - (void)cpu_flags; #ifdef __ARM_NEON__ if (cpu_flags & ANDROID_CPU_ARM_FEATURE_NEON) @@ -493,6 +492,8 @@ uint64_t rarch_get_cpu_features(void) arm_enable_runfast_mode(); } #endif + if (cpu_flags & ANDROID_CPU_ARM_FEATURE_VFPv3) + cpu |= RETRO_SIMD_VFPV3; #elif defined(__ARM_NEON__) cpu |= RETRO_SIMD_NEON; @@ -519,6 +520,8 @@ uint64_t rarch_get_cpu_features(void) if (cpu & RETRO_SIMD_AVX) strlcat(buf, " AVX", sizeof(buf)); if (cpu & RETRO_SIMD_AVX2) strlcat(buf, " AVX2", sizeof(buf)); if (cpu & RETRO_SIMD_NEON) strlcat(buf, " NEON", sizeof(buf)); + if (cpu & RETRO_SIMD_VFPV3) strlcat(buf, " VFPv3", sizeof(buf)); + if (cpu & RETRO_SIMD_VFPV4) strlcat(buf, " VFPv4", sizeof(buf)); if (cpu & RETRO_SIMD_VMX) strlcat(buf, " VMX", sizeof(buf)); if (cpu & RETRO_SIMD_VMX128) strlcat(buf, " VMX128", sizeof(buf)); if (cpu & RETRO_SIMD_VFPU) strlcat(buf, " VFPU", sizeof(buf));