mirror of
https://github.com/hrydgard/ppsspp.git
synced 2026-10-13 06:20:26 +02:00
x86jit: Flush reg if dirty on map as ptr.
This commit is contained in:
1 parent
a1bddd880d
commit
c397e2e4da
1 file changed
+12
@@ -1030,6 +1030,11 @@ IRNativeReg IRNativeRegCacheBase::MapNativeRegAsPointer(IRReg gpr) {
|
||||
return mr[gpr].nReg;
|
||||
}
|
||||
|
||||
// Cannot use if somehow multilane.
|
||||
if (mr[gpr].nReg != -1 && mr[gpr].lane != -1) {
|
||||
FlushNativeReg(mr[gpr].nReg);
|
||||
}
|
||||
|
||||
IRNativeReg nreg = mr[gpr].nReg;
|
||||
if (mr[gpr].loc != MIPSLoc::REG && mr[gpr].loc != MIPSLoc::REG_IMM) {
|
||||
nreg = MapNativeReg(MIPSLoc::REG, gpr, 1, MIPSMap::INIT);
|
||||
@@ -1040,6 +1045,13 @@ IRNativeReg IRNativeRegCacheBase::MapNativeRegAsPointer(IRReg gpr) {
|
||||
mr[gpr].loc = MIPSLoc::REG;
|
||||
mr[gpr].imm = 0;
|
||||
|
||||
#ifdef MASKED_PSP_MEMORY
|
||||
if (nr[mr[gpr].nReg].isDirty) {
|
||||
StoreNativeReg(mr[gpr].nReg, gpr, 1);
|
||||
nr[mr[gpr].nReg].isDirty = false;
|
||||
}
|
||||
#endif
|
||||
|
||||
if (!jo_->enablePointerify) {
|
||||
AdjustNativeRegAsPtr(nreg, true);
|
||||
mr[gpr].loc = MIPSLoc::REG_AS_PTR;
|
||||
|
||||
Reference in new issue
Block a user