VU: Also update Status/Mac instances after COP2, just in case

This commit is contained in:
refractionpcsx2 2020-09-10 12:25:52 +01:00
parent 19ab48c280
commit 197eaf3899
1 changed files with 10 additions and 0 deletions

View File

@ -64,6 +64,16 @@ void endMacroOp(int mode) {
xMOV(ptr32[&vu0Regs.VI[REG_STATUS_FLAG].UL], gprF0);
}
microVU0.regAlloc->flushAll();
if (mode & 0x10) { // Update VU0 Status/Mac instances after flush to avoid corrupting anything
xMOVDZX(xmmT1, ptr32[&vu0Regs.VI[REG_STATUS_FLAG].UL]);
xSHUF.PS(xmmT1, xmmT1, 0);
xMOVAPS(ptr128[&microVU0.regs().micro_statusflags], xmmT1);
xMOVDZX(xmmT1, ptr32[&vu0Regs.VI[REG_MAC_FLAG].UL]);
xSHUF.PS(xmmT1, xmmT1, 0);
xMOVAPS(ptr128[&microVU0.regs().micro_macflags], xmmT1);
}
microVU0.cop2 = 0;
}