--- liboil/liboilcpu-x86.c.orig 2009-02-26 12:42:45.000000000 -0700 +++ liboil/liboilcpu-x86.c 2009-10-12 23:58:07.000000000 -0600 @@ -162,6 +162,12 @@ static void get_cpuid (uint32_t op, uint32_t *a, uint32_t *b, uint32_t *c, uint32_t *d) { +#ifdef __APPLE__ + asm ( + "cpuid" + : "=a" (*a), "=b" (*b), "=c" (*c), "=d" (*d) + : "a" (op)); +#else __asm__ ( " pushq %%rbx\n" " cpuid\n" @@ -169,6 +175,7 @@ " popq %%rbx\n" : "=a" (*a), "=S" (*b), "=c" (*c), "=d" (*d) : "0" (op)); +#endif } #endif