diff --git a/pcsx2/x86/iMMI.cpp b/pcsx2/x86/iMMI.cpp index 09d1ff743b..077a119d40 100644 --- a/pcsx2/x86/iMMI.cpp +++ b/pcsx2/x86/iMMI.cpp @@ -742,15 +742,6 @@ CPU_SSE2_XMMCACHE_START(XMMINFO_READT|XMMINFO_WRITED) int t0reg = _allocTempXMMreg(XMMT_INT, -1); int t1reg = _allocTempXMMreg(XMMT_INT, -1); - SSEX_MOVDQA_XMM_to_XMM(EEREC_D, EEREC_T); // for bit 0..4 - SSEX_MOVDQA_XMM_to_XMM(t0reg, EEREC_T); // for bit 10..14 - - SSE2_PSLLD_I8_to_XMM(EEREC_D, 27); - SSE2_PSLLD_I8_to_XMM(t0reg, 17); - SSE2_PSRLD_I8_to_XMM(EEREC_D, 27); - SSE2_PSRLW_I8_to_XMM(t0reg, 11); - SSE2_POR_XMM_to_XMM(EEREC_D, t0reg); - SSEX_MOVDQA_XMM_to_XMM(t0reg, EEREC_T); // for bit 5..9 SSEX_MOVDQA_XMM_to_XMM(t1reg, EEREC_T); // for bit 15 @@ -760,6 +751,15 @@ CPU_SSE2_XMMCACHE_START(XMMINFO_READT|XMMINFO_WRITED) SSE2_PSLLD_I8_to_XMM(t1reg, 20); SSE2_POR_XMM_to_XMM(t0reg, t1reg); + SSEX_MOVDQA_XMM_to_XMM(t1reg, EEREC_T); // for bit 10..14 + SSEX_MOVDQA_XMM_to_XMM(EEREC_D, EEREC_T); // for bit 0..4 + + SSE2_PSLLD_I8_to_XMM(EEREC_D, 27); + SSE2_PSLLD_I8_to_XMM(t1reg, 17); + SSE2_PSRLD_I8_to_XMM(EEREC_D, 27); + SSE2_PSRLW_I8_to_XMM(t1reg, 11); + SSE2_POR_XMM_to_XMM(EEREC_D, t1reg); + SSE2_PSLLW_I8_to_XMM(EEREC_D, 3); SSE2_PSLLW_I8_to_XMM(t0reg, 11); SSE2_POR_XMM_to_XMM(EEREC_D, t0reg); @@ -780,15 +780,6 @@ CPU_SSE2_XMMCACHE_START(XMMINFO_READT|XMMINFO_WRITED) int t0reg = _allocTempXMMreg(XMMT_INT, -1); int t1reg = _allocTempXMMreg(XMMT_INT, -1); - SSEX_MOVDQA_XMM_to_XMM(EEREC_D, EEREC_T); // for bit 0..4 - SSEX_MOVDQA_XMM_to_XMM(t0reg, EEREC_T); // for bit 5..9 - - SSE2_PSLLD_I8_to_XMM(EEREC_D, 24); - SSE2_PSRLD_I8_to_XMM(t0reg, 11); - SSE2_PSRLD_I8_to_XMM(EEREC_D, 27); - SSE2_PSLLD_I8_to_XMM(t0reg, 5); - SSE2_POR_XMM_to_XMM(EEREC_D, t0reg); - SSEX_MOVDQA_XMM_to_XMM(t0reg, EEREC_T); // for bit 10..14 SSEX_MOVDQA_XMM_to_XMM(t1reg, EEREC_T); // for bit 15 @@ -798,6 +789,15 @@ CPU_SSE2_XMMCACHE_START(XMMINFO_READT|XMMINFO_WRITED) SSE2_PSLLD_I8_to_XMM(t1reg, 15); SSE2_POR_XMM_to_XMM(t0reg, t1reg); + SSEX_MOVDQA_XMM_to_XMM(t1reg, EEREC_T); // for bit 5..9 + SSEX_MOVDQA_XMM_to_XMM(EEREC_D, EEREC_T); // for bit 0..4 + + SSE2_PSLLD_I8_to_XMM(EEREC_D, 24); + SSE2_PSRLD_I8_to_XMM(t1reg, 11); + SSE2_PSRLD_I8_to_XMM(EEREC_D, 27); + SSE2_PSLLD_I8_to_XMM(t1reg, 5); + SSE2_POR_XMM_to_XMM(EEREC_D, t1reg); + SSE2_PCMPEQD_XMM_to_XMM(t1reg, t1reg); SSE2_PSRLD_I8_to_XMM(t1reg, 22); SSE2_PAND_XMM_to_XMM(EEREC_D, t1reg);