mirror of https://github.com/encounter/SDL.git
cpuinfo: Add SDL_HasNEON() support for ARM-based QNX.
This commit is contained in:
parent
efc43a1d88
commit
adecda5080
|
@ -50,6 +50,10 @@
|
||||||
#include <setjmp.h>
|
#include <setjmp.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(__QNXNTO__)
|
||||||
|
#include <sys/syspage.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#if (defined(__LINUX__) || defined(__ANDROID__)) && defined(__ARM_ARCH)
|
#if (defined(__LINUX__) || defined(__ANDROID__)) && defined(__ARM_ARCH)
|
||||||
/*#include <asm/hwcap.h>*/
|
/*#include <asm/hwcap.h>*/
|
||||||
#ifndef AT_HWCAP
|
#ifndef AT_HWCAP
|
||||||
|
@ -339,6 +343,8 @@ CPU_haveNEON(void)
|
||||||
return 1; /* all Apple ARMv7 chips and later have NEON. */
|
return 1; /* all Apple ARMv7 chips and later have NEON. */
|
||||||
#elif defined(__APPLE__)
|
#elif defined(__APPLE__)
|
||||||
return 0; /* assune anything else from Apple doesn't have NEON. */
|
return 0; /* assune anything else from Apple doesn't have NEON. */
|
||||||
|
#elif defined(__QNXNTO__)
|
||||||
|
return SYSPAGE_ENTRY(cpuinfo)->flags & ARM_CPU_FLAG_NEON;
|
||||||
#elif (defined(__LINUX__) || defined(__ANDROID__)) && defined(HAVE_GETAUXVAL)
|
#elif (defined(__LINUX__) || defined(__ANDROID__)) && defined(HAVE_GETAUXVAL)
|
||||||
return ((getauxval(AT_HWCAP) & HWCAP_NEON) == HWCAP_NEON);
|
return ((getauxval(AT_HWCAP) & HWCAP_NEON) == HWCAP_NEON);
|
||||||
#elif (defined(__LINUX__) || defined(__ANDROID__))
|
#elif (defined(__LINUX__) || defined(__ANDROID__))
|
||||||
|
|
Loading…
Reference in New Issue