diff --git a/pcsx2/windows/VCprojects/pcsx2_2008.vcproj b/pcsx2/windows/VCprojects/pcsx2_2008.vcproj index 380a14991c..0167672b41 100644 --- a/pcsx2/windows/VCprojects/pcsx2_2008.vcproj +++ b/pcsx2/windows/VCprojects/pcsx2_2008.vcproj @@ -3024,7 +3024,23 @@ Name="xmm" > + + + + + + + + diff --git a/pcsx2/x86/ix86/implement/bittest.h b/pcsx2/x86/ix86/implement/bittest.h index 5ad091667d..7fcdfb5027 100644 --- a/pcsx2/x86/ix86/implement/bittest.h +++ b/pcsx2/x86/ix86/implement/bittest.h @@ -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& bitbase, u8 immoffset ) const { m_32::Emit( bitbase, immoffset ); } - __noinline void operator()( const ModSibStrict& bitbase, u8 immoffset ) const { m_16::Emit( bitbase, immoffset ); } - void operator()( const xRegister& bitbase, u8 immoffset ) const { m_32::Emit( bitbase, immoffset ); } - void operator()( const xRegister& bitbase, u8 immoffset ) const { m_16::Emit( bitbase, immoffset ); } + __noinline void operator()( const ModSibStrict& bitbase, u8 bitoffset ) const { m_32::Emit( bitbase, bitoffset ); } + __noinline void operator()( const ModSibStrict& bitbase, u8 bitoffset ) const { m_16::Emit( bitbase, bitoffset ); } + void operator()( const xRegister& bitbase, u8 bitoffset ) const { m_32::Emit( bitbase, bitoffset ); } + void operator()( const xRegister& bitbase, u8 bitoffset ) const { m_16::Emit( bitbase, bitoffset ); } Group8ImplAll() {} }; diff --git a/pcsx2/x86/ix86/implement/dwshift.h b/pcsx2/x86/ix86/implement/dwshift.h index 390577ae20..261f1d3ed8 100644 --- a/pcsx2/x86/ix86/implement/dwshift.h +++ b/pcsx2/x86/ix86/implement/dwshift.h @@ -54,13 +54,13 @@ public: } // ------------------------------------------------------------------------ - static __emitinline void Emit( const xRegister& to, const xRegister& from, u8 imm ) + static __emitinline void Emit( const xRegister& to, const xRegister& 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& from, u8 imm ) + static __emitinline void Emit( const ModSibBase& sibdest, const xRegister& 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& from, u8 imm ) + static __emitinline void Emit( void* dest, const xRegister& 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? }; diff --git a/pcsx2/x86/ix86/implement/xmm/arithmetic.h b/pcsx2/x86/ix86/implement/xmm/arithmetic.h index 6ac3f91877..54ecb0c095 100644 --- a/pcsx2/x86/ix86/implement/xmm/arithmetic.h +++ b/pcsx2/x86/ix86/implement/xmm/arithmetic.h @@ -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& to, u8 imm ) const + __emitinline void operator()( const xRegisterSIMD& to, u8 imm8 ) const { SimdPrefix( (sizeof( OperandType ) == 16) ? 0x66 : 0, OpcodeImm ); ModRM( 3, (int)Modcode, to.Id ); - xWrite( imm ); + xWrite( imm8 ); } }; public: - const ShiftHelper W; - const ShiftHelper D; + const ShiftHelper W; + const ShiftHelper D; SimdImpl_ShiftWithoutQ() {} }; @@ -72,7 +72,7 @@ template< u16 OpcodeBase1, u8 Modcode > class SimdImpl_Shift : public SimdImpl_ShiftWithoutQ { public: - const ShiftHelper Q; + const ShiftHelper Q; void DQ( const xRegisterSSE& to, u8 imm ) const { diff --git a/pcsx2/x86/ix86/implement/xmm/shufflepack.h b/pcsx2/x86/ix86/implement/xmm/shufflepack.h index 93a96569c6..baf110c845 100644 --- a/pcsx2/x86/ix86/implement/xmm/shufflepack.h +++ b/pcsx2/x86/ix86/implement/xmm/shufflepack.h @@ -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( imm ); + xWrite( imm8 ); } __forceinline void operator()( void* dest, const xRegisterSSE& from, u8 imm8 ) const { writeXMMop( 0x66, (Opcode<<8) | 0x3a, to, from ); - xWrite( imm ); + xWrite( imm8 ); } __noinline void operator()( const ModSibBase& dest, const xRegisterSSE& from, u8 imm8 ) const { writeXMMop( 0x66, (Opcode<<8) | 0x3a, to, from ); - xWrite( imm ); + xWrite( imm8 ); } };