ir-jit: Fix bugs in rounding

This commit is contained in:
Henrik Rydgard committed 2016-05-08 02:26:36 +02:00
1 parent e750987052
commit 46e839b2b2
1 file changed
+3 -3
+3 -3
View File
@@ -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: