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;
|
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);
|
CONDITIONAL_DISABLE(LSU);
|
||||||
int offset = _IMM16;
|
int offset = _IMM16;
|
||||||
|
@ -90,6 +90,9 @@ namespace MIPSComp {
|
||||||
gpr.Lock(rt, rs);
|
gpr.Lock(rt, rs);
|
||||||
|
|
||||||
if (rt == MIPS_REG_ZERO || gpr.R(rt).IsImm()) {
|
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());
|
// NOTICE_LOG(JIT, "%d-bit Imm at %08x : %08x", bits, js.blockStart, (u32)gpr.R(rt).GetImmValue());
|
||||||
} else {
|
} else {
|
||||||
gpr.MapReg(rt, true, false);
|
gpr.MapReg(rt, true, false);
|
||||||
|
@ -428,8 +431,7 @@ namespace MIPSComp {
|
||||||
CMP(8, MDisp(X64JitConstants::CTXREG, -128 + offsetof(MIPSState, llBit)), Imm8(1));
|
CMP(8, MDisp(X64JitConstants::CTXREG, -128 + offsetof(MIPSState, llBit)), Imm8(1));
|
||||||
skipStore = J_CC(CC_NE);
|
skipStore = J_CC(CC_NE);
|
||||||
|
|
||||||
CompITypeMemWrite(op, 32, safeMemFuncs.writeU32);
|
CompITypeMemWrite(op, 32, safeMemFuncs.writeU32, true);
|
||||||
gpr.MapReg(rt, true, true);
|
|
||||||
MOV(32, gpr.R(rt), Imm32(1));
|
MOV(32, gpr.R(rt), Imm32(1));
|
||||||
finish = J();
|
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)) {
|
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);
|
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>
|
template <typename T>
|
||||||
void CompITypeMemWrite(MIPSOpcode op, u32 bits, void (*safeFunc)(T val, u32 addr)) {
|
void CompITypeMemWrite(MIPSOpcode op, u32 bits, void (*safeFunc)(T val, u32 addr)) {
|
||||||
CompITypeMemWrite(op, bits, (const void *)safeFunc);
|
CompITypeMemWrite(op, bits, (const void *)safeFunc);
|
||||||
|
|
Loading…
Add table
Reference in a new issue