Linux: We don't need no stinkin' muldefs! (fyi, turns out the solution was to use the "inline" keyword on class member prototype definitions, yes that simple -_-)

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@1955 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
Jake.Stine 2009-10-04 20:28:08 +00:00
parent 291be6bc60
commit 4f6d7ca776
7 changed files with 81 additions and 85 deletions

View File

@ -44,8 +44,8 @@
#if defined(PCSX2_DEBUG) #if defined(PCSX2_DEBUG)
# define pxAssertMsg(cond, msg) ( ((!!(cond)) || \ # define pxAssertMsg(cond, msg) ( (!!(cond)) || \
(pxOnAssert(__TFILE__, __LINE__, __WXFUNCTION__, _T(#cond), msg), 0)), !!(cond) ) (pxOnAssert(__TFILE__, __LINE__, __WXFUNCTION__, _T(#cond), msg), !!(cond)) )
# define pxAssertDev(cond,msg) pxAssertMsg(cond, msg) # define pxAssertDev(cond,msg) pxAssertMsg(cond, msg)
@ -59,8 +59,8 @@
# define pxAssertMsg(cond, msg) (!!(cond)) # define pxAssertMsg(cond, msg) (!!(cond))
# define pxAssertDev(cond, msg) ( ((!!(cond)) || \ # define pxAssertDev(cond, msg) ( (!!(cond)) || \
(pxOnAssert(__TFILE__, __LINE__, __WXFUNCTION__, _T(#cond), msg), 0)), !!(cond) ) (pxOnAssert(__TFILE__, __LINE__, __WXFUNCTION__, _T(#cond), msg), !!(cond)) )
# define pxFail(msg) __assume(false) # define pxFail(msg) __assume(false)
# define pxFailDev(msg ) pxAssertDev(false, msg) # define pxFailDev(msg ) pxAssertDev(false, msg)

View File

@ -214,26 +214,26 @@ __forceinline void xWrite( T val )
static const xAddressReg Empty; // defined as an empty/unused value (-1) static const xAddressReg Empty; // defined as an empty/unused value (-1)
public: public:
xAddressReg(): xRegister32() {} inline xAddressReg(): xRegister32() {}
xAddressReg( const xAddressReg& src ) : xRegister32( src.Id ) {} inline xAddressReg( const xAddressReg& src ) : xRegister32( src.Id ) {}
xAddressReg( const xRegister32& src ) : xRegister32( src ) {} inline xAddressReg( const xRegister32& src ) : xRegister32( src ) {}
explicit xAddressReg( int regId ) : xRegister32( regId ) {} explicit inline xAddressReg( int regId ) : xRegister32( regId ) {}
// Returns true if the register is the stack pointer: ESP. // Returns true if the register is the stack pointer: ESP.
bool IsStackPointer() const { return Id == 4; } bool IsStackPointer() const { return Id == 4; }
xAddressInfo operator+( const xAddressReg& right ) const; inline xAddressInfo operator+( const xAddressReg& right ) const;
xAddressInfo operator+( const xAddressInfo& right ) const; inline xAddressInfo operator+( const xAddressInfo& right ) const;
xAddressInfo operator+( s32 right ) const; inline xAddressInfo operator+( s32 right ) const;
xAddressInfo operator+( const void* right ) const; inline xAddressInfo operator+( const void* right ) const;
xAddressInfo operator-( s32 right ) const; inline xAddressInfo operator-( s32 right ) const;
xAddressInfo operator-( const void* right ) const; inline xAddressInfo operator-( const void* right ) const;
xAddressInfo operator*( u32 factor ) const; inline xAddressInfo operator*( u32 factor ) const;
xAddressInfo operator<<( u32 shift ) const; inline xAddressInfo operator<<( u32 shift ) const;
xAddressReg& operator=( const xRegister32& src ) inline xAddressReg& operator=( const xRegister32& src )
{ {
Id = src.Id; Id = src.Id;
return *this; return *this;
@ -286,8 +286,8 @@ __forceinline void xWrite( T val )
return *this; return *this;
} }
__forceinline xAddressInfo& Add( const xAddressReg& src ); inline xAddressInfo& Add( const xAddressReg& src );
__forceinline xAddressInfo& Add( const xAddressInfo& src ); inline xAddressInfo& Add( const xAddressInfo& src );
__forceinline xAddressInfo operator+( const xAddressReg& right ) const { return xAddressInfo( *this ).Add( right ); } __forceinline xAddressInfo operator+( const xAddressReg& right ) const { return xAddressInfo( *this ).Add( right ); }
__forceinline xAddressInfo operator+( const xAddressInfo& right ) const { return xAddressInfo( *this ).Add( right ); } __forceinline xAddressInfo operator+( const xAddressInfo& right ) const { return xAddressInfo( *this ).Add( right ); }
@ -366,21 +366,21 @@ __forceinline void xWrite( T val )
s32 Displacement; // offset applied to the Base/Index registers. s32 Displacement; // offset applied to the Base/Index registers.
public: public:
explicit ModSibBase( const xAddressInfo& src ); explicit inline ModSibBase( const xAddressInfo& src );
explicit ModSibBase( s32 disp ); explicit inline ModSibBase( s32 disp );
ModSibBase( xAddressReg base, xAddressReg index, int scale=0, s32 displacement=0 ); inline ModSibBase( xAddressReg base, xAddressReg index, int scale=0, s32 displacement=0 );
ModSibBase( const void* target ); inline ModSibBase( const void* target );
bool IsByteSizeDisp() const { return is_s8( Displacement ); } inline bool IsByteSizeDisp() const { return is_s8( Displacement ); }
__forceinline ModSibBase& Add( s32 imm ) inline ModSibBase& Add( s32 imm )
{ {
Displacement += imm; Displacement += imm;
return *this; return *this;
} }
__forceinline ModSibBase operator+( const s32 imm ) const { return ModSibBase( *this ).Add( imm ); } __forceinline inline ModSibBase operator+( const s32 imm ) const { return ModSibBase( *this ).Add( imm ); }
__forceinline ModSibBase operator-( const s32 imm ) const { return ModSibBase( *this ).Add( -imm ); } __forceinline inline ModSibBase operator-( const s32 imm ) const { return ModSibBase( *this ).Add( -imm ); }
protected: protected:
void Reduce(); void Reduce();
@ -683,12 +683,12 @@ __forceinline void xWrite( T val )
// The jump instruction is emitted at the point of object construction. The conditional // The jump instruction is emitted at the point of object construction. The conditional
// type must be valid (Jcc_Unknown generates an assertion). // type must be valid (Jcc_Unknown generates an assertion).
xForwardJump( JccComparisonType cctype = Jcc_Unconditional ); inline xForwardJump( JccComparisonType cctype = Jcc_Unconditional );
// Sets the jump target by writing back the current x86Ptr to the jump instruction. // Sets the jump target by writing back the current x86Ptr to the jump instruction.
// This method can be called multiple times, re-writing the jump instruction's target // This method can be called multiple times, re-writing the jump instruction's target
// in each case. (the the last call is the one that takes effect). // in each case. (the the last call is the one that takes effect).
void SetTarget() const; inline void SetTarget() const;
}; };
////////////////////////////////////////////////////////////////////////////////////////// //////////////////////////////////////////////////////////////////////////////////////////

View File

@ -19,6 +19,9 @@
#include <time.h> #include <time.h>
#include <sys/time.h> #include <sys/time.h>
extern "C" PCSX2_ALIGNED16( u8 _xmm_backup[16*2] ) = {0};
extern "C" PCSX2_ALIGNED16( u8 _mmx_backup[8*4] ) = {0};
void InitCPUTicks() void InitCPUTicks()
{ {
} }

View File

@ -107,9 +107,6 @@
<Add directory="$(ProjectRootDir)/gui" /> <Add directory="$(ProjectRootDir)/gui" />
<Add directory="$(ProjectRootDir)/x86" /> <Add directory="$(ProjectRootDir)/x86" />
</Compiler> </Compiler>
<Linker>
<Add option="-Xlinker -zmuldefs" />
</Linker>
<Unit filename="../../common/include/PS2Edefs.h" /> <Unit filename="../../common/include/PS2Edefs.h" />
<Unit filename="../../common/include/PS2Etypes.h" /> <Unit filename="../../common/include/PS2Etypes.h" />
<Unit filename="../../common/include/Pcsx2Api.h" /> <Unit filename="../../common/include/Pcsx2Api.h" />
@ -118,7 +115,6 @@
<Unit filename="../../common/include/PluginCallbacks.h" /> <Unit filename="../../common/include/PluginCallbacks.h" />
<Unit filename="../../common/include/wx/folderdesc.txt" /> <Unit filename="../../common/include/wx/folderdesc.txt" />
<Unit filename="../../common/include/wx/scopedarray.h" /> <Unit filename="../../common/include/wx/scopedarray.h" />
<Unit filename="../../common/include/wx/scopedptr.h" />
<Unit filename="../CDVD/CDVD.cpp" /> <Unit filename="../CDVD/CDVD.cpp" />
<Unit filename="../CDVD/CDVD.h" /> <Unit filename="../CDVD/CDVD.h" />
<Unit filename="../CDVD/CDVD_internal.h" /> <Unit filename="../CDVD/CDVD_internal.h" />

View File

@ -35,9 +35,6 @@ extern "C"
#ifdef __LINUX__ #ifdef __LINUX__
PCSX2_ALIGNED16( u8 _xmm_backup[16*2] );
PCSX2_ALIGNED16( u8 _mmx_backup[8*4] );
extern "C" extern "C"
{ {
// aVUzerorec.S // aVUzerorec.S