From ebba4eea8e836567cf1736c84d8e9f24f4c805b4 Mon Sep 17 00:00:00 2001 From: Recep Aslantas Date: Mon, 19 Apr 2021 04:14:14 +0300 Subject: [PATCH] win, msvc: enable FMA macro for MSVC --- include/cglm/simd/x86.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/include/cglm/simd/x86.h b/include/cglm/simd/x86.h index 29a02f3..9f8e110 100644 --- a/include/cglm/simd/x86.h +++ b/include/cglm/simd/x86.h @@ -197,6 +197,11 @@ glmm_store3(float v[3], __m128 vx) { _mm_store_ss(&v[2], glmm_shuff1(vx, 2, 2, 2, 2)); } +/* enable FMA macro for MSVC? */ +#if !defined(__FMA__) && defined(__AVX2__) +# define __FMA__ 1 +#endif + static inline __m128 glmm_fmadd(__m128 a, __m128 b, __m128 c) {