SSE2: Fix for MinGW

This commit is contained in:
kaetemi 2014-06-19 00:05:43 +02:00
parent b9576c93dd
commit 56c59d114d
4 changed files with 18 additions and 6 deletions

View file

@ -53,8 +53,8 @@ public:
uint getNumAllocatedBlocks() const { return _NumAlloc; } uint getNumAllocatedBlocks() const { return _NumAlloc; }
private: private:
class CChunk; class CChunk;
NL_ALIGN(NL_DEFAULT_MEMORY_ALIGNMENT)
class CNode class NL_ALIGN(NL_DEFAULT_MEMORY_ALIGNMENT) CNode
{ {
public: public:
CChunk *Chunk; // the Chunk this node belongs to. CChunk *Chunk; // the Chunk this node belongs to.

View file

@ -53,8 +53,8 @@ class CPlane;
* \author Nevrax France * \author Nevrax France
* \date 2000 * \date 2000
*/ */
NL_ALIGN_SSE2
class CMatrix class NL_ALIGN_SSE2 CMatrix
{ {
public: public:
/// Rotation Order. /// Rotation Order.

View file

@ -342,7 +342,7 @@ typedef unsigned int uint; // at least 32bits (depend of processor)
// #ifdef NL_ENABLE_FORCE_INLINE // #ifdef NL_ENABLE_FORCE_INLINE
# ifdef NL_COMP_VC # ifdef NL_COMP_VC
# define NL_FORCE_INLINE __forceinline # define NL_FORCE_INLINE __forceinline
# elif NL_COMP_GCC # elif defined(NL_COMP_GCC)
# define NL_FORCE_INLINE inline __attribute__((always_inline)) # define NL_FORCE_INLINE inline __attribute__((always_inline))
# else # else
# define NL_FORCE_INLINE inline # define NL_FORCE_INLINE inline
@ -358,7 +358,10 @@ typedef unsigned int uint; // at least 32bits (depend of processor)
#define NL_ALIGN(nb) __attribute__((aligned(nb))) #define NL_ALIGN(nb) __attribute__((aligned(nb)))
#endif #endif
#ifdef NL_COMP_VC #ifdef NL_OS_WINDOWS
#include <stdlib.h>
#include <intrin.h>
#include <malloc.h>
inline void *aligned_malloc(size_t size, size_t alignment) { return _aligned_malloc(size, alignment); } inline void *aligned_malloc(size_t size, size_t alignment) { return _aligned_malloc(size, alignment); }
inline void aligned_free(void *ptr) { _aligned_free(ptr); } inline void aligned_free(void *ptr) { _aligned_free(ptr); }
#else #else

View file

@ -140,6 +140,11 @@ inline void CMatrix::testExpandRot() const
self->Scale33= 1; self->Scale33= 1;
} }
} }
void CMatrix::testExpandRotEx() const
{
testExpandRot();
}
inline void CMatrix::testExpandProj() const inline void CMatrix::testExpandProj() const
{ {
if(hasProj()) if(hasProj())
@ -151,6 +156,10 @@ inline void CMatrix::testExpandProj() const
self->a41=0; self->a42=0; self->a43=0; self->a44=1; self->a41=0; self->a42=0; self->a43=0; self->a44=1;
} }
} }
void CMatrix::testExpandProjEx() const
{
testExpandProj();
}
// ====================================================================================================== // ======================================================================================================