[PATCH] obvious fix to dfp-bit.c (checked in)

Janis Johnson janis187@us.ibm.com
Wed Nov 29 23:25:00 GMT 2006

In an earlier patch I inadvertently changed the rounding mode used for
DFP to INT conversions without noticing that I had broken them.  Tested
on powerpc64-linux and checked into mainline as obvious.

2006-11-29  Janis Johnson  <janis187@us.ibm.com>

	* dfp-bit.c (DFP_TO_INT): Fix rounding mode.

Index: gcc/config/dfp-bit.c
--- gcc/config/dfp-bit.c	(revision 119331)
+++ gcc/config/dfp-bit.c	(working copy)
@@ -394,7 +394,7 @@
   decContextDefault (&context, CONTEXT_INIT);
   /* Need non-default rounding mode here.  */
-  DFP_INIT_ROUNDMODE (context.round);
+  context.round = DEC_ROUND_DOWN;
   HOST_TO_IEEE (x, &s);
   TO_INTERNAL (&s, &n1);

More information about the Gcc-patches mailing list