diff options
author | Jay Foad <jay.foad@gmail.com> | 2014-04-14 17:23:15 +0200 |
---|---|---|
committer | Russell King <rmk+kernel@arm.linux.org.uk> | 2014-04-15 00:28:24 +0200 |
commit | 244b478386260a8a9150b501bc97644e2e07f8d3 (patch) | |
tree | f7127bc02f4722ab1b47b16920ee402bae68b965 /arch/arm/vfp/vfpsingle.c | |
parent | ARM: 8024/1: Keep DEBUG_UART_{PHYS,VIRT} entries sorted (diff) | |
download | linux-244b478386260a8a9150b501bc97644e2e07f8d3.tar.xz linux-244b478386260a8a9150b501bc97644e2e07f8d3.zip |
ARM: 8026/1: Fix emulation of multiply accumulate instructions
The emulation for single and double precision multiply accumulate
instructions correctly normalised any denormal values in the operand
registers, but failed to normalise the destination (accumulator)
register.
This fixes https://bugzilla.kernel.org/show_bug.cgi?id=70501
Signed-off-by: Jay Foad <jay.foad@gmail.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
Diffstat (limited to 'arch/arm/vfp/vfpsingle.c')
-rw-r--r-- | arch/arm/vfp/vfpsingle.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/arch/arm/vfp/vfpsingle.c b/arch/arm/vfp/vfpsingle.c index b252631b406b..4f96c1617aae 100644 --- a/arch/arm/vfp/vfpsingle.c +++ b/arch/arm/vfp/vfpsingle.c @@ -915,6 +915,8 @@ vfp_single_multiply_accumulate(int sd, int sn, s32 m, u32 fpscr, u32 negate, cha v = vfp_get_float(sd); pr_debug("VFP: s%u = %08x\n", sd, v); vfp_single_unpack(&vsn, v); + if (vsn.exponent == 0 && vsn.significand) + vfp_single_normalise_denormal(&vsn); if (negate & NEG_SUBTRACT) vsn.sign = vfp_sign_negate(vsn.sign); |