microVU: properly normalise Status flags when exiting a VU program

Fixes shadows in Ratchet Gladiator
This commit is contained in:
refractionpcsx2 2020-10-26 01:47:13 +00:00
parent f25e7ff004
commit 4b0dc9c0df
1 changed files with 4 additions and 2 deletions

View File

@ -71,7 +71,8 @@ void mVUDTendProgram(mV, microFlagCycles* mFC, int isEbit) {
}
// Save MAC, Status and CLIP Flag Instances
xMOV(ptr32[&mVU.regs().VI[REG_STATUS_FLAG].UL], getFlagReg(fStatus));
mVUallocSFLAGc(gprT1, gprT2, fStatus);
xMOV(ptr32[&mVU.regs().VI[REG_STATUS_FLAG].UL], gprT1);
mVUallocMFLAGa(mVU, gprT1, fMac);
mVUallocCFLAGa(mVU, gprT2, fClip);
xMOV(ptr32[&mVU.regs().VI[REG_MAC_FLAG].UL], gprT1);
@ -170,7 +171,8 @@ void mVUendProgram(mV, microFlagCycles* mFC, int isEbit) {
}
// Save MAC, Status and CLIP Flag Instances
xMOV(ptr32[&mVU.regs().VI[REG_STATUS_FLAG].UL], getFlagReg(fStatus));
mVUallocSFLAGc(gprT1, gprT2, fStatus);
xMOV(ptr32[&mVU.regs().VI[REG_STATUS_FLAG].UL], gprT1);
mVUallocMFLAGa(mVU, gprT1, fMac);
mVUallocCFLAGa(mVU, gprT2, fClip);
xMOV(ptr32[&mVU.regs().VI[REG_MAC_FLAG].UL], gprT1);