summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNormmatt <normmatt234@gmail.com>2014-12-16 11:53:19 +0100
committerLioncash <mathew1800@gmail.com>2014-12-16 11:54:00 +0100
commit2ed03c10e03bbd0f513d157c577f1c75ae9ede5b (patch)
tree5ee827081e5366694d3b999f5e76b9d04bc17070
parentMerge pull request #281 from lioncash/uxtb16 (diff)
downloadyuzu-2ed03c10e03bbd0f513d157c577f1c75ae9ede5b.tar
yuzu-2ed03c10e03bbd0f513d157c577f1c75ae9ede5b.tar.gz
yuzu-2ed03c10e03bbd0f513d157c577f1c75ae9ede5b.tar.bz2
yuzu-2ed03c10e03bbd0f513d157c577f1c75ae9ede5b.tar.lz
yuzu-2ed03c10e03bbd0f513d157c577f1c75ae9ede5b.tar.xz
yuzu-2ed03c10e03bbd0f513d157c577f1c75ae9ede5b.tar.zst
yuzu-2ed03c10e03bbd0f513d157c577f1c75ae9ede5b.zip
-rw-r--r--src/core/arm/skyeye_common/vfp/vfpsingle.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/core/arm/skyeye_common/vfp/vfpsingle.cpp b/src/core/arm/skyeye_common/vfp/vfpsingle.cpp
index 871900497..f5410fd9a 100644
--- a/src/core/arm/skyeye_common/vfp/vfpsingle.cpp
+++ b/src/core/arm/skyeye_common/vfp/vfpsingle.cpp
@@ -1148,7 +1148,10 @@ static u32 vfp_single_fsub(ARMul_State* state, int sd, int sn, s32 m, u32 fpscr)
/*
* Subtraction is addition with one sign inverted.
*/
- return vfp_single_fadd(state, sd, sn, vfp_single_packed_negate(m), fpscr);
+ if (m != 0x7FC00000) // Only negate if m isn't NaN.
+ m = vfp_single_packed_negate(m);
+
+ return vfp_single_fadd(state, sd, sn, m, fpscr);
}
/*