diff options
Diffstat (limited to 'src/core/arm/skyeye_common/vfp/vfpdouble.cpp')
-rw-r--r-- | src/core/arm/skyeye_common/vfp/vfpdouble.cpp | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/core/arm/skyeye_common/vfp/vfpdouble.cpp b/src/core/arm/skyeye_common/vfp/vfpdouble.cpp index 2886f351f..49c192dd3 100644 --- a/src/core/arm/skyeye_common/vfp/vfpdouble.cpp +++ b/src/core/arm/skyeye_common/vfp/vfpdouble.cpp @@ -135,6 +135,21 @@ u32 vfp_double_normaliseround(ARMul_State* state, int dd, struct vfp_double* vd, #endif if (!(significand & ((1ULL << (VFP_DOUBLE_LOW_BITS + 1)) - 1))) underflow = 0; + + int type = vfp_double_type(vd); + + if ((type & VFP_DENORMAL) && (fpscr & FPSCR_FLUSH_TO_ZERO)) { + // Flush denormal to positive 0 + exponent = 0; + significand = 0; + + vd->sign = 0; + vd->exponent = exponent; + vd->significand = significand; + + underflow = 0; + exceptions |= FPSCR_UFC; + } } /* |