diff --git a/Core/MIPS/IR/IRCompBranch.cpp b/Core/MIPS/IR/IRCompBranch.cpp index 9234b66817..b5531a5050 100644 --- a/Core/MIPS/IR/IRCompBranch.cpp +++ b/Core/MIPS/IR/IRCompBranch.cpp @@ -376,8 +376,6 @@ void IRFrontend::Comp_JumpReg(MIPSOpcode op) { } void IRFrontend::Comp_Syscall(MIPSOpcode op) { - RestoreRoundingMode(); - // Note: If we're in a delay slot, this is off by one compared to the interpreter. int dcAmount = js.downcountAmount; ir.Write(IROp::Downcount, 0, dcAmount & 0xFF, dcAmount >> 8); @@ -385,6 +383,7 @@ void IRFrontend::Comp_Syscall(MIPSOpcode op) { FlushAll(); + RestoreRoundingMode(); ir.Write(IROp::Syscall, 0, ir.AddConstant(op.encoding)); ApplyRoundingMode(); ir.Write(IROp::ExitToPC); diff --git a/Core/MIPS/IR/IRInst.cpp b/Core/MIPS/IR/IRInst.cpp index 8d4991e603..c44cc91837 100644 --- a/Core/MIPS/IR/IRInst.cpp +++ b/Core/MIPS/IR/IRInst.cpp @@ -92,6 +92,7 @@ static const IRMeta irMeta[] = { { IROp::FSatMinus1_1, "FSat(-1 - 1)", "FF" }, { IROp::FMovFromGPR, "FMovFromGPR", "FG" }, { IROp::FMovToGPR, "FMovToGPR", "GF" }, + { IROp::ZeroFpCond, "ZeroFpCond", "" }, { IROp::FpCondToReg, "FpCondToReg", "G" }, { IROp::VfpuCtrlToReg, "VfpuCtrlToReg", "GI" }, { IROp::SetCtrlVFPU, "SetCtrlVFPU", "TC" }, diff --git a/Core/MIPS/IR/IRPassSimplify.cpp b/Core/MIPS/IR/IRPassSimplify.cpp index 6b29efc242..f0f899bc69 100644 --- a/Core/MIPS/IR/IRPassSimplify.cpp +++ b/Core/MIPS/IR/IRPassSimplify.cpp @@ -117,7 +117,7 @@ bool IRApplyPasses(const IRPassFunc *passes, size_t c, const IRWriter &in, IRWri } bool OptimizeFPMoves(const IRWriter &in, IRWriter &out) { - const u32 *constants = in.GetConstants().data(); + const u32 *constants = !in.GetConstants().empty() ? &in.GetConstants()[0] : nullptr; bool logBlocks = false; IRInst prev; prev.op = IROp::Nop; @@ -215,7 +215,7 @@ bool ThreeOpToTwoOp(const IRWriter &in, IRWriter &out) { bool PropagateConstants(const IRWriter &in, IRWriter &out) { IRRegCache gpr(&out); - const u32 *constants = &in.GetConstants()[0]; + const u32 *constants = !in.GetConstants().empty() ? &in.GetConstants()[0] : nullptr; bool logBlocks = false; for (int i = 0; i < (int)in.GetInstructions().size(); i++) { IRInst inst = in.GetInstructions()[i];