diff --git a/pcsx2/x86/ix86/implement/xmm/comparisons.h b/pcsx2/x86/ix86/implement/xmm/comparisons.h index e74d25b1f9..ce6e12702e 100644 --- a/pcsx2/x86/ix86/implement/xmm/comparisons.h +++ b/pcsx2/x86/ix86/implement/xmm/comparisons.h @@ -55,6 +55,22 @@ public: SimdImpl_Compare() {} //GCWhat? }; +////////////////////////////////////////////////////////////////////////////////////////// +// Compare scalar floating point values and set EFLAGS (Ordered or Unordered) +// +template< bool Ordered > +class SimdImpl_COMI +{ +protected: + static const u16 OpcodeSSE = Ordered ? 0x2f : 0x2e; + +public: + const SimdImpl_DestRegSSE<0x00,OpcodeSSE> SS; + const SimdImpl_DestRegSSE<0x66,OpcodeSSE> SD; + + SimdImpl_COMI() {} +}; + ////////////////////////////////////////////////////////////////////////////////////////// // diff --git a/pcsx2/x86/ix86/implement/xmm/moremovs.h b/pcsx2/x86/ix86/implement/xmm/moremovs.h index fa30d4f441..4ea3a5a01d 100644 --- a/pcsx2/x86/ix86/implement/xmm/moremovs.h +++ b/pcsx2/x86/ix86/implement/xmm/moremovs.h @@ -165,18 +165,6 @@ public: } }; - -////////////////////////////////////////////////////////////////////////////////////////// -// -template< u8 AltPrefix, u16 OpcodeSSE > -class SimdImpl_UcomI -{ -public: - const SimdImpl_DestRegSSE<0x00,OpcodeSSE> SS; - const SimdImpl_DestRegSSE SD; - SimdImpl_UcomI() {} -}; - ////////////////////////////////////////////////////////////////////////////////////////// // Blend - Conditional copying of values in src into dest. // diff --git a/pcsx2/x86/ix86/ix86_instructions.h b/pcsx2/x86/ix86/ix86_instructions.h index 889848d4f8..fd12beaa2d 100644 --- a/pcsx2/x86/ix86/ix86_instructions.h +++ b/pcsx2/x86/ix86/ix86_instructions.h @@ -451,16 +451,17 @@ namespace x86Emitter extern const Internal::SimdImpl_DestRegEither<0x66,0xeb> xPOR; extern const Internal::SimdImpl_DestRegEither<0x66,0xef> xPXOR; - extern const Internal::SimdImpl_AndNot xANDN; + extern const Internal::SimdImpl_AndNot xANDN; - extern const Internal::SimdImpl_UcomI<0x66,0x2e> xUCOMI; - extern const Internal::SimdImpl_rSqrt<0x53> xRCP; - extern const Internal::SimdImpl_rSqrt<0x52> xRSQRT; - extern const Internal::SimdImpl_Sqrt<0x51> xSQRT; + extern const Internal::SimdImpl_COMI xCOMI; + extern const Internal::SimdImpl_COMI xUCOMI; + extern const Internal::SimdImpl_rSqrt<0x53> xRCP; + extern const Internal::SimdImpl_rSqrt<0x52> xRSQRT; + extern const Internal::SimdImpl_Sqrt<0x51> xSQRT; - extern const Internal::SimdImpl_MinMax<0x5f> xMAX; - extern const Internal::SimdImpl_MinMax<0x5d> xMIN; - extern const Internal::SimdImpl_Shuffle<0xc6> xSHUF; + extern const Internal::SimdImpl_MinMax<0x5f> xMAX; + extern const Internal::SimdImpl_MinMax<0x5d> xMIN; + extern const Internal::SimdImpl_Shuffle<0xc6> xSHUF; // ------------------------------------------------------------------------ @@ -510,35 +511,35 @@ namespace x86Emitter // ------------------------------------------------------------------------ - extern const Internal::SimdImpl_Shift<0xf0, 6> xPSLL; - extern const Internal::SimdImpl_Shift<0xd0, 2> xPSRL; + extern const Internal::SimdImpl_Shift<0xf0, 6> xPSLL; + extern const Internal::SimdImpl_Shift<0xd0, 2> xPSRL; extern const Internal::SimdImpl_ShiftWithoutQ<0xe0, 4> xPSRA; - extern const Internal::SimdImpl_AddSub<0xdc, 0xd4> xPADD; - extern const Internal::SimdImpl_AddSub<0xd8, 0xfb> xPSUB; - extern const Internal::SimdImpl_PMinMax<0xde,0x3c> xPMAX; - extern const Internal::SimdImpl_PMinMax<0xda,0x38> xPMIN; + extern const Internal::SimdImpl_AddSub<0xdc, 0xd4> xPADD; + extern const Internal::SimdImpl_AddSub<0xd8, 0xfb> xPSUB; + extern const Internal::SimdImpl_PMinMax<0xde,0x3c> xPMAX; + extern const Internal::SimdImpl_PMinMax<0xda,0x38> xPMIN; - extern const Internal::SimdImpl_PMul xPMUL; - extern const Internal::SimdImpl_PCompare xPCMP; - extern const Internal::SimdImpl_PShuffle xPSHUF; - extern const Internal::SimdImpl_PUnpack xPUNPCK; - extern const Internal::SimdImpl_Unpack xUNPCK; - extern const Internal::SimdImpl_Pack xPACK; + extern const Internal::SimdImpl_PMul xPMUL; + extern const Internal::SimdImpl_PCompare xPCMP; + extern const Internal::SimdImpl_PShuffle xPSHUF; + extern const Internal::SimdImpl_PUnpack xPUNPCK; + extern const Internal::SimdImpl_Unpack xUNPCK; + extern const Internal::SimdImpl_Pack xPACK; - extern const Internal::SimdImpl_PAbsolute xPABS; - extern const Internal::SimdImpl_PSign xPSIGN; - extern const Internal::SimdImpl_PInsert xPINSR; - extern const Internal::SimdImpl_PExtract xPEXTR; - extern const Internal::SimdImpl_PMultAdd xPMADD; - extern const Internal::SimdImpl_HorizAdd xHADD; + extern const Internal::SimdImpl_PAbsolute xPABS; + extern const Internal::SimdImpl_PSign xPSIGN; + extern const Internal::SimdImpl_PInsert xPINSR; + extern const Internal::SimdImpl_PExtract xPEXTR; + extern const Internal::SimdImpl_PMultAdd xPMADD; + extern const Internal::SimdImpl_HorizAdd xHADD; - extern const Internal::SimdImpl_Blend xBLEND; - extern const Internal::SimdImpl_DotProduct xDP; - extern const Internal::SimdImpl_Round xROUND; + extern const Internal::SimdImpl_Blend xBLEND; + extern const Internal::SimdImpl_DotProduct xDP; + extern const Internal::SimdImpl_Round xROUND; - extern const Internal::SimdImpl_PMove xPMOVSX; - extern const Internal::SimdImpl_PMove xPMOVZX; + extern const Internal::SimdImpl_PMove xPMOVSX; + extern const Internal::SimdImpl_PMove xPMOVZX; } diff --git a/pcsx2/x86/ix86/ix86_legacy_sse.cpp b/pcsx2/x86/ix86/ix86_legacy_sse.cpp index 169f6ac100..ed1bddcbce 100644 --- a/pcsx2/x86/ix86/ix86_legacy_sse.cpp +++ b/pcsx2/x86/ix86/ix86_legacy_sse.cpp @@ -209,6 +209,7 @@ DEFINE_LEGACY_CMP_OPCODE( NLT ) DEFINE_LEGACY_CMP_OPCODE( NLE ) DEFINE_LEGACY_CMP_OPCODE( ORD ) +DEFINE_LEGACY_SSSD_OPCODE( COMI ) DEFINE_LEGACY_SSSD_OPCODE( UCOMI ) DEFINE_LEGACY_RSQRT_OPCODE( RCP ) DEFINE_LEGACY_RSQRT_OPCODE( RSQRT ) diff --git a/pcsx2/x86/ix86/ix86_simd.cpp b/pcsx2/x86/ix86/ix86_simd.cpp index 860e8ffc0a..2c1c18f469 100644 --- a/pcsx2/x86/ix86/ix86_simd.cpp +++ b/pcsx2/x86/ix86/ix86_simd.cpp @@ -90,27 +90,27 @@ const SimdImpl_MoveSSE<0x66,true> xMOVAPD; const SimdImpl_MoveSSE<0x66,false> xMOVUPD; #endif -const MovhlImplAll<0x16> xMOVH; -const MovhlImplAll<0x12> xMOVL; -const MovhlImpl_RtoR<0x16> xMOVLH; -const MovhlImpl_RtoR<0x12> xMOVHL; +const MovhlImplAll<0x16> xMOVH; +const MovhlImplAll<0x12> xMOVL; +const MovhlImpl_RtoR<0x16> xMOVLH; +const MovhlImpl_RtoR<0x12> xMOVHL; + +const SimdImpl_AndNot xANDN; +const SimdImpl_COMI xCOMI; +const SimdImpl_COMI xUCOMI; +const SimdImpl_rSqrt<0x53> xRCP; +const SimdImpl_rSqrt<0x52> xRSQRT; +const SimdImpl_Sqrt<0x51> xSQRT; + +const SimdImpl_MinMax<0x5f> xMAX; +const SimdImpl_MinMax<0x5d> xMIN; +const SimdImpl_Shuffle<0xc6> xSHUF; const SimdImpl_DestRegEither<0x66,0xdb> xPAND; const SimdImpl_DestRegEither<0x66,0xdf> xPANDN; const SimdImpl_DestRegEither<0x66,0xeb> xPOR; const SimdImpl_DestRegEither<0x66,0xef> xPXOR; -const SimdImpl_AndNot xANDN; - -const SimdImpl_UcomI<0x66,0x2e> xUCOMI; -const SimdImpl_rSqrt<0x53> xRCP; -const SimdImpl_rSqrt<0x52> xRSQRT; -const SimdImpl_Sqrt<0x51> xSQRT; - -const SimdImpl_MinMax<0x5f> xMAX; -const SimdImpl_MinMax<0x5d> xMIN; -const SimdImpl_Shuffle<0xc6> xSHUF; - // ------------------------------------------------------------------------ // [SSE-4.1] Performs a bitwise AND of dest against src, and sets the ZF flag