mirror of
https://github.com/libretro/RetroArch
synced 2025-03-29 22:20:21 +00:00
Verify that NEON code isn't run for non-NEON.
This commit is contained in:
parent
a3a0fbca36
commit
6e0e221f1b
@ -93,10 +93,8 @@ rarch_perf_tick_t rarch_get_perf_counter(void)
|
||||
#endif
|
||||
|
||||
#if defined(__x86_64__) || defined(__i386__) || defined(__i486__) || defined(__i686__)
|
||||
#if !defined(ANDROID_ARM) || !defined(ANDROID_MIPS)
|
||||
#define CPU_X86
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#if defined(_MSC_VER) && !defined(_XBOX)
|
||||
#include <intrin.h>
|
||||
@ -122,9 +120,11 @@ static void x86_cpuid(int func, int flags[4])
|
||||
"xchg %%" REG_b ", %%" REG_S "\n"
|
||||
: "=a"(flags[0]), "=S"(flags[1]), "=c"(flags[2]), "=d"(flags[3])
|
||||
: "a"(func));
|
||||
|
||||
#elif defined(_MSC_VER)
|
||||
__cpuid(flags, func);
|
||||
#else
|
||||
RARCH_WARN("Unknown compiler. Cannot check CPUID with inline assembly.\n");
|
||||
memset(flags, 0, 4 * sizeof(int));
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
@ -2637,6 +2637,10 @@ static void validate_cpu_features(void)
|
||||
if (!(cpu.simd & RARCH_SIMD_AVX))
|
||||
FAIL_CPU("AVX");
|
||||
#endif
|
||||
#ifdef HAVE_NEON
|
||||
if (!(cpu.simd & RARCH_SIMD_NEON))
|
||||
FAIL_CPU("NEON");
|
||||
#endif
|
||||
}
|
||||
|
||||
int rarch_main_init(int argc, char *argv[])
|
||||
|
Loading…
x
Reference in New Issue
Block a user