diff options
Diffstat (limited to 'src/core/arm/skyeye_common/vfp/vfpsingle.cpp')
-rw-r--r-- | src/core/arm/skyeye_common/vfp/vfpsingle.cpp | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/src/core/arm/skyeye_common/vfp/vfpsingle.cpp b/src/core/arm/skyeye_common/vfp/vfpsingle.cpp index 6b4cb8efa..1f9142abc 100644 --- a/src/core/arm/skyeye_common/vfp/vfpsingle.cpp +++ b/src/core/arm/skyeye_common/vfp/vfpsingle.cpp @@ -137,6 +137,19 @@ u32 vfp_single_normaliseround(ARMul_State* state, int sd, struct vfp_single* vs, #endif if (!(significand & ((1 << (VFP_SINGLE_LOW_BITS + 1)) - 1))) underflow = 0; + + int type = vfp_single_type(vs); + + if ((type & VFP_DENORMAL) && (fpscr & FPSCR_FLUSH_TO_ZERO)) { + // Flush denormal to positive 0 + significand = 0; + + vs->sign = 0; + vs->significand = significand; + + underflow = 0; + exceptions |= FPSCR_UFC; + } } /* |