diff --git a/idlib/math/Math.h b/idlib/math/Math.h index 4aa22c6..22f7f5d 100644 --- a/idlib/math/Math.h +++ b/idlib/math/Math.h @@ -385,7 +385,7 @@ ID_INLINE double idMath::Cos64( float a ) { } ID_INLINE void idMath::SinCos( float a, float &s, float &c ) { -#ifdef _MSC_VER +#if defined(_MSC_VER) && defined(_M_IX86) _asm { fld a fsincos @@ -438,7 +438,7 @@ ID_INLINE void idMath::SinCos16( float a, float &s, float &c ) { } ID_INLINE void idMath::SinCos64( float a, double &s, double &c ) { -#ifdef _MSC_VER +#if defined(_MSC_VER) && defined(_M_IX86) _asm { fld a fsincos @@ -796,7 +796,7 @@ ID_INLINE int idMath::Ftoi( float f ) { } ID_INLINE int idMath::FtoiFast( float f ) { -#ifdef _MSC_VER +#if defined(_MSC_VER) && defined(_M_IX86) int i; __asm fld f __asm fistp i // use default rouding mode (round nearest) @@ -828,7 +828,7 @@ ID_INLINE unsigned int idMath::Ftol( float f ) { } ID_INLINE unsigned int idMath::FtolFast( float f ) { -#ifdef _MSC_VER +#if defined(_MSC_VER) && defined(_M_IX86) // FIXME: this overflows on 31bits still .. same as FtoiFast unsigned int i; __asm fld f diff --git a/idlib/math/Simd.cpp b/idlib/math/Simd.cpp index e515634..8caf5b2 100644 --- a/idlib/math/Simd.cpp +++ b/idlib/math/Simd.cpp @@ -149,7 +149,7 @@ idSIMDProcessor *p_simd; idSIMDProcessor *p_generic; int baseClocks = 0; -#ifdef _MSC_VER +#if defined(_MSC_VER) && defined(_M_IX86) #define TIME_TYPE int diff --git a/idlib/math/Simd_3DNow.cpp b/idlib/math/Simd_3DNow.cpp index 194a491..cbe3e4f 100644 --- a/idlib/math/Simd_3DNow.cpp +++ b/idlib/math/Simd_3DNow.cpp @@ -36,7 +36,7 @@ If you have questions concerning this license or the applicable additional terms // //=============================================================== -#ifdef _MSC_VER +#if defined(_MSC_VER) && defined(_M_IX86) /* ============ diff --git a/idlib/math/Simd_3DNow.h b/idlib/math/Simd_3DNow.h index 73708fc..4cc53bc 100644 --- a/idlib/math/Simd_3DNow.h +++ b/idlib/math/Simd_3DNow.h @@ -40,7 +40,7 @@ If you have questions concerning this license or the applicable additional terms */ class idSIMD_3DNow : public idSIMD_MMX { -#ifdef _MSC_VER +#if defined(_MSC_VER) && defined(_M_IX86) public: virtual const char * VPCALL GetName( void ) const; diff --git a/idlib/math/Simd_MMX.cpp b/idlib/math/Simd_MMX.cpp index 806bb18..3251f5f 100644 --- a/idlib/math/Simd_MMX.cpp +++ b/idlib/math/Simd_MMX.cpp @@ -46,7 +46,7 @@ const char * idSIMD_MMX::GetName( void ) const { return "MMX"; } -#elif defined(_WIN32) +#elif defined(_MSC_VER) && defined(_M_IX86) #define EMMS_INSTRUCTION __asm emms @@ -361,4 +361,4 @@ loop2: } } -#endif /* _WIN32 */ +#endif /* _MSC_VER */ diff --git a/idlib/math/Simd_MMX.h b/idlib/math/Simd_MMX.h index 115e6cc..c594c95 100644 --- a/idlib/math/Simd_MMX.h +++ b/idlib/math/Simd_MMX.h @@ -44,7 +44,7 @@ public: #if defined(__GNUC__) && defined(__MMX__) virtual const char * VPCALL GetName( void ) const; -#elif defined(_WIN32) +#elif defined(_MSC_VER) && defined(_M_IX86) virtual const char * VPCALL GetName( void ) const; virtual void VPCALL Memcpy( void *dst, const void *src, const int count ); diff --git a/idlib/math/Simd_SSE.cpp b/idlib/math/Simd_SSE.cpp index dba3ac4..49b3252 100644 --- a/idlib/math/Simd_SSE.cpp +++ b/idlib/math/Simd_SSE.cpp @@ -617,7 +617,7 @@ void VPCALL idSIMD_SSE::Dot( float *dst, const idVec3 &constant, const idPlane * */ } -#elif defined(_WIN32) +#elif defined(_MSC_VER) && defined(_M_IX86) #include @@ -18081,4 +18081,4 @@ void VPCALL idSIMD_SSE::MixedSoundToSamples( short *samples, const float *mixBuf #endif } -#endif /* _WIN32 */ +#endif /* _MSC_VER */ diff --git a/idlib/math/Simd_SSE.h b/idlib/math/Simd_SSE.h index 752894d..3c66a55 100644 --- a/idlib/math/Simd_SSE.h +++ b/idlib/math/Simd_SSE.h @@ -50,7 +50,7 @@ public: virtual void VPCALL MinMax( idVec3 &min, idVec3 &max, const idDrawVert *src, const int *indexes, const int count ); virtual void VPCALL Dot( float *dst, const idVec3 &constant, const idPlane *src, const int count ); -#elif defined(_WIN32) +#elif defined(_MSC_VER) && defined(_M_IX86) virtual const char * VPCALL GetName( void ) const; virtual void VPCALL Add( float *dst, const float constant, const float *src, const int count ); diff --git a/idlib/math/Simd_SSE2.cpp b/idlib/math/Simd_SSE2.cpp index 1a4b4a9..1954913 100644 --- a/idlib/math/Simd_SSE2.cpp +++ b/idlib/math/Simd_SSE2.cpp @@ -239,7 +239,7 @@ void VPCALL idSIMD_SSE2::CmpLT( byte *dst, const byte bitNum, const float *src0, } } -#elif defined(_MSC_VER) +#elif defined(_MSC_VER) && defined(_M_IX86) #include diff --git a/idlib/math/Simd_SSE2.h b/idlib/math/Simd_SSE2.h index ed880d3..6a149c9 100644 --- a/idlib/math/Simd_SSE2.h +++ b/idlib/math/Simd_SSE2.h @@ -47,7 +47,7 @@ public: 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 ); -#elif defined(_MSC_VER) +#elif defined(_MSC_VER) && defined(_M_IX86) virtual const char * VPCALL GetName( void ) const; //virtual void VPCALL MatX_LowerTriangularSolve( const idMatX &L, float *x, const float *b, const int n, int skip = 0 ); diff --git a/idlib/math/Simd_SSE3.cpp b/idlib/math/Simd_SSE3.cpp index 8ea6d5d..b177a65 100644 --- a/idlib/math/Simd_SSE3.cpp +++ b/idlib/math/Simd_SSE3.cpp @@ -47,7 +47,7 @@ const char * idSIMD_SSE3::GetName( void ) const { return "MMX & SSE & SSE2 & SSE3"; } -#elif defined(_MSC_VER) +#elif defined(_MSC_VER) && defined(_M_IX86) #include diff --git a/idlib/math/Simd_SSE3.h b/idlib/math/Simd_SSE3.h index 623574d..c3d87da 100644 --- a/idlib/math/Simd_SSE3.h +++ b/idlib/math/Simd_SSE3.h @@ -44,7 +44,7 @@ public: #if defined(__GNUC__) && defined(__SSE3__) virtual const char * VPCALL GetName( void ) const; -#elif defined(_MSC_VER) +#elif defined(_MSC_VER) && defined(_M_IX86) virtual const char * VPCALL GetName( void ) const; virtual void VPCALL TransformVerts( idDrawVert *verts, const int numVerts, const idJointMat *joints, const idVec4 *weights, const int *index, const int numWeights );