[PATCH] ARM: 2841/1: Fix VFP +/-0 case for doubles addition

Patch from Catalin Marinas

The IEEE 754 standard specifies that the result of (x - x), where x is
a valid number, should be -0 if the rounding mode is towards minus
infinity or +0 otherwise.

Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>

authored by Catalin Marinas and committed by Russell King 7b1fbf29 85829750

+3
+3
arch/arm/vfp/vfpdouble.c
··· 770 770 if ((s64)m_sig < 0) { 771 771 vdd->sign = vfp_sign_negate(vdd->sign); 772 772 m_sig = -m_sig; 773 + } else if (m_sig == 0) { 774 + vdd->sign = (fpscr & FPSCR_RMODE_MASK) == 775 + FPSCR_ROUND_MINUSINF ? 0x8000 : 0; 773 776 } 774 777 } else { 775 778 m_sig += vdn->significand;