diff options
author | bunnei <bunneidev@gmail.com> | 2014-12-17 05:22:58 +0100 |
---|---|---|
committer | bunnei <bunneidev@gmail.com> | 2014-12-17 05:22:58 +0100 |
commit | ec9ac2f51a9669fba1a88c93d0edb02a522492f6 (patch) | |
tree | e7a4389cf09a28208067d1706d972dc093cc89ad /src | |
parent | Merge pull request #286 from yuriks/msvc-fix (diff) | |
parent | armemu: Fix FTOUI NaN sign. (diff) | |
download | yuzu-ec9ac2f51a9669fba1a88c93d0edb02a522492f6.tar yuzu-ec9ac2f51a9669fba1a88c93d0edb02a522492f6.tar.gz yuzu-ec9ac2f51a9669fba1a88c93d0edb02a522492f6.tar.bz2 yuzu-ec9ac2f51a9669fba1a88c93d0edb02a522492f6.tar.lz yuzu-ec9ac2f51a9669fba1a88c93d0edb02a522492f6.tar.xz yuzu-ec9ac2f51a9669fba1a88c93d0edb02a522492f6.tar.zst yuzu-ec9ac2f51a9669fba1a88c93d0edb02a522492f6.zip |
Diffstat (limited to 'src')
-rw-r--r-- | src/core/arm/skyeye_common/vfp/vfpsingle.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/core/arm/skyeye_common/vfp/vfpsingle.cpp b/src/core/arm/skyeye_common/vfp/vfpsingle.cpp index 871900497..6c33d8b78 100644 --- a/src/core/arm/skyeye_common/vfp/vfpsingle.cpp +++ b/src/core/arm/skyeye_common/vfp/vfpsingle.cpp @@ -614,7 +614,7 @@ static u32 vfp_single_ftoui(ARMul_State* state, int sd, int unused, s32 m, u32 f exceptions |= FPSCR_IDC; if (tm & VFP_NAN) - vsm.sign = 0; + vsm.sign = 1; if (vsm.exponent >= 127 + 32) { d = vsm.sign ? 0 : 0xffffffff; @@ -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); } /* |