This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

PATCH: avoid libdecnumber "local" change


Along the way, a "GCC-local" macro was added to decNumber.h to negate
a decNumber and gcc/dfp.c uses that macro.  This makes importing new
decNumber versions unnecessarily difficult, so I'd rather just remove
the local macro and substitute its definition in the one place it's
invoked.  Tested with a bootstrap on i686-pc-linux-gnu.

Okay for the trunk, or shall I let this stay put for stage 1?

Cheers, Ben

2006-05-30  Ben Elliston  <bje@au.ibm.com>

        * dfp.c (decimal_to_decnumber): Do not use decNumberNegate to
        negate dn -- manipulate it directly.

Index: gcc/dfp.c
===================================================================
--- gcc/dfp.c   (revision 114226)
+++ gcc/dfp.c   (working copy)
@@ -137,7 +137,7 @@ decimal_to_decnumber (const REAL_VALUE_T
 
   /* Fix up sign bit.  */
   if (r->sign != decNumberIsNegative (dn))
-    decNumberNegate (dn);
+    dn->bits ^= DECNEG;
 }
 
 /* Encode a real into an IEEE 754R decimal32 type.  */


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]