Access FPU temps through CTXREG

This commit is contained in:
Henrik Rydgård committed 2017-07-07 11:33:06 +02:00
1 parent 752254d404
commit 0645677fea
3 files changed
+4 -6

No files matched your search

+3 -3
View File
@@ -895,10 +895,10 @@ OpArg FPURegCache::GetDefaultLocation(int reg) const {
return MDisp(CTXREG, reg * 4);
} else if (reg < 32 + 128) {
return M(&mips->v[voffset[reg - 32]]);
// This should work, but doesn't seem to. Maybe used from somewhere where CTXREG is not yet set properly.
// return MDisp(CTXREG, offsetof(MIPSState, v[0]) - offsetof(MIPSState, f[0]) + voffset[reg - 32] * sizeof(float));
// This should work, but doesn't seem to (crashes Crisis Core). Seems a bad instruction is generated somehow...
// return MIPSSTATE_VAR(v[voffset[reg - 32]]);
} else {
return M(&mips->tempValues[reg - 32 - 128]);
return MIPSSTATE_VAR(tempValues[reg - 32 - 128]);
}
}