diff --git a/Core/MIPS/ARM/ArmCompVFPU.cpp b/Core/MIPS/ARM/ArmCompVFPU.cpp index 5fc5ba4a7e..9a983138b3 100644 --- a/Core/MIPS/ARM/ArmCompVFPU.cpp +++ b/Core/MIPS/ARM/ArmCompVFPU.cpp @@ -885,7 +885,9 @@ namespace MIPSComp } void Jit::Comp_VScl(u32 op) { - // Darn, still breaks Tekken 6. Bug could be elsewhere though. + // Darn, still breaks stuff. Bug could be elsewhere though. + DISABLE; + fpr.FlushAll(); CONDITIONAL_DISABLE; if (js.HasUnknownPrefix()) diff --git a/Core/MIPS/MIPSInt.cpp b/Core/MIPS/MIPSInt.cpp index 68f8e7b8f4..c9e1fe1039 100644 --- a/Core/MIPS/MIPSInt.cpp +++ b/Core/MIPS/MIPSInt.cpp @@ -51,25 +51,6 @@ #define LO currentMIPS->lo -inline int is_even(float d) { - float int_part; - modff(d / 2.0f, &int_part); - return 2.0f * int_part == d; -} - -// Rounds *.5 to closest even number -float round_ieee_754(float d) { - float i = floorf(d); - d -= i; - if(d < 0.5f) - return i; - if(d > 0.5f) - return i + 1.0f; - if(is_even(i)) - return i; - return i + 1.0f; -} - static inline void DelayBranchTo(u32 where) { PC += 4; diff --git a/Core/MIPS/MIPSIntVFPU.cpp b/Core/MIPS/MIPSIntVFPU.cpp index 46e6aea09b..143f29b626 100644 --- a/Core/MIPS/MIPSIntVFPU.cpp +++ b/Core/MIPS/MIPSIntVFPU.cpp @@ -106,12 +106,6 @@ inline float nanclamp(float f, float lower, float upper) } -#ifndef BLACKBERRY -double rint(double x){ -return floor(x+.5); -} -#endif - void ApplyPrefixST(float *v, u32 data, VectorSize size) { // Possible optimization shortcut: @@ -604,6 +598,11 @@ namespace MIPSInt EatPrefixes(); } + inline int round_vfpu_n(float param) { + // return floorf(param); + return (int)round_ieee_754(param); + } + void Int_Vf2i(u32 op) { float s[4]; @@ -627,7 +626,7 @@ namespace MIPSInt if (sv < (int)0x80000000) sv = (int)0x80000000; switch ((op >> 21) & 0x1f) { - case 16: d[i] = (int)rint(sv); break; //n + case 16: d[i] = (int)round_vfpu_n(sv); break; //n case 17: d[i] = s[i]>=0 ? (int)floor(sv) : (int)ceil(sv); break; //z case 18: d[i] = (int)ceil(sv); break; //u case 19: d[i] = (int)floor(sv); break; //d diff --git a/native b/native index 345a67144a..411a41e948 160000 --- a/native +++ b/native @@ -1 +1 @@ -Subproject commit 345a67144a5d71325421da6477834d2f9c81d5f7 +Subproject commit 411a41e948de1244a8583ac2ac7e798155657400