diff --git a/CMakeLists.txt b/CMakeLists.txt index 6d026b67..da6ef26c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -5,6 +5,7 @@ project(glm) enable_testing() add_definitions(-D_CRT_SECURE_NO_WARNINGS) +add_definitions(/Za) #add_definitions(-pedantic) #add_definitions(-S) #add_definitions(-s) diff --git a/glm/core/intrinsic_common.inl b/glm/core/intrinsic_common.inl index 8519785e..3c123bb6 100644 --- a/glm/core/intrinsic_common.inl +++ b/glm/core/intrinsic_common.inl @@ -172,7 +172,11 @@ GLM_FUNC_QUALIFIER __m128 sse_rnd_ps(__m128 x) //roundEven GLM_FUNC_QUALIFIER __m128 sse_rde_ps(__m128 v) { - + __m128 and0 = _mm_and_ps(glm::detail::_epi32_sign_mask, x); + __m128 or0 = _mm_or_ps(and0, glm::detail::_ps_2pow23); + __m128 add0 = _mm_add_ps(x, or0); + __m128 sub0 = _mm_sub_ps(add0, or0); + return sub0; } GLM_FUNC_QUALIFIER __m128 sse_ceil_ps(__m128 x) diff --git a/glm/core/intrinsic_matrix.inl b/glm/core/intrinsic_matrix.inl index 454d08e8..326b65ba 100644 --- a/glm/core/intrinsic_matrix.inl +++ b/glm/core/intrinsic_matrix.inl @@ -202,8 +202,6 @@ GLM_FUNC_QUALIFIER __m128 sse_slow_det_ps(__m128 const in[4]) __m128 Mul00 = _mm_mul_ps(Swp00, Swp01); __m128 Mul01 = _mm_mul_ps(Swp02, Swp03); Fac0 = _mm_sub_ps(Mul00, Mul01); - - bool stop = true; } __m128 Fac1; @@ -224,8 +222,6 @@ GLM_FUNC_QUALIFIER __m128 sse_slow_det_ps(__m128 const in[4]) __m128 Mul00 = _mm_mul_ps(Swp00, Swp01); __m128 Mul01 = _mm_mul_ps(Swp02, Swp03); Fac1 = _mm_sub_ps(Mul00, Mul01); - - bool stop = true; } @@ -247,8 +243,6 @@ GLM_FUNC_QUALIFIER __m128 sse_slow_det_ps(__m128 const in[4]) __m128 Mul00 = _mm_mul_ps(Swp00, Swp01); __m128 Mul01 = _mm_mul_ps(Swp02, Swp03); Fac2 = _mm_sub_ps(Mul00, Mul01); - - bool stop = true; } __m128 Fac3; @@ -269,8 +263,6 @@ GLM_FUNC_QUALIFIER __m128 sse_slow_det_ps(__m128 const in[4]) __m128 Mul00 = _mm_mul_ps(Swp00, Swp01); __m128 Mul01 = _mm_mul_ps(Swp02, Swp03); Fac3 = _mm_sub_ps(Mul00, Mul01); - - bool stop = true; } __m128 Fac4; @@ -291,8 +283,6 @@ GLM_FUNC_QUALIFIER __m128 sse_slow_det_ps(__m128 const in[4]) __m128 Mul00 = _mm_mul_ps(Swp00, Swp01); __m128 Mul01 = _mm_mul_ps(Swp02, Swp03); Fac4 = _mm_sub_ps(Mul00, Mul01); - - bool stop = true; } __m128 Fac5; @@ -313,8 +303,6 @@ GLM_FUNC_QUALIFIER __m128 sse_slow_det_ps(__m128 const in[4]) __m128 Mul00 = _mm_mul_ps(Swp00, Swp01); __m128 Mul01 = _mm_mul_ps(Swp02, Swp03); Fac5 = _mm_sub_ps(Mul00, Mul01); - - bool stop = true; } __m128 SignA = _mm_set_ps( 1.0f,-1.0f, 1.0f,-1.0f);