Skip to content

Commit

Permalink
Fixed NEON detection on arm64 CPUs
Browse files Browse the repository at this point in the history
This probably breaks RISCOS, but we need a better fix from Cameron Cawley for this
  • Loading branch information
slouken committed Jan 12, 2020
1 parent c14a59d commit 196f699
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/cpuinfo/SDL_cpuinfo.c
Expand Up @@ -338,7 +338,7 @@ CPU_haveAltiVec(void)
return altivec;
}

#if !defined(__arm__)
#if !defined(__ARM_ARCH)
static int
CPU_haveARMSIMD(void)
{
Expand Down Expand Up @@ -445,7 +445,7 @@ CPU_haveNEON(void)
# endif
/* All WinRT ARM devices are required to support NEON, but just in case. */
return IsProcessorFeaturePresent(PF_ARM_NEON_INSTRUCTIONS_AVAILABLE) != 0;
#elif !defined(__arm__)
#elif !defined(__ARM_ARCH)
return 0; /* not an ARM CPU at all. */
#elif __ARM_ARCH >= 8
return 1; /* ARMv8 always has non-optional NEON support. */
Expand Down

0 comments on commit 196f699

Please sign in to comment.