]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
backport: re PR libgcc/60166 (ARM default NAN encoding violates EABI)
authorJoey Ye <joey.ye@arm.com>
Fri, 28 Feb 2014 22:05:13 +0000 (22:05 +0000)
committerJoey Ye <jye2@gcc.gnu.org>
Fri, 28 Feb 2014 22:05:13 +0000 (22:05 +0000)
2014-02-28  Joey Ye  <joey.ye@arm.com>

Backport from mainline r208229
2014-02-28  Joey Ye  <joey.ye@arm.com>

        PR libgcc/60166
        * config/arm/sfp-machine.h (_FP_NANFRAC_H,
        _FP_NANFRAC_S, _FP_NANFRAC_D, _FP_NANFRAC_Q):
        Set to zero.

From-SVN: r208233

libgcc/ChangeLog
libgcc/config/arm/sfp-machine.h

index 87f3eab99795b39809c8682b8f5b714ab086ce8a..f87f51d82638a7859d59e2ce979b298acdd8eaee 100644 (file)
@@ -1,3 +1,13 @@
+014-02-28  Joey Ye  <joey.ye@arm.com>
+
+       Backport from mainline r208229
+       2014-02-28  Joey Ye  <joey.ye@arm.com>
+
+       PR libgcc/60166
+       * config/arm/sfp-machine.h (_FP_NANFRAC_H,
+       _FP_NANFRAC_S, _FP_NANFRAC_D, _FP_NANFRAC_Q):
+       Set to zero.
+
 2014-01-25  Walter Lee  <walt@tilera.com>
 
        Backport from mainline
index a89d05a00ba39f6f4b7759eb79e0510af30931e6..8591ab439e99e7ca7da7c5c93ff1bc6d36e1d1d4 100644 (file)
@@ -19,10 +19,12 @@ typedef int __gcc_CMPtype __attribute__ ((mode (__libgcc_cmp_return__)));
 #define _FP_DIV_MEAT_D(R,X,Y)  _FP_DIV_MEAT_2_udiv(D,R,X,Y)
 #define _FP_DIV_MEAT_Q(R,X,Y)  _FP_DIV_MEAT_4_udiv(Q,R,X,Y)
 
-#define _FP_NANFRAC_H          ((_FP_QNANBIT_H << 1) - 1)
-#define _FP_NANFRAC_S          ((_FP_QNANBIT_S << 1) - 1)
-#define _FP_NANFRAC_D          ((_FP_QNANBIT_D << 1) - 1), -1
-#define _FP_NANFRAC_Q          ((_FP_QNANBIT_Q << 1) - 1), -1, -1, -1
+/* According to RTABI, QNAN is only with the most significant bit of the
+   significand set, and all other significand bits zero.  */
+#define _FP_NANFRAC_H          0
+#define _FP_NANFRAC_S          0
+#define _FP_NANFRAC_D          0, 0
+#define _FP_NANFRAC_Q          0, 0, 0, 0
 #define _FP_NANSIGN_H          0
 #define _FP_NANSIGN_S          0
 #define _FP_NANSIGN_D          0