diff --git a/include/cglm/simd/sse2/mat4.h b/include/cglm/simd/sse2/mat4.h index 571682a..05e7efe 100644 --- a/include/cglm/simd/sse2/mat4.h +++ b/include/cglm/simd/sse2/mat4.h @@ -153,7 +153,7 @@ glm_mat4_det_sse2(mat4 mat) { _mm_shuffle_ps(x0, x1, _MM_SHUFFLE(2, 2, 3, 1)), x2); - x2 = _mm_xor_ps(x2, glmm_float32x4_SIGNMASK_PNPN); + x2 = _mm_xor_ps(x2, glmm_float32x4_SIGNMASK_NPNP); return glmm_hadd(_mm_mul_ps(x2, r0)); } diff --git a/include/cglm/simd/x86.h b/include/cglm/simd/x86.h index 58dc0fd..77c289e 100644 --- a/include/cglm/simd/x86.h +++ b/include/cglm/simd/x86.h @@ -64,8 +64,8 @@ #define glmm_float32x4_SIGNMASK_NPNP GLMM__SIGNMASKf(GLMM_NEGZEROf, 0, GLMM_NEGZEROf, 0) #define glmm_float32x4_SIGNMASK_NPPN GLMM__SIGNMASKf(GLMM_NEGZEROf, 0, 0, GLMM_NEGZEROf) -#define glmm_float32x4_SIGNMASK_NEG _mm_set1_ps(GLMM_NEGZEROf) -#define glmm_float32x8_SIGNMASK_NEG _mm256_castsi256_ps(_mm256_set1_epi32(GLMM_NEGZEROf)); +#define glmm_float32x4_SIGNMASK_NEG _mm_castsi128_ps(_mm_set1_epi32(0x80000000)) /* _mm_set1_ps(-0.0f) */ +#define glmm_float32x8_SIGNMASK_NEG _mm256_castsi256_ps(_mm256_set1_epi32(GLMM_NEGZEROf)) static inline __m128