From bb399c8787f53fe590cdd3053d985c20f5dd8a96 Mon Sep 17 00:00:00 2001 From: Paul Davis Date: Tue, 11 Aug 2015 20:18:38 -0400 Subject: fix stupid logic error in testing separate bits required for AVX support --- libs/pbd/fpu.cc | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'libs/pbd/fpu.cc') 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"; -- cgit v1.2.3