diff --git a/Core/MIPS/ARM/ArmCompVFPU.cpp b/Core/MIPS/ARM/ArmCompVFPU.cpp index eda34c5c5b..b0ba0001b0 100644 --- a/Core/MIPS/ARM/ArmCompVFPU.cpp +++ b/Core/MIPS/ARM/ArmCompVFPU.cpp @@ -1252,8 +1252,6 @@ namespace MIPSComp gpr.MapReg(rt); STR(gpr.R(rt), CTXREG, offsetof(MIPSState, vfpuCtrl) + 4 * (imm - 128)); } - //gpr.BindToRegister(rt, true, false); - //MOV(32, M(¤tMIPS->vfpuCtrl[imm - 128]), gpr.R(rt)); // TODO: Optimization if rt is Imm? // Set these BEFORE disable! diff --git a/Core/MIPS/PPC/PpcCompVFPU.cpp b/Core/MIPS/PPC/PpcCompVFPU.cpp index 65b530e3a7..81dfdc5aa5 100644 --- a/Core/MIPS/PPC/PpcCompVFPU.cpp +++ b/Core/MIPS/PPC/PpcCompVFPU.cpp @@ -671,7 +671,7 @@ namespace MIPSComp // In case we have a saved prefix. //FlushPrefixV(); //gpr.BindToRegister(rt, false, true); - //MOV(32, gpr.R(rt), M(¤tMIPS->vfpuCtrl[imm - 128])); + //MOV(32, gpr.R(rt), M(&mips_->vfpuCtrl[imm - 128])); } else { //ERROR - maybe need to make this value too an "interlock" value? ERROR_LOG(CPU, "mfv - invalid register %i", imm); @@ -688,7 +688,7 @@ namespace MIPSComp gpr.MapReg(rt); STW(gpr.R(rt), CTXREG, offsetof(MIPSState, vfpuCtrl) + 4 * (imm - 128)); //gpr.BindToRegister(rt, true, false); - //MOV(32, M(¤tMIPS->vfpuCtrl[imm - 128]), gpr.R(rt)); + //MOV(32, M(&mips_->vfpuCtrl[imm - 128]), gpr.R(rt)); // TODO: Optimization if rt is Imm? // Set these BEFORE disable! diff --git a/Core/MIPS/x86/CompBranch.cpp b/Core/MIPS/x86/CompBranch.cpp index eaaa69f384..73ec89e7c2 100644 --- a/Core/MIPS/x86/CompBranch.cpp +++ b/Core/MIPS/x86/CompBranch.cpp @@ -650,7 +650,7 @@ void Jit::Comp_JumpReg(MIPSOpcode op) { // If this is a syscall, write the pc (for thread switching and other good reasons.) gpr.MapReg(rs, true, false); - MOV(32, M(¤tMIPS->pc), gpr.R(rs)); + MOV(32, M(&mips_->pc), gpr.R(rs)); if (andLink) gpr.SetImm(rd, js.compilerPC + 8); CompileDelaySlot(DELAYSLOT_FLUSH); diff --git a/Core/MIPS/x86/CompVFPU.cpp b/Core/MIPS/x86/CompVFPU.cpp index e60a753483..5a698a9b3e 100644 --- a/Core/MIPS/x86/CompVFPU.cpp +++ b/Core/MIPS/x86/CompVFPU.cpp @@ -1697,7 +1697,7 @@ void Jit::Comp_Mftv(MIPSOpcode op) { // In case we have a saved prefix. FlushPrefixV(); gpr.MapReg(rt, false, true); - MOV(32, gpr.R(rt), M(¤tMIPS->vfpuCtrl[imm - 128])); + MOV(32, gpr.R(rt), M(&mips_->vfpuCtrl[imm - 128])); } } else { //ERROR - maybe need to make this value too an "interlock" value? @@ -1724,7 +1724,7 @@ void Jit::Comp_Mftv(MIPSOpcode op) { } } else { gpr.MapReg(rt, true, false); - MOV(32, M(¤tMIPS->vfpuCtrl[imm - 128]), gpr.R(rt)); + MOV(32, M(&mips_->vfpuCtrl[imm - 128]), gpr.R(rt)); } // TODO: Optimization if rt is Imm? @@ -1756,7 +1756,7 @@ void Jit::Comp_Vmfvc(MIPSOpcode op) { gpr.MapReg(MIPS_REG_VFPUCC, true, false); MOVD_xmm(fpr.VX(vs), gpr.R(MIPS_REG_VFPUCC)); } else { - MOVSS(fpr.VX(vs), M(¤tMIPS->vfpuCtrl[imm - 128])); + MOVSS(fpr.VX(vs), M(&mips_->vfpuCtrl[imm - 128])); } fpr.ReleaseSpillLocks(); } @@ -1772,7 +1772,7 @@ void Jit::Comp_Vmtvc(MIPSOpcode op) { gpr.MapReg(MIPS_REG_VFPUCC, false, true); MOVD_xmm(gpr.R(MIPS_REG_VFPUCC), fpr.VX(vs)); } else { - MOVSS(M(¤tMIPS->vfpuCtrl[imm - 128]), fpr.VX(vs)); + MOVSS(M(&mips_->vfpuCtrl[imm - 128]), fpr.VX(vs)); } fpr.ReleaseSpillLocks(); diff --git a/Core/MIPS/x86/Jit.cpp b/Core/MIPS/x86/Jit.cpp index cc96264062..3edc7de02f 100644 --- a/Core/MIPS/x86/Jit.cpp +++ b/Core/MIPS/x86/Jit.cpp @@ -218,7 +218,7 @@ void Jit::FlushPrefixV() void Jit::WriteDowncount(int offset) { const int downcount = js.downcountAmount + offset; - SUB(32, M(¤tMIPS->downcount), downcount > 127 ? Imm32(downcount) : Imm8(downcount)); + SUB(32, M(&mips_->downcount), downcount > 127 ? Imm32(downcount) : Imm8(downcount)); } void Jit::RestoreRoundingMode(bool force, XEmitter *emitter) @@ -228,10 +228,10 @@ void Jit::RestoreRoundingMode(bool force, XEmitter *emitter) { if (emitter == NULL) emitter = this; - emitter->STMXCSR(M(¤tMIPS->temp)); + emitter->STMXCSR(M(&mips_->temp)); // Clear the rounding mode and flush-to-zero bits back to 0. - emitter->AND(32, M(¤tMIPS->temp), Imm32(~(7 << 13))); - emitter->LDMXCSR(M(¤tMIPS->temp)); + emitter->AND(32, M(&mips_->temp), Imm32(~(7 << 13))); + emitter->LDMXCSR(M(&mips_->temp)); } } @@ -252,7 +252,7 @@ void Jit::ApplyRoundingMode(bool force, XEmitter *emitter) if (!g_Config.bForceFlushToZero) skip = emitter->J_CC(CC_Z); - emitter->STMXCSR(M(¤tMIPS->temp)); + emitter->STMXCSR(M(&mips_->temp)); // The MIPS bits don't correspond exactly, so we have to adjust. // 0 -> 0 (skip2), 1 -> 3, 2 -> 2 (skip2), 3 -> 1 @@ -262,18 +262,18 @@ void Jit::ApplyRoundingMode(bool force, XEmitter *emitter) emitter->SetJumpTarget(skip2); emitter->SHL(32, R(EAX), Imm8(13)); - emitter->OR(32, M(¤tMIPS->temp), R(EAX)); + emitter->OR(32, M(&mips_->temp), R(EAX)); if (g_Config.bForceFlushToZero) { - emitter->OR(32, M(¤tMIPS->temp), Imm32(1 << 15)); + emitter->OR(32, M(&mips_->temp), Imm32(1 << 15)); } else { emitter->TEST(32, M(&mips_->fcr31), Imm32(1 << 24)); FixupBranch skip3 = emitter->J_CC(CC_Z); - emitter->OR(32, M(¤tMIPS->temp), Imm32(1 << 15)); + emitter->OR(32, M(&mips_->temp), Imm32(1 << 15)); emitter->SetJumpTarget(skip3); } - emitter->LDMXCSR(M(¤tMIPS->temp)); + emitter->LDMXCSR(M(&mips_->temp)); if (!g_Config.bForceFlushToZero) emitter->SetJumpTarget(skip); @@ -543,7 +543,7 @@ bool Jit::ReplaceJalTo(u32 dest) { MOV(32, M(&mips_->pc), Imm32(js.compilerPC)); RestoreRoundingMode(); ABI_CallFunction(entry->replaceFunc); - SUB(32, M(¤tMIPS->downcount), R(EAX)); + SUB(32, M(&mips_->downcount), R(EAX)); ApplyRoundingMode(); } @@ -582,7 +582,7 @@ void Jit::Comp_ReplacementFunc(MIPSOpcode op) MIPSCompileOp(Memory::Read_Instruction(js.compilerPC, true)); } else { FlushAll(); - MOV(32, R(ECX), M(¤tMIPS->r[MIPS_REG_RA])); + MOV(32, R(ECX), M(&mips_->r[MIPS_REG_RA])); js.downcountAmount += cycles; WriteExitDestInReg(ECX); js.compiling = false; @@ -601,10 +601,10 @@ void Jit::Comp_ReplacementFunc(MIPSOpcode op) ApplyRoundingMode(); MIPSCompileOp(Memory::Read_Instruction(js.compilerPC, true)); } else { - MOV(32, R(ECX), M(¤tMIPS->r[MIPS_REG_RA])); - SUB(32, M(¤tMIPS->downcount), R(EAX)); + MOV(32, R(ECX), M(&mips_->r[MIPS_REG_RA])); + SUB(32, M(&mips_->downcount), R(EAX)); ApplyRoundingMode(); - SUB(32, M(¤tMIPS->downcount), Imm8(0)); + SUB(32, M(&mips_->downcount), Imm8(0)); WriteExitDestInReg(ECX); js.compiling = false; } @@ -707,7 +707,7 @@ void Jit::WriteExitDestInReg(X64Reg reg) FixupBranch tooHigh = J_CC(CC_AE); // Need to set neg flag again if necessary. - SUB(32, M(¤tMIPS->downcount), Imm32(0)); + SUB(32, M(&mips_->downcount), Imm32(0)); JMP(asm_.dispatcher, true); SetJumpTarget(tooLow); @@ -721,11 +721,11 @@ void Jit::WriteExitDestInReg(X64Reg reg) if (g_Config.bIgnoreBadMemAccess) CallProtectedFunction(Core_UpdateState, Imm32(CORE_ERROR)); - SUB(32, M(¤tMIPS->downcount), Imm32(0)); + SUB(32, M(&mips_->downcount), Imm32(0)); JMP(asm_.dispatcherCheckCoreState, true); SetJumpTarget(skip); - SUB(32, M(¤tMIPS->downcount), Imm32(0)); + SUB(32, M(&mips_->downcount), Imm32(0)); J_CC(CC_NE, asm_.dispatcher, true); } else