simd, msvc: ensure required definitions are exist on msvc

This commit is contained in:
Recep Aslantas
2024-04-07 22:48:11 +03:00
parent 4f00ce0e52
commit 62c0448e25

View File

@@ -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 <immintrin.h>
# 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 <xmmintrin.h>
# define CGLM_SSE_FP 1
@@ -63,14 +88,6 @@
# endif
#endif
#ifdef __AVX__
# include <immintrin.h>
# 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 */