Browse Source

Merge 0.9.6

Christophe Riccio 10 years ago
parent
commit
594380dcb6
4 changed files with 14 additions and 16 deletions
  1. 2 2
      CMakeLists.txt
  2. 6 6
      glm/detail/intrinsic_common.inl
  3. 4 7
      glm/detail/setup.hpp
  4. 2 1
      readme.txt

+ 2 - 2
CMakeLists.txt

@@ -129,8 +129,8 @@ endif()
 if(CMAKE_COMPILER_IS_GNUCXX)
 	#add_definitions(-S)
 	#add_definitions(-s)
-	#add_definitions(-m32)
-	#add_definitions(-O3)
+	add_definitions(-m64)
+	add_definitions(-O2)
 
 	#add_definitions(-fprofile-arcs -ftest-coverage) gcov
 	#ctest_enable_coverage()

+ 6 - 6
glm/detail/intrinsic_common.inl

@@ -301,13 +301,13 @@ GLM_FUNC_QUALIFIER __m128 sse_ssp_ps(__m128 edge0, __m128 edge1, __m128 x)
 // By Elan Ruskin, http://assemblyrequired.crashworks.org/
 GLM_FUNC_QUALIFIER __m128 sse_sqrt_wip_ss(__m128 const & x)
 {
-	__m128 recip = _mm_rsqrt_ss(x);  // "estimate" opcode
-	const static __m128 three = {3, 3, 3, 3}; // aligned consts for fast load
-	const static __m128 half = {0.5,0.5,0.5,0.5};
-	__m128 halfrecip = _mm_mul_ss(half, recip);
-	__m128 threeminus_xrr = _mm_sub_ss(three, _mm_mul_ss(x, _mm_mul_ss (recip, recip)));
-	return _mm_mul_ss( halfrecip, threeminus_xrr);
+	__m128 const recip = _mm_rsqrt_ss(x);  // "estimate" opcode
+	__m128 const half = _mm_set_ps1(0.5f);
+	__m128 const halfrecip = _mm_mul_ss(half, recip);
+	__m128 const threeminus_xrr = _mm_sub_ss(three, _mm_mul_ss(x, _mm_mul_ss (recip, recip)));
+	return _mm_mul_ss(halfrecip, threeminus_xrr);
 }
 
 }//namespace detail
 }//namespace glms
+

+ 4 - 7
glm/detail/setup.hpp

@@ -633,8 +633,8 @@
 #endif
 
 // 
-#define GLM_HAS_TRIVIAL_QUERIES ( \
-	((GLM_COMPILER & GLM_COMPILER_VC) && (GLM_COMPILER >= GLM_COMPILER_VC2013)))
+#define GLM_HAS_TRIVIAL_QUERIES 0//( \
+	//((GLM_COMPILER & GLM_COMPILER_VC) && (GLM_COMPILER >= GLM_COMPILER_VC2013)))
 
 // 
 #if GLM_LANG & GLM_LANG_CXX11_FLAG
@@ -745,7 +745,7 @@
 // With MinGW-W64, including intrinsic headers before intrin.h will produce some errors. The problem is
 // that windows.h (and maybe other headers) will silently include intrin.h, which of course causes problems.
 // To fix, we just explicitly include intrin.h here.
-#if defined(__MINGW32__) && (GLM_ARCH != GLM_ARCH_PURE)
+#if defined(__MINGW64__) && (GLM_ARCH != GLM_ARCH_PURE)
 #	include <intrin.h>
 #endif
 
@@ -824,12 +824,9 @@
 #	if GLM_COMPILER & GLM_COMPILER_VC
 #		define GLM_INLINE __forceinline
 #		define GLM_NEVER_INLINE __declspec((noinline))
-#	elif GLM_COMPILER & GLM_COMPILER_GCC
+#	elif GLM_COMPILER & (GLM_COMPILER_GCC | GLM_COMPILER_APPLE_CLANG | GLM_COMPILER_LLVM)
 #		define GLM_INLINE inline __attribute__((__always_inline__))
 #		define GLM_NEVER_INLINE __attribute__((__noinline__))
-#	elif GLM_COMPILER & (GLM_COMPILER_APPLE_CLANG | GLM_COMPILER_LLVM)
-#		define GLM_INLINE __attribute__((__always_inline__))
-#		define GLM_NEVER_INLINE __attribute__((__noinline__))
 #	else
 #		define GLM_INLINE inline
 #		define GLM_NEVER_INLINE

+ 2 - 1
readme.txt

@@ -74,7 +74,7 @@ Improvements:
 - Specialized integer implementation of YCoCg-R #310
 
 ================================================================================
-GLM 0.9.6.2: 2015-01-XX
+GLM 0.9.6.2: 2015-02-15
 --------------------------------------------------------------------------------
 Features:
 - Added display of GLM version with other GLM_MESSAGES
@@ -96,6 +96,7 @@ Fixes:
 - Fixed GTC_packing *pack*norm*x* build and added tests #292
 - Disabled GTX_scalar_multiplication for GCC, failing to build tests #242
 - Fixed Visual C++ 2015 constexpr errors: Disabled only partial support
+- Fixed functions not inlined with Clang #302
 
 ================================================================================
 GLM 0.9.6.1: 2014-12-10