diff --git a/pcsx2/x86/iVUzerorec.cpp b/pcsx2/x86/iVUzerorec.cpp index de6ad9b1af..59102f303e 100644 --- a/pcsx2/x86/iVUzerorec.cpp +++ b/pcsx2/x86/iVUzerorec.cpp @@ -3859,7 +3859,13 @@ void recVUMI_JR( VURegs* vuu, s32 info ) { int fsreg = _allocX86reg(-1, X86TYPE_VI|(s_vu?X86TYPE_VU1:0), _Fs_, MODE_READ); 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) ) { @@ -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); LEA32RStoR(EAX, fsreg, 3); + //Mask the address to something valid + if(vuu == &VU0) + AND32ItoR(EAX, 0xfff); + else + AND32ItoR(EAX, 0x3fff); + if ( _Ft_ ) { _deleteX86reg(X86TYPE_VI|(s_vu?X86TYPE_VU1:0), _Ft_, 2); MOV16ItoM( SuperVUGetVIAddr(_Ft_, 0), (pc+8)>>3 );