diff --git a/Common/x64Emitter.cpp b/Common/x64Emitter.cpp index aff3983bc6..30ad2a6b90 100644 --- a/Common/x64Emitter.cpp +++ b/Common/x64Emitter.cpp @@ -269,7 +269,7 @@ void OpArg::WriteRest(XEmitter *emit, int extraBytes, X64Reg _operandReg, { mod = 0; } - else if (ioff<-128 || ioff>127) + else if (ioff < -128 || ioff > 127) { mod = 2; //32-bit displacement } diff --git a/Common/x64Emitter.h b/Common/x64Emitter.h index 38f8fa7b34..912743beee 100644 --- a/Common/x64Emitter.h +++ b/Common/x64Emitter.h @@ -359,8 +359,6 @@ private: void WriteFloatLoadStore(int bits, FloatOp op, FloatOp op_80b, OpArg arg); void WriteNormalOp(XEmitter *emit, int bits, NormalOp op, const OpArg &a1, const OpArg &a2); - void ABI_CalculateFrameSize(u32 mask, size_t rsp_alignment, size_t needed_frame_size, size_t* shadowp, size_t* subtractionp, size_t* xmm_offsetp); - protected: inline void Write8(u8 value) {*code++ = value;} inline void Write16(u16 value) {*(u16*)code = (value); code += 2;} diff --git a/Core/MIPS/x86/RegCacheFPU.cpp b/Core/MIPS/x86/RegCacheFPU.cpp index 8048fa8bf5..f7e753dbfd 100644 --- a/Core/MIPS/x86/RegCacheFPU.cpp +++ b/Core/MIPS/x86/RegCacheFPU.cpp @@ -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]); } }