This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
PATCH: avoid libdecnumber "local" change
- From: Ben Elliston <bje at au1 dot ibm dot com>
- To: gcc-patches at gcc dot gnu dot org
- Date: Tue, 30 May 2006 11:39:48 +1000
- Subject: 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. */