int arm_cpu_caps(void) { /* This function should actually be a no-op. There is no way to adjust any of * these because the RTCD tables do not exist: the functions are called * statically */ int flags; int mask; if (!arm_cpu_env_flags(&flags)) { return flags; } mask = arm_cpu_env_mask(); #if HAVE_NEON || HAVE_NEON_ASM flags |= HAS_NEON; #endif /* HAVE_NEON || HAVE_NEON_ASM */ return flags & mask; }
int arm_cpu_caps(void) { int flags; int mask; if (!arm_cpu_env_flags(&flags)) { return flags; } mask = arm_cpu_env_mask(); /* MSVC has no inline __asm support for ARM, but it does let you __emit * instructions via their assembled hex code. * All of these instructions should be essentially nops. */ #if HAVE_EDSP if (mask & HAS_EDSP) { __try { /*PLD [r13]*/ __emit(0xF5DDF000); flags |= HAS_EDSP; } __except (GetExceptionCode() == EXCEPTION_ILLEGAL_INSTRUCTION) { /*Ignore exception.*/ } }