fixed up some allocation errors in recUpdateFlags()

git-svn-id: http://pcsx2-playground.googlecode.com/svn/trunk@17 a6443dda-0b58-4228-96e9-037be469359c
This commit is contained in:
cottonvibes 2008-08-13 12:52:34 +00:00 committed by Gregory Hainaut
parent 2d865e39fb
commit 2ed30a6cf3
1 changed files with 13 additions and 2 deletions

View File

@ -1331,6 +1331,7 @@ const static PCSX2_ALIGNED16(u32 VU_Underflow_Mask2[4]) = {0x007fffff, 0x007fff
const static PCSX2_ALIGNED16(u32 VU_Zero_Mask[4]) = {0x00000000, 0x00000000, 0x00000000, 0x00000000}; const static PCSX2_ALIGNED16(u32 VU_Zero_Mask[4]) = {0x00000000, 0x00000000, 0x00000000, 0x00000000};
const static PCSX2_ALIGNED16(u32 VU_Zero_Helper_Mask[4]) = {0x7fffffff, 0x7fffffff, 0x7fffffff, 0x7fffffff}; const static PCSX2_ALIGNED16(u32 VU_Zero_Helper_Mask[4]) = {0x7fffffff, 0x7fffffff, 0x7fffffff, 0x7fffffff};
const static PCSX2_ALIGNED16(u32 VU_Signed_Zero_Mask[4]) = {0x80000000, 0x80000000, 0x80000000, 0x80000000}; const static PCSX2_ALIGNED16(u32 VU_Signed_Zero_Mask[4]) = {0x80000000, 0x80000000, 0x80000000, 0x80000000};
PCSX2_ALIGNED16(u64 TEMPXMMData[2];)
// VU Flags // VU Flags
// NOTE: Flags now compute under/over flows! :p // NOTE: Flags now compute under/over flows! :p
@ -1470,7 +1471,14 @@ void recUpdateFlags(VURegs * VU, int reg, int info)
//-------------------------Flag Setting if (reg == EEREC_TEMP)------------------------------ //-------------------------Flag Setting if (reg == EEREC_TEMP)------------------------------
else { else {
int t1reg = _allocTempXMMreg(XMMT_FPS, -1);//_getFreeXMMreg();//_vuGetTempXMMreg(info); int t1reg = _vuGetTempXMMreg(info);
int t1regBoolean = 0;
if (t1reg == -1) {
//SysPrintf( "VU ALLOCATION ERROR: Temp reg can't be allocated!!!!\n" );
t1reg = (reg >= XMMREGS) ? (reg - 1) : (reg + 1);
SSE_MOVAPS_XMM_to_M128( (uptr)TEMPXMMData, t1reg );
t1regBoolean = 1;
}
SSE_SHUFPS_XMM_to_XMM(reg, reg, 0x1B); // Flip wzyx to xyzw SSE_SHUFPS_XMM_to_XMM(reg, reg, 0x1B); // Flip wzyx to xyzw
@ -1571,7 +1579,10 @@ void recUpdateFlags(VURegs * VU, int reg, int info)
//-------------------------Finally: Send the Flags to the Mac Address------------------------------ //-------------------------Finally: Send the Flags to the Mac Address------------------------------
//SSE_SHUFPS_XMM_to_XMM(reg, reg, 0x1B); // Don't need to restore the reg since this is a temp reg //SSE_SHUFPS_XMM_to_XMM(reg, reg, 0x1B); // Don't need to restore the reg since this is a temp reg
_freeXMMreg(t1reg); if (t1regBoolean)
SSE_MOVAPS_M128_to_XMM( t1reg, (uptr)TEMPXMMData );
else
_freeXMMreg(t1reg);
if( macaddr != 0 ) if( macaddr != 0 )
MOV16RtoM(macaddr, x86macflag); MOV16RtoM(macaddr, x86macflag);