From 46e839b2b2f09c60c1e356a4c8ae7997b40fa020 Mon Sep 17 00:00:00 2001 From: Henrik Rydgard Date: Sun, 8 May 2016 02:26:36 +0200 Subject: [PATCH] ir-jit: Fix bugs in rounding --- Core/MIPS/IR/IRInst.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Core/MIPS/IR/IRInst.cpp b/Core/MIPS/IR/IRInst.cpp index b1aaa34abc..1fd990adba 100644 --- a/Core/MIPS/IR/IRInst.cpp +++ b/Core/MIPS/IR/IRInst.cpp @@ -345,7 +345,7 @@ u32 IRInterpret(MIPSState *mips, const IRInst *inst, const u32 *constPool, int c mips->r[inst->dest] = mips->vfpuCtrl[inst->src1]; break; case IROp::FRound: - mips->r[inst->dest] = (int)floorf(mips->f[inst->src1] + 0.5f); + mips->fs[inst->dest] = (int)floorf(mips->f[inst->src1] + 0.5f); break; case IROp::FTrunc: { @@ -363,10 +363,10 @@ u32 IRInterpret(MIPSState *mips, const IRInst *inst, const u32 *constPool, int c break; } case IROp::FCeil: - mips->r[inst->dest] = (int)ceilf(mips->f[inst->src1]); + mips->fs[inst->dest] = (int)ceilf(mips->f[inst->src1]); break; case IROp::FFloor: - mips->r[inst->dest] = (int)floorf(mips->f[inst->src1]); + mips->fs[inst->dest] = (int)floorf(mips->f[inst->src1]); break; case IROp::FCvtSW: