diff options
author | Jannik Vogel <email@jannikvogel.de> | 2016-05-16 11:11:16 +0200 |
---|---|---|
committer | Jannik Vogel <email@jannikvogel.de> | 2016-05-18 15:24:42 +0200 |
commit | 693cca8f1f069ddd88a3f47f94fae5e53712ded4 (patch) | |
tree | 0c6bad361aae029c3c1c404368ac8c0bdab3f9da /src/core/arm/skyeye_common/vfp/vfp_helper.h | |
parent | Fix exception propagation for VFP double precision (diff) | |
download | yuzu-693cca8f1f069ddd88a3f47f94fae5e53712ded4.tar yuzu-693cca8f1f069ddd88a3f47f94fae5e53712ded4.tar.gz yuzu-693cca8f1f069ddd88a3f47f94fae5e53712ded4.tar.bz2 yuzu-693cca8f1f069ddd88a3f47f94fae5e53712ded4.tar.lz yuzu-693cca8f1f069ddd88a3f47f94fae5e53712ded4.tar.xz yuzu-693cca8f1f069ddd88a3f47f94fae5e53712ded4.tar.zst yuzu-693cca8f1f069ddd88a3f47f94fae5e53712ded4.zip |
Diffstat (limited to 'src/core/arm/skyeye_common/vfp/vfp_helper.h')
-rw-r--r-- | src/core/arm/skyeye_common/vfp/vfp_helper.h | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/core/arm/skyeye_common/vfp/vfp_helper.h b/src/core/arm/skyeye_common/vfp/vfp_helper.h index c1cc4fd7e..c66a3fad4 100644 --- a/src/core/arm/skyeye_common/vfp/vfp_helper.h +++ b/src/core/arm/skyeye_common/vfp/vfp_helper.h @@ -271,8 +271,9 @@ inline int vfp_single_type(const vfp_single* s) // Unpack a single-precision float. Note that this returns the magnitude // of the single-precision float mantissa with the 1. if necessary, // aligned to bit 30. -inline void vfp_single_unpack(vfp_single* s, s32 val, u32* fpscr) +inline u32 vfp_single_unpack(vfp_single* s, s32 val, u32 fpscr) { + u32 exceptions = 0; s->sign = vfp_single_packed_sign(val) >> 16, s->exponent = vfp_single_packed_exponent(val); @@ -283,12 +284,13 @@ inline void vfp_single_unpack(vfp_single* s, s32 val, u32* fpscr) // If flush-to-zero mode is enabled, turn the denormal into zero. // On a VFPv2 architecture, the sign of the zero is always positive. - if ((*fpscr & FPSCR_FLUSH_TO_ZERO) != 0 && (vfp_single_type(s) & VFP_DENORMAL) != 0) { + if ((fpscr & FPSCR_FLUSH_TO_ZERO) != 0 && (vfp_single_type(s) & VFP_DENORMAL) != 0) { s->sign = 0; s->exponent = 0; s->significand = 0; - *fpscr |= FPSCR_IDC; + exceptions |= FPSCR_IDC; } + return exceptions; } // Re-pack a single-precision float. This assumes that the float is |