src/cpuinfo/SDL_cpuinfo.c
changeset 10639 de933c5f3859
parent 10628 353f87de7efd
child 10737 3406a0f8b041
     1.1 --- a/src/cpuinfo/SDL_cpuinfo.c	Sun Nov 20 21:34:54 2016 -0800
     1.2 +++ b/src/cpuinfo/SDL_cpuinfo.c	Mon Nov 21 20:35:59 2016 -0500
     1.3 @@ -333,13 +333,12 @@
     1.4  #if defined(SDL_CPUINFO_DISABLED) || !defined(__ARM_ARCH)
     1.5      return 0;  /* disabled or not an ARM CPU at all. */
     1.6  #elif __ARM_ARCH >= 8
     1.7 -    return 1;  // ARMv8 always has non-optional NEON support.
     1.8 +    return 1;  /* ARMv8 always has non-optional NEON support. */
     1.9 +#elif defined(__APPLE__) && (__ARM_ARCH >= 7)
    1.10 +    /* (note that sysctlbyname("hw.optional.neon") doesn't work!) */
    1.11 +    return 1;  /* all Apple ARMv7 chips and later have NEON. */
    1.12  #elif defined(__APPLE__)
    1.13 -    /* all hardware that runs iOS 5 and later support NEON, but check anyhow */
    1.14 -    int neon = 0;
    1.15 -    size_t length = sizeof (neon);
    1.16 -    const int error = sysctlbyname("hw.optional.neon", &neon, &length, NULL, 0);
    1.17 -    return (!error) && (neon != 0);
    1.18 +    return 0;  /* assune anything else from Apple doesn't have NEON. */
    1.19  #elif (defined(__LINUX__) || defined(__ANDROID__)) && defined(HAVE_GETAUXVAL)
    1.20      return ((getauxval(AT_HWCAP) & HWCAP_NEON) == HWCAP_NEON);
    1.21  #elif (defined(__LINUX__) || defined(__ANDROID__))