Commit ad54c6e1 authored by Sam Hocevar's avatar Sam Hocevar

* src/misc/cpu.c: do not assume SYS_DARWIN means powerpc, so that we can

    properly detect CPU features on a MacIntel.
parent d7686e18
...@@ -33,7 +33,7 @@ ...@@ -33,7 +33,7 @@
# include <setjmp.h> /* longjmp, setjmp */ # include <setjmp.h> /* longjmp, setjmp */
#endif #endif
#ifdef SYS_DARWIN #if defined(SYS_DARWIN) && (defined(__ppc__) || defined(__ppc64__))
#include <sys/sysctl.h> #include <sys/sysctl.h>
#endif #endif
...@@ -66,7 +66,7 @@ uint32_t CPUCapabilities( void ) ...@@ -66,7 +66,7 @@ uint32_t CPUCapabilities( void )
{ {
volatile uint32_t i_capabilities = CPU_CAPABILITY_NONE; volatile uint32_t i_capabilities = CPU_CAPABILITY_NONE;
#if defined( SYS_DARWIN ) #if defined(SYS_DARWIN) && (defined(__ppc__) || defined(__ppc64__))
int selectors[2] = { CTL_HW, HW_VECTORUNIT }; int selectors[2] = { CTL_HW, HW_VECTORUNIT };
int i_has_altivec = 0; int i_has_altivec = 0;
size_t i_length = sizeof( i_has_altivec ); size_t i_length = sizeof( i_has_altivec );
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment