Linux: Fix some GCC compilation errors. And update the msvc project (somehow didn't get committed last night, but only change header files so prolly didn't break anything).

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@1037 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
Jake.Stine 2009-04-21 13:54:41 +00:00
parent deb642af43
commit 2dcee32079
5 changed files with 43 additions and 31 deletions

View File

@ -3024,7 +3024,23 @@
Name="xmm"
>
<File
RelativePath="..\..\x86\ix86\implement\xmm\movqss.h"
RelativePath="..\..\x86\ix86\implement\xmm\arithmetic.h"
>
</File>
<File
RelativePath="..\..\x86\ix86\implement\xmm\basehelpers.h"
>
</File>
<File
RelativePath="..\..\x86\ix86\implement\xmm\comparisons.h"
>
</File>
<File
RelativePath="..\..\x86\ix86\implement\xmm\moremovs.h"
>
</File>
<File
RelativePath="..\..\x86\ix86\implement\xmm\shufflepack.h"
>
</File>
</Filter>

View File

@ -109,14 +109,10 @@ public:
__noinline void operator()( const ModSibBase& bitbase, const xRegister32& bitoffset ) const { m_32::Emit( bitbase, bitoffset ); }
__noinline void operator()( const ModSibBase& bitbase, const xRegister16& bitoffset ) const { m_16::Emit( bitbase, bitoffset ); }
// Note on Imm forms : use int as the source operand since it's "reasonably inert" from a compiler
// perspective. (using uint tends to make the compiler try and fail to match signed immediates with
// one of the other overloads).
__noinline void operator()( const ModSibStrict<u32>& bitbase, u8 immoffset ) const { m_32::Emit( bitbase, immoffset ); }
__noinline void operator()( const ModSibStrict<u16>& bitbase, u8 immoffset ) const { m_16::Emit( bitbase, immoffset ); }
void operator()( const xRegister<u32>& bitbase, u8 immoffset ) const { m_32::Emit( bitbase, immoffset ); }
void operator()( const xRegister<u16>& bitbase, u8 immoffset ) const { m_16::Emit( bitbase, immoffset ); }
__noinline void operator()( const ModSibStrict<u32>& bitbase, u8 bitoffset ) const { m_32::Emit( bitbase, bitoffset ); }
__noinline void operator()( const ModSibStrict<u16>& bitbase, u8 bitoffset ) const { m_16::Emit( bitbase, bitoffset ); }
void operator()( const xRegister<u32>& bitbase, u8 bitoffset ) const { m_32::Emit( bitbase, bitoffset ); }
void operator()( const xRegister<u16>& bitbase, u8 bitoffset ) const { m_16::Emit( bitbase, bitoffset ); }
Group8ImplAll() {}
};

View File

@ -54,13 +54,13 @@ public:
}
// ------------------------------------------------------------------------
static __emitinline void Emit( const xRegister<ImmType>& to, const xRegister<ImmType>& from, u8 imm )
static __emitinline void Emit( const xRegister<ImmType>& to, const xRegister<ImmType>& from, u8 shiftcnt )
{
if( imm == 0 ) return;
if( shiftcnt == 0 ) return;
prefix16();
write16( 0xa40f | (isShiftRight ? 0x800 : 0) );
ModRM_Direct( from.Id, to.Id );
write8( imm );
write8( shiftcnt );
}
// ------------------------------------------------------------------------
@ -71,11 +71,11 @@ public:
}
// ------------------------------------------------------------------------
static __emitinline void Emit( const ModSibBase& sibdest, const xRegister<ImmType>& from, u8 imm )
static __emitinline void Emit( const ModSibBase& sibdest, const xRegister<ImmType>& from, u8 shiftcnt )
{
basesibform();
EmitSibMagic( from.Id, sibdest );
write8( imm );
write8( shiftcnt );
}
// ------------------------------------------------------------------------
@ -88,11 +88,11 @@ public:
// ------------------------------------------------------------------------
// dest data type is inferred from the 'from' register, so we can do void* resolution :)
static __emitinline void Emit( void* dest, const xRegister<ImmType>& from, u8 imm )
static __emitinline void Emit( void* dest, const xRegister<ImmType>& from, u8 shiftcnt )
{
basesibform();
xWriteDisp( from.Id, dest );
write8( imm );
write8( shiftcnt );
}
};
@ -113,17 +113,17 @@ public:
__forceinline void operator()( const xRegister32& to, const xRegister32& from, __unused const xRegisterCL& clreg ) const { m_32::Emit( to, from ); }
__forceinline void operator()( void* dest, const xRegister32& from, __unused const xRegisterCL& clreg ) const { m_32::Emit( dest, from ); }
__noinline void operator()( const ModSibBase& sibdest, const xRegister32& from, __unused const xRegisterCL& clreg ) const { m_32::Emit( sibdest, from ); }
__forceinline void operator()( const xRegister32& to, const xRegister32& from, u8 imm ) const { m_32::Emit( to, from, imm ); }
__forceinline void operator()( void* dest, const xRegister32& from, u8 imm ) const { m_32::Emit( dest, from, imm ); }
__noinline void operator()( const ModSibBase& sibdest, const xRegister32& from, u8 imm ) const { m_32::Emit( sibdest, from ); }
__forceinline void operator()( const xRegister32& to, const xRegister32& from, u8 shiftcnt ) const { m_32::Emit( to, from, shiftcnt ); }
__forceinline void operator()( void* dest, const xRegister32& from, u8 shiftcnt ) const { m_32::Emit( dest, from, shiftcnt ); }
__noinline void operator()( const ModSibBase& sibdest, const xRegister32& from, u8 shiftcnt ) const { m_32::Emit( sibdest, shiftcnt ); }
// ---------- 16 Bit Interface -----------
__forceinline void operator()( const xRegister16& to, const xRegister16& from, __unused const xRegisterCL& clreg ) const { m_16::Emit( to, from ); }
__forceinline void operator()( void* dest, const xRegister16& from, __unused const xRegisterCL& clreg ) const { m_16::Emit( dest, from ); }
__noinline void operator()( const ModSibBase& sibdest, const xRegister16& from, __unused const xRegisterCL& clreg ) const { m_16::Emit( sibdest, from ); }
__forceinline void operator()( const xRegister16& to, const xRegister16& from, u8 imm ) const { m_16::Emit( to, from, imm ); }
__forceinline void operator()( void* dest, const xRegister16& from, u8 imm ) const { m_16::Emit( dest, from, imm ); }
__noinline void operator()( const ModSibBase& sibdest, const xRegister16& from, u8 imm ) const { m_16::Emit( sibdest, from ); }
__forceinline void operator()( const xRegister16& to, const xRegister16& from, u8 shiftcnt ) const { m_16::Emit( to, from, shiftcnt ); }
__forceinline void operator()( void* dest, const xRegister16& from, u8 shiftcnt ) const { m_16::Emit( dest, from, shiftcnt ); }
__noinline void operator()( const ModSibBase& sibdest, const xRegister16& from, u8 shiftcnt ) const { m_16::Emit( sibdest, shiftcnt ); }
DwordShiftImplAll() {} // Why does GCC need these?
};

View File

@ -25,7 +25,7 @@ template< u16 OpcodeBase1, u8 Modcode >
class SimdImpl_ShiftWithoutQ
{
protected:
template< u16 Opcode1, u16 OpcodeImm, u8 Modcode >
template< u16 Opcode1, u16 OpcodeImm >
class ShiftHelper
{
public:
@ -50,17 +50,17 @@ protected:
}
template< typename OperandType >
__emitinline void operator()( const xRegisterSIMD<OperandType>& to, u8 imm ) const
__emitinline void operator()( const xRegisterSIMD<OperandType>& to, u8 imm8 ) const
{
SimdPrefix( (sizeof( OperandType ) == 16) ? 0x66 : 0, OpcodeImm );
ModRM( 3, (int)Modcode, to.Id );
xWrite<u8>( imm );
xWrite<u8>( imm8 );
}
};
public:
const ShiftHelper<OpcodeBase1+1,0x71,Modcode> W;
const ShiftHelper<OpcodeBase1+2,0x72,Modcode> D;
const ShiftHelper<OpcodeBase1+1,0x71> W;
const ShiftHelper<OpcodeBase1+2,0x72> D;
SimdImpl_ShiftWithoutQ() {}
};
@ -72,7 +72,7 @@ template< u16 OpcodeBase1, u8 Modcode >
class SimdImpl_Shift : public SimdImpl_ShiftWithoutQ<OpcodeBase1, Modcode>
{
public:
const ShiftHelper<OpcodeBase1+3,0x73,Modcode> Q;
const ShiftHelper<OpcodeBase1+3,0x73> Q;
void DQ( const xRegisterSSE& to, u8 imm ) const
{

View File

@ -251,19 +251,19 @@ protected:
__forceinline void operator()( const xRegister32& to, const xRegisterSSE& from, u8 imm8 ) const
{
writeXMMop( 0x66, (Opcode<<8) | 0x3a, to, from );
xWrite<u8>( imm );
xWrite<u8>( imm8 );
}
__forceinline void operator()( void* dest, const xRegisterSSE& from, u8 imm8 ) const
{
writeXMMop( 0x66, (Opcode<<8) | 0x3a, to, from );
xWrite<u8>( imm );
xWrite<u8>( imm8 );
}
__noinline void operator()( const ModSibBase& dest, const xRegisterSSE& from, u8 imm8 ) const
{
writeXMMop( 0x66, (Opcode<<8) | 0x3a, to, from );
xWrite<u8>( imm );
xWrite<u8>( imm8 );
}
};