summaryrefslogtreecommitdiff
path: root/gcc/config/dfp-bit.c
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/config/dfp-bit.c')
-rw-r--r--gcc/config/dfp-bit.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/gcc/config/dfp-bit.c b/gcc/config/dfp-bit.c
index d315d5b56f0..19f2fdae67d 100644
--- a/gcc/config/dfp-bit.c
+++ b/gcc/config/dfp-bit.c
@@ -568,7 +568,6 @@ INT_TO_DFP (INT_TYPE i)
decContext context;
decContextDefault (&context, DEC_INIT_DECIMAL128);
- context.round = DEC_ROUND_DOWN;
f64 = *DEC_FLOAT_FROM_INT (&f64, i);
u32.f = *decSingleFromWider (&u32.f, &f64, &context);
if (DFP_EXCEPTIONS_ENABLED && context.status != 0)
@@ -593,7 +592,7 @@ INT_TO_DFP (INT_TYPE i)
DFP_INIT_ROUNDMODE (context.round);
/* Use a C library function to get a floating point string. */
- sprintf (buf, INT_FMT ".0", CAST_FOR_FMT(i));
+ sprintf (buf, INT_FMT ".", CAST_FOR_FMT(i));
/* Convert from the floating point string to a decimal* type. */
FROM_STRING (&s, buf, &context);
IEEE_TO_HOST (s, &f);