2
1
Fork 0
mirror of https://github.com/yuzu-emu/yuzu.git synced 2024-07-04 23:31:19 +01:00

Merge pull request #2692 from Subv/vfp_ftz

Dyncom/VFP: Convert denormal outputs into 0 when the FTZ flag is enabled.
This commit is contained in:
Sebastian Valle 2017-05-22 12:16:53 -05:00 committed by GitHub
commit c291db72e7
2 changed files with 26 additions and 0 deletions

View file

@ -134,6 +134,19 @@ u32 vfp_double_normaliseround(ARMul_State* state, int dd, struct vfp_double* vd,
#endif #endif
if (!(significand & ((1ULL << (VFP_DOUBLE_LOW_BITS + 1)) - 1))) if (!(significand & ((1ULL << (VFP_DOUBLE_LOW_BITS + 1)) - 1)))
underflow = 0; underflow = 0;
int type = vfp_double_type(vd);
if ((type & VFP_DENORMAL) && (fpscr & FPSCR_FLUSH_TO_ZERO)) {
// Flush denormal to positive 0
significand = 0;
vd->sign = 0;
vd->significand = significand;
underflow = 0;
exceptions |= FPSCR_UFC;
}
} }
/* /*

View file

@ -137,6 +137,19 @@ u32 vfp_single_normaliseround(ARMul_State* state, int sd, struct vfp_single* vs,
#endif #endif
if (!(significand & ((1 << (VFP_SINGLE_LOW_BITS + 1)) - 1))) if (!(significand & ((1 << (VFP_SINGLE_LOW_BITS + 1)) - 1)))
underflow = 0; 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;
}
} }
/* /*