Only use MSVC style asm with MSVC

This commit is contained in:
dhewg 2011-12-13 23:43:27 +01:00
parent 5c3a28e027
commit 88d2dc6f33
9 changed files with 12 additions and 12 deletions

View file

@ -582,7 +582,7 @@ int IntForSixtets( byte *in ) {
void AssertFailed( const char *file, int line, const char *expression ) {
idLib::sys->DebugPrintf( "\n\nASSERTION FAILED!\n%s(%d): '%s'\n", file, line, expression );
#ifdef _WIN32
#ifdef _MSC_VER
__asm int 0x03
#elif defined( __GNUC__ )
__builtin_trap();

View file

@ -384,7 +384,7 @@ ID_INLINE double idMath::Cos64( float a ) {
}
ID_INLINE void idMath::SinCos( float a, float &s, float &c ) {
#ifdef _WIN32
#ifdef _MSC_VER
_asm {
fld a
fsincos
@ -437,7 +437,7 @@ ID_INLINE void idMath::SinCos16( float a, float &s, float &c ) {
}
ID_INLINE void idMath::SinCos64( float a, double &s, double &c ) {
#ifdef _WIN32
#ifdef _MSC_VER
_asm {
fld a
fsincos
@ -795,7 +795,7 @@ ID_INLINE int idMath::Ftoi( float f ) {
}
ID_INLINE int idMath::FtoiFast( float f ) {
#ifdef _WIN32
#ifdef _MSC_VER
int i;
__asm fld f
__asm fistp i // use default rouding mode (round nearest)
@ -827,7 +827,7 @@ ID_INLINE unsigned int idMath::Ftol( float f ) {
}
ID_INLINE unsigned int idMath::FtolFast( float f ) {
#ifdef _WIN32
#ifdef _MSC_VER
// FIXME: this overflows on 31bits still .. same as FtoiFast
unsigned int i;
__asm fld f

View file

@ -141,7 +141,7 @@ idSIMDProcessor *p_simd;
idSIMDProcessor *p_generic;
long baseClocks = 0;
#ifdef _WIN32
#ifdef _MSC_VER
#define TIME_TYPE int

View file

@ -40,7 +40,7 @@ If you have questions concerning this license or the applicable additional terms
//
//===============================================================
#ifdef _WIN32
#ifdef _MSC_VER
/*
============

View file

@ -38,7 +38,7 @@ If you have questions concerning this license or the applicable additional terms
*/
class idSIMD_3DNow : public idSIMD_MMX {
#ifdef _WIN32
#ifdef _MSC_VER
public:
virtual const char * VPCALL GetName( void ) const;

View file

@ -244,7 +244,7 @@ void VPCALL idSIMD_SSE2::CmpLT( byte *dst, const byte bitNum, const float *src0,
}
}
#elif defined(_WIN32)
#elif defined(_MSC_VER)
#include <xmmintrin.h>

View file

@ -43,7 +43,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(_WIN32)
#elif defined(_MSC_VER)
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 );

View file

@ -53,7 +53,7 @@ const char * idSIMD_SSE3::GetName( void ) const {
return "MMX & SSE & SSE2 & SSE3";
}
#elif defined(_WIN32)
#elif defined(_MSC_VER)
#include <xmmintrin.h>

View file

@ -42,7 +42,7 @@ public:
#if defined(__GNUC__) && defined(__SSE3__)
virtual const char * VPCALL GetName( void ) const;
#elif defined(_WIN32)
#elif defined(_MSC_VER)
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 );