comparison src/cpuinfo/SDL_cpuinfo.c @ 3248:cde30895105d

Added 64-bit architectures to the fat build script
author Sam Lantinga <slouken@libsdl.org>
date Sat, 05 Sep 2009 10:39:18 +0000
parents 0b160c970b7e
children 8b01b0648f01
comparison
equal deleted inserted replaced
3247:2dcfb4e07a57 3248:cde30895105d
23 23
24 /* CPU feature detection for SDL */ 24 /* CPU feature detection for SDL */
25 25
26 #include "SDL_cpuinfo.h" 26 #include "SDL_cpuinfo.h"
27 27
28 #if defined(__MACOSX__) && defined(__ppc__) 28 #if defined(__MACOSX__) && (defined(__ppc__) || defined(__ppc64__))
29 #include <sys/sysctl.h> /* For AltiVec check */ 29 #include <sys/sysctl.h> /* For AltiVec check */
30 #elif SDL_ALTIVEC_BLITTERS && HAVE_SETJMP 30 #elif SDL_ALTIVEC_BLITTERS && HAVE_SETJMP
31 #include <signal.h> 31 #include <signal.h>
32 #include <setjmp.h> 32 #include <setjmp.h>
33 #endif 33 #endif
354 354
355 static __inline__ int 355 static __inline__ int
356 CPU_haveAltiVec(void) 356 CPU_haveAltiVec(void)
357 { 357 {
358 volatile int altivec = 0; 358 volatile int altivec = 0;
359 #if defined(__MACOSX__) && defined(__ppc__) 359 #if defined(__MACOSX__) && (defined(__ppc__) || defined(__ppc64__))
360 int selectors[2] = { CTL_HW, HW_VECTORUNIT }; 360 int selectors[2] = { CTL_HW, HW_VECTORUNIT };
361 int hasVectorUnit = 0; 361 int hasVectorUnit = 0;
362 size_t length = sizeof(hasVectorUnit); 362 size_t length = sizeof(hasVectorUnit);
363 int error = sysctl(selectors, 2, &hasVectorUnit, &length, NULL, 0); 363 int error = sysctl(selectors, 2, &hasVectorUnit, &length, NULL, 0);
364 if (0 == error) 364 if (0 == error)