diff --git a/include/cglm/simd/intrin.h b/include/cglm/simd/intrin.h index 9b3da2f..c477f34 100644 --- a/include/cglm/simd/intrin.h +++ b/include/cglm/simd/intrin.h @@ -13,7 +13,9 @@ # ifndef __SSE__ # define __SSE__ # endif - +# ifndef __SSE2__ +# define __SSE2__ +# endif # elif _M_IX86_FP == 1 # ifndef __SSE__ # define __SSE__ @@ -26,6 +28,29 @@ # endif #endif +#ifdef __AVX__ +# include +# define CGLM_AVX_FP 1 +# ifndef __SSE2__ +# define __SSE2__ +# endif +# ifndef __SSE3__ +# define __SSE3__ +# endif +# ifndef __SSE4__ +# define __SSE4__ +# endif +# ifndef __SSE4_1__ +# define __SSE4_1__ +# endif +# ifndef __SSE4_2__ +# define __SSE4_2__ +# endif +# ifndef CGLM_SIMD_x86 +# define CGLM_SIMD_x86 +# endif +#endif + #if defined(__SSE__) # include # define CGLM_SSE_FP 1 @@ -63,14 +88,6 @@ # endif #endif -#ifdef __AVX__ -# include -# define CGLM_AVX_FP 1 -# ifndef CGLM_SIMD_x86 -# define CGLM_SIMD_x86 -# endif -#endif - /* ARM Neon */ #if defined(_WIN32) && defined(_MSC_VER) /* TODO: non-ARM stuff already inported, will this be better option */