mirror of https://github.com/encounter/SDL.git
fix non-ARM h/w on FreeBSD builds (bug #5405, patch from David Carlier.)
This commit is contained in:
parent
cf71e01734
commit
e91153f278
|
@ -54,9 +54,6 @@
|
||||||
#include <sys/param.h>
|
#include <sys/param.h>
|
||||||
#include <sys/sysctl.h> /* For AltiVec check */
|
#include <sys/sysctl.h> /* For AltiVec check */
|
||||||
#include <machine/cpu.h>
|
#include <machine/cpu.h>
|
||||||
#if defined(HAVE_ELF_AUX_INFO)
|
|
||||||
#include <sys/auxv.h>
|
|
||||||
#endif
|
|
||||||
#elif SDL_ALTIVEC_BLITTERS && HAVE_SETJMP
|
#elif SDL_ALTIVEC_BLITTERS && HAVE_SETJMP
|
||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
#include <setjmp.h>
|
#include <setjmp.h>
|
||||||
|
@ -94,6 +91,10 @@
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#if defined(HAVE_ELF_AUX_INFO)
|
||||||
|
#include <sys/auxv.h>
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef __RISCOS__
|
#ifdef __RISCOS__
|
||||||
#include <kernel.h>
|
#include <kernel.h>
|
||||||
#include <swis.h>
|
#include <swis.h>
|
||||||
|
@ -465,7 +466,7 @@ CPU_haveNEON(void)
|
||||||
return 0; /* assume anything else from Apple doesn't have NEON. */
|
return 0; /* assume anything else from Apple doesn't have NEON. */
|
||||||
#elif defined(__OpenBSD__)
|
#elif defined(__OpenBSD__)
|
||||||
return 1; /* OpenBSD only supports ARMv7 CPUs that have NEON. */
|
return 1; /* OpenBSD only supports ARMv7 CPUs that have NEON. */
|
||||||
#elif defined(HAVE_ELF_AUX_INFO)
|
#elif defined(HAVE_ELF_AUX_INFO) && defined(HWCAP_NEON)
|
||||||
unsigned long hasneon = 0;
|
unsigned long hasneon = 0;
|
||||||
if (elf_aux_info(AT_HWCAP, (void *)&hasneon, (int)sizeof(hasneon)) != 0)
|
if (elf_aux_info(AT_HWCAP, (void *)&hasneon, (int)sizeof(hasneon)) != 0)
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -494,7 +495,7 @@ CPU_haveNEON(void)
|
||||||
/* Use the VFPSupport_Features SWI to access the MVFR registers */
|
/* Use the VFPSupport_Features SWI to access the MVFR registers */
|
||||||
{
|
{
|
||||||
_kernel_swi_regs regs;
|
_kernel_swi_regs regs;
|
||||||
regs.r[0] = 0;
|
regs.r[0] = 0;
|
||||||
if (_kernel_swi(VFPSupport_Features, ®s, ®s) == NULL) {
|
if (_kernel_swi(VFPSupport_Features, ®s, ®s) == NULL) {
|
||||||
if ((regs.r[2] & 0xFFF000) == 0x111000) {
|
if ((regs.r[2] & 0xFFF000) == 0x111000) {
|
||||||
return 1;
|
return 1;
|
||||||
|
|
Loading…
Reference in New Issue