Grandia 2 is playable again. The old block manager was incorrectly clearing a block which didn't need clearing and thus masking this constprop bug.

git-svn-id: http://pcsx2.googlecode.com/svn/trunk@774 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
sudonim1 2009-03-14 00:21:35 +00:00
parent 762b022df5
commit e248cf8cf0
1 changed files with 5 additions and 26 deletions

View File

@ -425,12 +425,9 @@ void recMTLO1( void )
//// MOVZ //// MOVZ
void recMOVZtemp_const() void recMOVZtemp_const()
{ {
GPR_DEL_CONST(_Rd_);
_deleteEEreg(_Rd_, 1);
_eeOnWriteReg(_Rd_, 0);
if (g_cpuConstRegs[_Rt_].UD[0] == 0) { if (g_cpuConstRegs[_Rt_].UD[0] == 0) {
MOV32ItoM((uptr)&cpuRegs.GPR.r[_Rd_].UL[0], g_cpuConstRegs[_Rs_].UL[0]); g_cpuConstRegs[_Rd_].UL[0] = g_cpuConstRegs[_Rs_].UL[0];
MOV32ItoM((uptr)&cpuRegs.GPR.r[_Rd_].UL[1], g_cpuConstRegs[_Rs_].UL[1]); g_cpuConstRegs[_Rd_].UL[1] = g_cpuConstRegs[_Rs_].UL[1];
} }
} }
@ -546,21 +543,14 @@ void recMOVZ()
if( _Rs_ == _Rd_ ) if( _Rs_ == _Rd_ )
return; return;
// aren't the templates meant to take care of this kind of thing?
if( GPR_IS_CONST1(_Rd_) ) { if( GPR_IS_CONST1(_Rd_) ) {
if( !GPR_IS_CONST2(_Rs_, _Rt_) ) { if( !GPR_IS_CONST2(_Rs_, _Rt_) ) {
// remove the const, since move is conditional // remove the const, since move is conditional
_deleteEEreg(_Rd_, 0); _deleteEEreg(_Rd_, 0);
MOV32ItoM((uptr)&cpuRegs.GPR.r[_Rd_].UL[0], g_cpuConstRegs[_Rd_].UL[0]); MOV32ItoM((uptr)&cpuRegs.GPR.r[_Rd_].UL[0], g_cpuConstRegs[_Rd_].UL[0]);
MOV32ItoM((uptr)&cpuRegs.GPR.r[_Rd_].UL[1], g_cpuConstRegs[_Rd_].UL[1]); MOV32ItoM((uptr)&cpuRegs.GPR.r[_Rd_].UL[1], g_cpuConstRegs[_Rd_].UL[1]);
} }
else {
if (g_cpuConstRegs[_Rt_].UD[0] == 0) {
g_cpuConstRegs[_Rd_].UL[0] = g_cpuConstRegs[_Rs_].UL[0];
g_cpuConstRegs[_Rd_].UL[1] = g_cpuConstRegs[_Rs_].UL[1];
}
return;
}
} }
recMOVZtemp(); recMOVZtemp();
@ -569,12 +559,9 @@ void recMOVZ()
//// MOVN //// MOVN
void recMOVNtemp_const() void recMOVNtemp_const()
{ {
GPR_DEL_CONST(_Rd_);
_deleteEEreg(_Rd_, 1);
_eeOnWriteReg(_Rd_, 0);
if (g_cpuConstRegs[_Rt_].UD[0] != 0) { if (g_cpuConstRegs[_Rt_].UD[0] != 0) {
MOV32ItoM((uptr)&cpuRegs.GPR.r[_Rd_].UL[0], g_cpuConstRegs[_Rs_].UL[0]); g_cpuConstRegs[_Rd_].UL[0] = g_cpuConstRegs[_Rs_].UL[0];
MOV32ItoM((uptr)&cpuRegs.GPR.r[_Rd_].UL[1], g_cpuConstRegs[_Rs_].UL[1]); g_cpuConstRegs[_Rd_].UL[1] = g_cpuConstRegs[_Rs_].UL[1];
} }
} }
@ -686,20 +673,12 @@ void recMOVN()
return; return;
if( GPR_IS_CONST1(_Rd_) ) { if( GPR_IS_CONST1(_Rd_) ) {
if( !GPR_IS_CONST2(_Rs_, _Rt_) ) { if( !GPR_IS_CONST2(_Rs_, _Rt_) ) {
// remove the const, since move is conditional // remove the const, since move is conditional
_deleteEEreg(_Rd_, 0); _deleteEEreg(_Rd_, 0);
MOV32ItoM((uptr)&cpuRegs.GPR.r[_Rd_].UL[0], g_cpuConstRegs[_Rd_].UL[0]); MOV32ItoM((uptr)&cpuRegs.GPR.r[_Rd_].UL[0], g_cpuConstRegs[_Rd_].UL[0]);
MOV32ItoM((uptr)&cpuRegs.GPR.r[_Rd_].UL[1], g_cpuConstRegs[_Rd_].UL[1]); MOV32ItoM((uptr)&cpuRegs.GPR.r[_Rd_].UL[1], g_cpuConstRegs[_Rd_].UL[1]);
} }
else {
if (g_cpuConstRegs[_Rt_].UD[0] != 0) {
g_cpuConstRegs[_Rd_].UL[0] = g_cpuConstRegs[_Rs_].UL[0];
g_cpuConstRegs[_Rd_].UL[1] = g_cpuConstRegs[_Rs_].UL[1];
}
return;
}
} }
recMOVNtemp(); recMOVNtemp();