summaryrefslogtreecommitdiffstats
path: root/src/core/arm
diff options
context:
space:
mode:
authorbunnei <bunneidev@gmail.com>2015-02-10 16:09:45 +0100
committerbunnei <bunneidev@gmail.com>2015-02-10 16:09:45 +0100
commit67db6aa4ce1f57f7d99406c8924ed41e74d36dbe (patch)
treea2a0cfc5626629e7de3d5624d31943f4ce006196 /src/core/arm
parentMerge pull request #554 from lioncash/cp15 (diff)
parentvfp: Normalize accumulator for multiply accumulate instructions (diff)
downloadyuzu-67db6aa4ce1f57f7d99406c8924ed41e74d36dbe.tar
yuzu-67db6aa4ce1f57f7d99406c8924ed41e74d36dbe.tar.gz
yuzu-67db6aa4ce1f57f7d99406c8924ed41e74d36dbe.tar.bz2
yuzu-67db6aa4ce1f57f7d99406c8924ed41e74d36dbe.tar.lz
yuzu-67db6aa4ce1f57f7d99406c8924ed41e74d36dbe.tar.xz
yuzu-67db6aa4ce1f57f7d99406c8924ed41e74d36dbe.tar.zst
yuzu-67db6aa4ce1f57f7d99406c8924ed41e74d36dbe.zip
Diffstat (limited to 'src/core/arm')
-rw-r--r--src/core/arm/skyeye_common/vfp/vfpdouble.cpp3
-rw-r--r--src/core/arm/skyeye_common/vfp/vfpsingle.cpp3
2 files changed, 6 insertions, 0 deletions
diff --git a/src/core/arm/skyeye_common/vfp/vfpdouble.cpp b/src/core/arm/skyeye_common/vfp/vfpdouble.cpp
index 2c15db12b..9a7088088 100644
--- a/src/core/arm/skyeye_common/vfp/vfpdouble.cpp
+++ b/src/core/arm/skyeye_common/vfp/vfpdouble.cpp
@@ -908,6 +908,9 @@ vfp_double_multiply_accumulate(ARMul_State* state, int dd, int dn, int dm, u32 f
vdp.sign = vfp_sign_negate(vdp.sign);
vfp_double_unpack(&vdn, vfp_get_double(state, dd));
+ if (vdn.exponent == 0 && vdn.significand != 0)
+ vfp_double_normalise_denormal(&vdn);
+
if (negate & NEG_SUBTRACT)
vdn.sign = vfp_sign_negate(vdn.sign);
diff --git a/src/core/arm/skyeye_common/vfp/vfpsingle.cpp b/src/core/arm/skyeye_common/vfp/vfpsingle.cpp
index 678b63f51..8b2dfa388 100644
--- a/src/core/arm/skyeye_common/vfp/vfpsingle.cpp
+++ b/src/core/arm/skyeye_common/vfp/vfpsingle.cpp
@@ -941,6 +941,9 @@ vfp_single_multiply_accumulate(ARMul_State* state, int sd, int sn, s32 m, u32 fp
v = vfp_get_float(state, sd);
pr_debug("VFP: s%u = %08x\n", sd, v);
vfp_single_unpack(&vsn, v);
+ if (vsn.exponent == 0 && vsn.significand != 0)
+ vfp_single_normalise_denormal(&vsn);
+
if (negate & NEG_SUBTRACT)
vsn.sign = vfp_sign_negate(vsn.sign);