From 43b8f5224970a9b7f76691914b6422fbc454c2dc Mon Sep 17 00:00:00 2001 From: cottonvibes Date: Mon, 8 Sep 2008 06:07:09 +0000 Subject: [PATCH] fixed the way the VU's check for overflow in recUpdateFlags() i would like to continue coding, but i have to study for an exam hehe :p git-svn-id: http://pcsx2-playground.googlecode.com/svn/trunk@104 a6443dda-0b58-4228-96e9-037be469359c --- pcsx2/x86/iVUmicro.c | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) diff --git a/pcsx2/x86/iVUmicro.c b/pcsx2/x86/iVUmicro.c index b745c01fd6..e5b8ee00cf 100644 --- a/pcsx2/x86/iVUmicro.c +++ b/pcsx2/x86/iVUmicro.c @@ -1404,8 +1404,13 @@ void recUpdateFlags(VURegs * VU, int reg, int info) if (CHECK_VU_EXTRA_FLAGS) { //-------------------------Check for Overflow flags------------------------------ - SSE_XORPS_XMM_to_XMM(EEREC_TEMP, EEREC_TEMP); // Clear EEREC_TEMP - SSE_CMPUNORDPS_XMM_to_XMM(EEREC_TEMP, reg); // If reg == NaN then set Vector to 0xFFFFFFFF + //SSE_XORPS_XMM_to_XMM(EEREC_TEMP, EEREC_TEMP); // Clear EEREC_TEMP + //SSE_CMPUNORDPS_XMM_to_XMM(EEREC_TEMP, reg); // If reg == NaN then set Vector to 0xFFFFFFFF + + SSE_MOVAPS_XMM_to_XMM(EEREC_TEMP, reg); + SSE_MINPS_M128_to_XMM(EEREC_TEMP, (uptr)g_maxvals); + SSE_MAXPS_M128_to_XMM(EEREC_TEMP, (uptr)g_minvals); + SSE_CMPNEPS_XMM_to_XMM(EEREC_TEMP, reg); // If they're not equal, then overflow has occured SSE_MOVMSKPS_XMM_to_R32(x86newflag, EEREC_TEMP); // Move the sign bits of the previous calculation @@ -1518,8 +1523,13 @@ void recUpdateFlags(VURegs * VU, int reg, int info) if (CHECK_VU_EXTRA_FLAGS) { //-------------------------Check for Overflow flags------------------------------ - SSE_XORPS_XMM_to_XMM(t1reg, t1reg); // Clear t1reg - SSE_CMPUNORDPS_XMM_to_XMM(t1reg, reg); // If reg == NaN then set Vector to 0xFFFFFFFF + //SSE_XORPS_XMM_to_XMM(t1reg, t1reg); // Clear t1reg + //SSE_CMPUNORDPS_XMM_to_XMM(t1reg, reg); // If reg == NaN then set Vector to 0xFFFFFFFF + + SSE_MOVAPS_XMM_to_XMM(t1reg, reg); + SSE_MINPS_M128_to_XMM(t1reg, (uptr)g_maxvals); + SSE_MAXPS_M128_to_XMM(t1reg, (uptr)g_minvals); + SSE_CMPNEPS_XMM_to_XMM(t1reg, reg); // If they're not equal, then overflow has occured SSE_MOVMSKPS_XMM_to_R32(x86newflag, t1reg); // Move the sign bits of the previous calculation