From b6f9bbeb2fc3b31e612a8a8ba5a0c91f9f5642b4 Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Tue, 11 Aug 2015 23:06:47 -0400 Subject: [PATCH] can't use xgetbv instruction with apple gcc under OS X Lion --- libs/pbd/fpu.cc | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/libs/pbd/fpu.cc b/libs/pbd/fpu.cc index 5c98ddc3c9..7450b0d451 100644 --- a/libs/pbd/fpu.cc +++ b/libs/pbd/fpu.cc @@ -78,9 +78,16 @@ __cpuid(int regs[4], int cpuid_leaf) static uint64_t _xgetbv (uint32_t xcr) { +#ifdef __APPLE__ + /* it would be nice to make this work on OS X but as long we use veclib, + we don't really need to know about SSE/AVX on that platform. + */ + return 0; +#else uint32_t eax, edx; __asm__ volatile ("xgetbv" : "=a" (eax), "=d" (edx) : "c" (xcr)); return (static_cast(edx) << 32) | eax; +#endif } #define _XCR_XFEATURE_ENABLED_MASK 0