Skip to content

Commit

Permalink
msvc, simd: fix simd headers for _M_ARM64EC
Browse files Browse the repository at this point in the history
  • Loading branch information
recp committed Apr 6, 2024
1 parent bd941ed commit a7845ff
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 7 deletions.
11 changes: 5 additions & 6 deletions include/cglm/simd/intrin.h
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,20 @@
#ifndef cglm_intrin_h
#define cglm_intrin_h

#if defined( _MSC_VER )
#if defined(_MSC_VER) && !defined(_M_ARM64EC)
# if (defined(_M_AMD64) || defined(_M_X64)) || _M_IX86_FP == 2
# ifndef __SSE__
# define __SSE__
# endif
# ifndef __SSE2__
# define __SSE2__
# endif

# elif _M_IX86_FP == 1
# ifndef __SSE__
# define __SSE__
# endif
#endif
# endif
/* do not use alignment for older visual studio versions */
# if _MSC_VER < 1913 /* Visual Studio 2017 version 15.6 */
/* also ARM32 also causes similar error, disable it for now on ARM32 too */
# if _MSC_VER < 1913 || _M_ARM /* Visual Studio 2017 version 15.6 */
# define CGLM_ALL_UNALIGNED
# endif
#endif
Expand Down
2 changes: 1 addition & 1 deletion include/cglm/simd/neon/mat4.h
Original file line number Diff line number Diff line change
Expand Up @@ -326,7 +326,7 @@ glm_mat4_inv_neon(mat4 mat, mat4 dest) {
float32x4_t s1 = glmm_float32x4_SIGNMASK_PNPN, s2;

#if !CGLM_ARM64
float32x2_t l0, l1;
float32x2_t l0, l1;
#endif

s2 = vrev64q_f32(s1);
Expand Down
1 change: 1 addition & 0 deletions include/cglm/types.h
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@

#if defined(_MSC_VER)
/* do not use alignment for older visual studio versions */
/* also ARM32 also causes similar error, disable it for now on ARM32 too */
# if _MSC_VER < 1913 || _M_ARM /* Visual Studio 2017 version 15.6 */
# define CGLM_ALL_UNALIGNED
# define CGLM_ALIGN(X) /* no alignment */
Expand Down

0 comments on commit a7845ff

Please sign in to comment.