Fixed LLVM GCC support

This commit is contained in:
Christophe Riccio 2011-05-19 10:26:22 +01:00
parent 50c0f1cddb
commit 0e9ad7b6a5
4 changed files with 15 additions and 4 deletions

View File

@ -9,7 +9,7 @@ add_definitions(-D_CRT_SECURE_NO_WARNINGS)
#add_definitions(-pedantic)
#add_definitions(-S)
#add_definitions(-s)
#add_definitions(-msse2)
add_definitions(-msse2)
#add_definitions(-m32)
#add_definitions(-mfpmath=387)
#add_definitions(-ffast-math)

View File

@ -332,7 +332,7 @@ namespace detail
# define GLM_ALIGNED_STRUCT(x) __declspec(align(x)) struct
# define GLM_RESTRICT __declspec(restrict)
# define GLM_RESTRICT_VAR __restrict
#elif((GLM_COMPILER & GLM_COMPILER_GCC) && (GLM_COMPILER >= GLM_COMPILER_GCC31))
#elif((GLM_COMPILER & (GLM_COMPILER_GCC | GLM_COMPILER_LLVM_GCC)) && (GLM_COMPILER >= GLM_COMPILER_GCC31))
# define GLM_DEPRECATED __attribute__((__deprecated__))
# define GLM_ALIGN(x) __attribute__((aligned(x)))
# define GLM_ALIGNED_STRUCT(x) struct __attribute__((aligned(x)))

View File

@ -328,7 +328,18 @@
# else
# define GLM_ARCH GLM_ARCH_PURE
# endif
#elif(GLM_COMPILER & GLM_COMPILER_LLVM_GCC)
# if(defined(__AVX__))
# define GLM_ARCH GLM_ARCH_AVX
# elif(defined(__SSE3__))
# define GLM_ARCH GLM_ARCH_SSE3
# elif(defined(__SSE2__))
# define GLM_ARCH GLM_ARCH_SSE2
# else
# define GLM_ARCH GLM_ARCH_PURE
# endif
#elif((GLM_COMPILER & GLM_COMPILER_GCC) && (defined(__i386__) || defined(__x86_64__)))
# error "GCC"
# if(defined(__AVX__))
# define GLM_ARCH GLM_ARCH_AVX
# elif(defined(__SSE3__))

View File

@ -33,7 +33,7 @@ namespace detail
{
/// 4-dimensional vector implemented using SIMD SEE intrinsics.
/// \ingroup gtx_simd_vec4
GLM_ALIGNED_STRUCT(4) fvec4SIMD
GLM_ALIGNED_STRUCT(16) fvec4SIMD
{
enum ctor{null};
typedef __m128 value_type;
@ -114,7 +114,7 @@ namespace detail
namespace gtx{
namespace simd_vec4 ///< GLM_GTX_simd_vec4 extension: SIMD implementation of vec4 type.
{
typedef detail::fvec4SIMD simdVec4;
typedef glm::detail::fvec4SIMD simdVec4;
/// \addtogroup gtx_simd_vec4
///@{