diff --git a/idlib/math/Simd_AltiVec.cpp b/idlib/math/Simd_AltiVec.cpp index eb3a70b..4b894f3 100644 --- a/idlib/math/Simd_AltiVec.cpp +++ b/idlib/math/Simd_AltiVec.cpp @@ -47,7 +47,7 @@ If you have questions concerning this license or the applicable additional terms // //=============================================================== -#if defined(MACOS_X) && defined(__ppc__) +#if defined(__GNUC__) && defined(__ALTIVEC__) #ifdef PPC_INTRINSICS // for square root estimate instruction diff --git a/idlib/math/Simd_AltiVec.h b/idlib/math/Simd_AltiVec.h index e7bdac3..351ca6c 100644 --- a/idlib/math/Simd_AltiVec.h +++ b/idlib/math/Simd_AltiVec.h @@ -106,7 +106,7 @@ If you have questions concerning this license or the applicable additional terms //#define DRAWVERT_PADDED class idSIMD_AltiVec : public idSIMD_Generic { -#if defined(MACOS_X) && defined(__ppc__) +#if defined(__GNUC__) && defined(__ALTIVEC__) public: virtual const char * VPCALL GetName( void ) const; diff --git a/idlib/math/Simd_MMX.cpp b/idlib/math/Simd_MMX.cpp index ea02ae8..37bb917 100644 --- a/idlib/math/Simd_MMX.cpp +++ b/idlib/math/Simd_MMX.cpp @@ -39,7 +39,7 @@ If you have questions concerning this license or the applicable additional terms // //=============================================================== -#if defined(MACOS_X) && defined(__i386__) +#if defined(__GNUC__) && defined(__MMX__) /* ============ idSIMD_MMX::GetName diff --git a/idlib/math/Simd_MMX.h b/idlib/math/Simd_MMX.h index a9c23f5..83fce24 100644 --- a/idlib/math/Simd_MMX.h +++ b/idlib/math/Simd_MMX.h @@ -39,7 +39,7 @@ If you have questions concerning this license or the applicable additional terms class idSIMD_MMX : public idSIMD_Generic { public: -#if defined(MACOS_X) && defined(__i386__) +#if defined(__GNUC__) && defined(__MMX__) virtual const char * VPCALL GetName( void ) const; #elif defined(_WIN32) diff --git a/idlib/math/Simd_SSE.cpp b/idlib/math/Simd_SSE.cpp index 4c5917c..a4de610 100644 --- a/idlib/math/Simd_SSE.cpp +++ b/idlib/math/Simd_SSE.cpp @@ -48,7 +48,7 @@ If you have questions concerning this license or the applicable additional terms #define DRAWVERT_TANGENT1_OFFSET (ptrdiff_t(src) - ptrdiff_t(&src->tangents[1])) #define DRAWVERT_COLOR_OFFSET (ptrdiff_t(src) - ptrdiff_t(&src->color)) -#if defined(MACOS_X) && defined(__i386__) +#if defined(__GNUC__) && defined(__SSE__) #include diff --git a/idlib/math/Simd_SSE.h b/idlib/math/Simd_SSE.h index f505444..906f861 100644 --- a/idlib/math/Simd_SSE.h +++ b/idlib/math/Simd_SSE.h @@ -39,7 +39,7 @@ If you have questions concerning this license or the applicable additional terms class idSIMD_SSE : public idSIMD_MMX { public: -#if defined(MACOS_X) && defined(__i386__) +#if defined(__GNUC__) && defined(__SSE__) virtual const char * VPCALL GetName( void ) const; virtual void VPCALL Dot( float *dst, const idPlane &constant,const idDrawVert *src, const int count ); virtual void VPCALL MinMax( idVec3 &min, idVec3 &max, const idDrawVert *src, const int *indexes, const int count ); diff --git a/idlib/math/Simd_SSE2.cpp b/idlib/math/Simd_SSE2.cpp index 639de48..be77876 100644 --- a/idlib/math/Simd_SSE2.cpp +++ b/idlib/math/Simd_SSE2.cpp @@ -40,9 +40,9 @@ If you have questions concerning this license or the applicable additional terms // SSE2 implementation of idSIMDProcessor // //=============================================================== -#if defined(MACOS_X) && defined(__i386__) +#if defined(__GNUC__) && defined(__SSE2__) -#include +#include #define SHUFFLEPS( x, y, z, w ) (( (x) & 3 ) << 6 | ( (y) & 3 ) << 4 | ( (z) & 3 ) << 2 | ( (w) & 3 )) #define R_SHUFFLEPS( x, y, z, w ) (( (w) & 3 ) << 6 | ( (z) & 3 ) << 4 | ( (y) & 3 ) << 2 | ( (x) & 3 )) diff --git a/idlib/math/Simd_SSE2.h b/idlib/math/Simd_SSE2.h index 81863b8..407f846 100644 --- a/idlib/math/Simd_SSE2.h +++ b/idlib/math/Simd_SSE2.h @@ -39,7 +39,7 @@ If you have questions concerning this license or the applicable additional terms class idSIMD_SSE2 : public idSIMD_SSE { public: -#if defined(MACOS_X) && defined(__i386__) +#if defined(__GNUC__) && defined(__SSE2__) virtual const char * VPCALL GetName( void ) const; virtual void VPCALL CmpLT( byte *dst, const byte bitNum, const float *src0, const float constant, const int count ); diff --git a/idlib/math/Simd_SSE3.cpp b/idlib/math/Simd_SSE3.cpp index 72bc062..e4d0ac8 100644 --- a/idlib/math/Simd_SSE3.cpp +++ b/idlib/math/Simd_SSE3.cpp @@ -42,7 +42,7 @@ If you have questions concerning this license or the applicable additional terms // //=============================================================== -#if defined(MACOS_X) && defined(__i386__) +#if defined(__GNUC__) && defined(__SSE3__) /* ============ diff --git a/idlib/math/Simd_SSE3.h b/idlib/math/Simd_SSE3.h index 83715f3..97183b6 100644 --- a/idlib/math/Simd_SSE3.h +++ b/idlib/math/Simd_SSE3.h @@ -39,7 +39,7 @@ If you have questions concerning this license or the applicable additional terms class idSIMD_SSE3 : public idSIMD_SSE2 { public: -#if defined(MACOS_X) && defined(__i386__) +#if defined(__GNUC__) && defined(__SSE3__) virtual const char * VPCALL GetName( void ) const; #elif defined(_WIN32)