diff options
author | Paul Davis <paul@linuxaudiosystems.com> | 2015-08-11 23:06:47 -0400 |
---|---|---|
committer | Paul Davis <paul@linuxaudiosystems.com> | 2015-08-11 23:06:47 -0400 |
commit | b6f9bbeb2fc3b31e612a8a8ba5a0c91f9f5642b4 (patch) | |
tree | 9faa244f64d994236ea4299cf6d0773872e372b4 /libs | |
parent | 4d0be2ee2efbfbd8508385d833503e6fa59fa309 (diff) |
can't use xgetbv instruction with apple gcc under OS X Lion
Diffstat (limited to 'libs')
-rw-r--r-- | libs/pbd/fpu.cc | 7 |
1 files changed, 7 insertions, 0 deletions
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<uint64_t>(edx) << 32) | eax; +#endif } #define _XCR_XFEATURE_ENABLED_MASK 0 |