fixed some potential EErec problems.

git-svn-id: http://pcsx2-playground.googlecode.com/svn/trunk@183 a6443dda-0b58-4228-96e9-037be469359c
This commit is contained in:
cottonvibes 2008-10-09 02:32:07 +00:00 committed by Gregory Hainaut
parent d63edda5ca
commit 800a634dc2
1 changed files with 8 additions and 6 deletions

View File

@ -56,7 +56,7 @@ REC_FUNC(SLTIU);
//// ADDI //// ADDI
void recADDI_const( void ) void recADDI_const( void )
{ {
g_cpuConstRegs[_Rt_].UD[0] = g_cpuConstRegs[_Rs_].SL[0] + _Imm_; g_cpuConstRegs[_Rt_].SD[0] = (s64)(g_cpuConstRegs[_Rs_].SL[0] + (s32)_Imm_);
} }
void recADDI_(int info) void recADDI_(int info)
@ -68,8 +68,9 @@ void recADDI_(int info)
if( info & PROCESS_EE_MMX ) { if( info & PROCESS_EE_MMX ) {
if( _Imm_ != 0 ) { if( _Imm_ != 0 ) {
u32* ptempmem = recAllocStackMem(4, 4); u32* ptempmem = recAllocStackMem(8, 8);
ptempmem[0] = _Imm_; ptempmem[0] = (s32)_Imm_;
ptempmem[1] = 0;
if( EEREC_T != EEREC_S ) MOVQRtoR(EEREC_T, EEREC_S); if( EEREC_T != EEREC_S ) MOVQRtoR(EEREC_T, EEREC_S);
PADDDMtoR(EEREC_T, (u32)ptempmem); PADDDMtoR(EEREC_T, (u32)ptempmem);
@ -97,8 +98,9 @@ void recADDI_(int info)
SetMMXstate(); SetMMXstate();
if( _Imm_ != 0 ) { if( _Imm_ != 0 ) {
u32* ptempmem = recAllocStackMem(4, 4); u32* ptempmem = recAllocStackMem(8, 8);
ptempmem[0] = _Imm_; ptempmem[0] = (s32)_Imm_;
ptempmem[1] = 0;
MOVDMtoMMX(rtreg, (int)&cpuRegs.GPR.r[ _Rs_ ].UL[ 0 ]); MOVDMtoMMX(rtreg, (int)&cpuRegs.GPR.r[ _Rs_ ].UL[ 0 ]);
PADDDMtoR(rtreg, (u32)ptempmem); PADDDMtoR(rtreg, (u32)ptempmem);
@ -153,7 +155,7 @@ void recADDIU( void )
//////////////////////////////////////////////////// ////////////////////////////////////////////////////
void recDADDI_const( void ) void recDADDI_const( void )
{ {
g_cpuConstRegs[_Rt_].UD[0] = g_cpuConstRegs[_Rs_].SD[0] + _Imm_; g_cpuConstRegs[_Rt_].SD[0] = g_cpuConstRegs[_Rs_].SD[0] + (s64)_Imm_;
} }
void recDADDI_(int info) void recDADDI_(int info)