diff --git a/libs/pbd/fpu.cc b/libs/pbd/fpu.cc index c179def222..0c281a74e8 100644 --- a/libs/pbd/fpu.cc +++ b/libs/pbd/fpu.cc @@ -266,11 +266,21 @@ FPU::FPU () memset (*fxbuf, 0, 512); #ifdef COMPILER_MSVC - char *buf = *fxbuf; + char* buf = *fxbuf; +#ifdef _WIN64 + /* For 64-bit compilation, MSVC doesn't support inline assembly !! + ( https://docs.microsoft.com/en-us/cpp/assembler/inline/inline-assembler?view=msvc-160 ) */ + + /* but instead, it uses something called 'x64 intrinsics' + 1: ( https://docs.microsoft.com/en-us/cpp/intrinsics/x64-amd64-intrinsics-list?view=msvc-160 ) + 2: ( https://software.intel.com/sites/landingpage/IntrinsicsGuide/#text=_fxsave ) */ + _fxsave (buf); +#else __asm { mov eax, buf fxsave [eax] }; +#endif #else asm volatile ( "fxsave (%0)"