summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Davis <paul@linuxaudiosystems.com>2015-08-11 20:18:38 -0400
committerPaul Davis <paul@linuxaudiosystems.com>2015-08-11 20:18:38 -0400
commitbb399c8787f53fe590cdd3053d985c20f5dd8a96 (patch)
tree08abbf3b29b10ba05d73ae2a6741f21b27d52e1a
parentec5eccd3a33207b569374f02b2e05862f1fe4b67 (diff)
fix stupid logic error in testing separate bits required for AVX support
-rw-r--r--libs/pbd/fpu.cc5
1 files changed, 4 insertions, 1 deletions
diff --git a/libs/pbd/fpu.cc b/libs/pbd/fpu.cc
index 29d09f7aa9..93f75f7e2a 100644
--- a/libs/pbd/fpu.cc
+++ b/libs/pbd/fpu.cc
@@ -97,7 +97,10 @@ FPU::FPU ()
#endif /* PLATFORM_WINDOWS */
#ifndef __APPLE__
- if (cpuflags & ((1<<27) /* AVX */ |(1<<28) /* XGETBV */)) {
+ /* must check for both AVX and OSXSAVE support in cpuflags before
+ * attempting to use AVX related instructions.
+ */
+ if ((cpuflags & (1<<27)) /* AVX */ && (cpuflags & (1<<28) /* (OS)XSAVE */)) {
std::cerr << "Looks like AVX\n";