mirror of https://github.com/PCSX2/pcsx2.git
Put a different fix for bad J/JALR jumps (Charlie and the Chocolate Factory)
git-svn-id: http://pcsx2.googlecode.com/svn/trunk@1024 96395faa-99c1-11dd-bbfe-3dabce05a288
This commit is contained in:
parent
b7ea57a5d9
commit
457b78e70e
|
@ -3860,6 +3860,12 @@ void recVUMI_JR( VURegs* vuu, s32 info )
|
||||||
int fsreg = _allocX86reg(-1, X86TYPE_VI|(s_vu?X86TYPE_VU1:0), _Fs_, MODE_READ);
|
int fsreg = _allocX86reg(-1, X86TYPE_VI|(s_vu?X86TYPE_VU1:0), _Fs_, MODE_READ);
|
||||||
LEA32RStoR(EAX, fsreg, 3);
|
LEA32RStoR(EAX, fsreg, 3);
|
||||||
|
|
||||||
|
//Mask the address to something valid
|
||||||
|
if(vuu == &VU0)
|
||||||
|
AND32ItoR(EAX, 0xfff);
|
||||||
|
else
|
||||||
|
AND32ItoR(EAX, 0x3fff);
|
||||||
|
|
||||||
if( (s_pCurBlock->type & BLOCKTYPE_HASEOP) || s_vu == 0 ) MOV32RtoM(SuperVUGetVIAddr(REG_TPC, 0), EAX);
|
if( (s_pCurBlock->type & BLOCKTYPE_HASEOP) || s_vu == 0 ) MOV32RtoM(SuperVUGetVIAddr(REG_TPC, 0), EAX);
|
||||||
|
|
||||||
if( !(s_pCurBlock->type & BLOCKTYPE_HASEOP) ) {
|
if( !(s_pCurBlock->type & BLOCKTYPE_HASEOP) ) {
|
||||||
|
@ -3876,6 +3882,12 @@ void recVUMI_JALR( VURegs* vuu, s32 info )
|
||||||
int fsreg = _allocX86reg(-1, X86TYPE_VI|(s_vu?X86TYPE_VU1:0), _Fs_, MODE_READ);
|
int fsreg = _allocX86reg(-1, X86TYPE_VI|(s_vu?X86TYPE_VU1:0), _Fs_, MODE_READ);
|
||||||
LEA32RStoR(EAX, fsreg, 3);
|
LEA32RStoR(EAX, fsreg, 3);
|
||||||
|
|
||||||
|
//Mask the address to something valid
|
||||||
|
if(vuu == &VU0)
|
||||||
|
AND32ItoR(EAX, 0xfff);
|
||||||
|
else
|
||||||
|
AND32ItoR(EAX, 0x3fff);
|
||||||
|
|
||||||
if ( _Ft_ ) {
|
if ( _Ft_ ) {
|
||||||
_deleteX86reg(X86TYPE_VI|(s_vu?X86TYPE_VU1:0), _Ft_, 2);
|
_deleteX86reg(X86TYPE_VI|(s_vu?X86TYPE_VU1:0), _Ft_, 2);
|
||||||
MOV16ItoM( SuperVUGetVIAddr(_Ft_, 0), (pc+8)>>3 );
|
MOV16ItoM( SuperVUGetVIAddr(_Ft_, 0), (pc+8)>>3 );
|
||||||
|
|
Loading…
Reference in New Issue