Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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>

authored by

Jay Foad and committed by
Russell King
244b4783 c39e1ef7

+4
+2
arch/arm/vfp/vfpdouble.c
··· 866 866 vdp.sign = vfp_sign_negate(vdp.sign); 867 867 868 868 vfp_double_unpack(&vdn, vfp_get_double(dd)); 869 + if (vdn.exponent == 0 && vdn.significand) 870 + vfp_double_normalise_denormal(&vdn); 869 871 if (negate & NEG_SUBTRACT) 870 872 vdn.sign = vfp_sign_negate(vdn.sign); 871 873
+2
arch/arm/vfp/vfpsingle.c
··· 915 915 v = vfp_get_float(sd); 916 916 pr_debug("VFP: s%u = %08x\n", sd, v); 917 917 vfp_single_unpack(&vsn, v); 918 + if (vsn.exponent == 0 && vsn.significand) 919 + vfp_single_normalise_denormal(&vsn); 918 920 if (negate & NEG_SUBTRACT) 919 921 vsn.sign = vfp_sign_negate(vsn.sign); 920 922