File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change 115
115
#define CPU_CFG2_LSX (1 << 6)
116
116
#define CPU_CFG2_LASX (1 << 7)
117
117
118
- #if defined(SDL_ALTIVEC_BLITTERS ) && defined(HAVE_SETJMP ) && !defined(SDL_PLATFORM_MACOS ) && !defined(SDL_PLATFORM_OPENBSD ) && !defined(SDL_PLATFORM_FREEBSD )
118
+ #if defined(SDL_ALTIVEC_BLITTERS ) && defined(HAVE_SETJMP ) && !defined(SDL_PLATFORM_MACOS ) && !defined(SDL_PLATFORM_OPENBSD ) && !defined(SDL_PLATFORM_FREEBSD ) && (defined( SDL_PLATFORM_LINUX ) && !defined( HAVE_GETAUXVAL ))
119
119
/* This is the brute force way of detecting instruction sets...
120
120
the idea is borrowed from the libmpeg2 library - thanks!
121
121
*/
@@ -344,6 +344,8 @@ static int CPU_haveAltiVec(void)
344
344
elf_aux_info (AT_HWCAP , & cpufeatures , sizeof (cpufeatures ));
345
345
altivec = cpufeatures & PPC_FEATURE_HAS_ALTIVEC ;
346
346
return altivec ;
347
+ #elif defined(SDL_PLATFORM_LINUX ) && defined(__powerpc__ ) && defined(HAVE_GETAUXVAL )
348
+ altivec = getauxval (AT_HWCAP ) & PPC_FEATURE_HAS_ALTIVEC ;
347
349
#elif defined(SDL_ALTIVEC_BLITTERS ) && defined(HAVE_SETJMP )
348
350
void (* handler )(int sig );
349
351
handler = signal (SIGILL , illegal_instruction );
You can’t perform that action at this time.
0 commit comments