]> err.no Git - linux-2.6/commitdiff
[ARM] 3758/1: Preserve signalling NaNs in conversion
authorDaniel Jacobowitz <drow@false.org>
Sun, 27 Aug 2006 11:42:14 +0000 (12:42 +0100)
committerRussell King <rmk+kernel@arm.linux.org.uk>
Sun, 27 Aug 2006 11:42:14 +0000 (12:42 +0100)
Patch from Daniel Jacobowitz

The fcvtds and fcvtsd instructions were generating a qnan bit pattern
for both quiet and signalling NaNs.

Signed-off-by: Daniel Jacobowitz <dan@codesourcery.com>
Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
arch/arm/vfp/vfpdouble.c
arch/arm/vfp/vfpsingle.c

index 021581680e94b7bffbb7ef238b1b259c6870033e..04bd3425b29b0f2d83a3b1c3f57dcb42854f7567 100644 (file)
@@ -465,7 +465,7 @@ static u32 vfp_double_fcvts(int sd, int unused, int dm, u32 fpscr)
         */
        if (tm & (VFP_INFINITY|VFP_NAN)) {
                vsd.exponent = 255;
-               if (tm & VFP_NAN)
+               if (tm == VFP_QNAN)
                        vsd.significand |= VFP_SINGLE_SIGNIFICAND_QNAN;
                goto pack_nan;
        } else if (tm & VFP_ZERO)
index 5bbd5d1c8a5f707f8a7e587a852f85d8ec3499ad..78d7cac5f36b79ee45fa9c737b8fca051f55a153 100644 (file)
@@ -506,7 +506,7 @@ static u32 vfp_single_fcvtd(int dd, int unused, s32 m, u32 fpscr)
         */
        if (tm & (VFP_INFINITY|VFP_NAN)) {
                vdd.exponent = 2047;
-               if (tm & VFP_NAN)
+               if (tm == VFP_QNAN)
                        vdd.significand |= VFP_DOUBLE_SIGNIFICAND_QNAN;
                goto pack_nan;
        } else if (tm & VFP_ZERO)