Skip to content

Commit

Permalink
VU: Also update Status/Mac instances after COP2, just in case
Browse files Browse the repository at this point in the history
  • Loading branch information
refractionpcsx2 committed Sep 10, 2020
1 parent 19ab48c commit 197eaf3
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions pcsx2/x86/microVU_Macro.inl
Expand Up @@ -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;
}

Expand Down

0 comments on commit 197eaf3

Please sign in to comment.