mirror of
https://github.com/hrydgard/ppsspp.git
synced 2025-04-02 11:01:50 -04:00
More sensible approach to the sc problem that broke Beats
This commit is contained in:
parent
064532ab3e
commit
23aedf1e63
2 changed files with 6 additions and 4 deletions
|
@ -80,7 +80,7 @@ namespace MIPSComp {
|
|||
return in;
|
||||
}
|
||||
|
||||
void Jit::CompITypeMemWrite(MIPSOpcode op, u32 bits, const void *safeFunc)
|
||||
void Jit::CompITypeMemWrite(MIPSOpcode op, u32 bits, const void *safeFunc, bool makeRTWritable)
|
||||
{
|
||||
CONDITIONAL_DISABLE(LSU);
|
||||
int offset = _IMM16;
|
||||
|
@ -90,6 +90,9 @@ namespace MIPSComp {
|
|||
gpr.Lock(rt, rs);
|
||||
|
||||
if (rt == MIPS_REG_ZERO || gpr.R(rt).IsImm()) {
|
||||
if (makeRTWritable) {
|
||||
gpr.MapReg(rt, true, true);
|
||||
}
|
||||
// NOTICE_LOG(JIT, "%d-bit Imm at %08x : %08x", bits, js.blockStart, (u32)gpr.R(rt).GetImmValue());
|
||||
} else {
|
||||
gpr.MapReg(rt, true, false);
|
||||
|
@ -428,8 +431,7 @@ namespace MIPSComp {
|
|||
CMP(8, MDisp(X64JitConstants::CTXREG, -128 + offsetof(MIPSState, llBit)), Imm8(1));
|
||||
skipStore = J_CC(CC_NE);
|
||||
|
||||
CompITypeMemWrite(op, 32, safeMemFuncs.writeU32);
|
||||
gpr.MapReg(rt, true, true);
|
||||
CompITypeMemWrite(op, 32, safeMemFuncs.writeU32, true);
|
||||
MOV(32, gpr.R(rt), Imm32(1));
|
||||
finish = J();
|
||||
|
||||
|
|
|
@ -225,7 +225,7 @@ private:
|
|||
void CompITypeMemRead(MIPSOpcode op, u32 bits, void (XEmitter::*mov)(int, int, Gen::X64Reg, Gen::OpArg), T (*safeFunc)(u32 addr)) {
|
||||
CompITypeMemRead(op, bits, mov, (const void *)safeFunc);
|
||||
}
|
||||
void CompITypeMemWrite(MIPSOpcode op, u32 bits, const void *safeFunc);
|
||||
void CompITypeMemWrite(MIPSOpcode op, u32 bits, const void *safeFunc, bool makeRTWritable = false);
|
||||
template <typename T>
|
||||
void CompITypeMemWrite(MIPSOpcode op, u32 bits, void (*safeFunc)(T val, u32 addr)) {
|
||||
CompITypeMemWrite(op, bits, (const void *)safeFunc);
|
||||
|
|
Loading…
Add table
Reference in a new issue