diff options
| author | Normmatt <normmatt234@gmail.com> | 2014-12-16 05:53:19 -0500 | 
|---|---|---|
| committer | Lioncash <mathew1800@gmail.com> | 2014-12-16 05:54:00 -0500 | 
| commit | 2ed03c10e03bbd0f513d157c577f1c75ae9ede5b (patch) | |
| tree | 5ee827081e5366694d3b999f5e76b9d04bc17070 /src/core/arm | |
| parent | 0fd731ee63bdde7030d0734beac27e393b870d7f (diff) | |
armemu: Fix FSUBS bug where NaN shouldn't be negated
Diffstat (limited to 'src/core/arm')
| -rw-r--r-- | src/core/arm/skyeye_common/vfp/vfpsingle.cpp | 5 | 
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);  }  /* | 
