Add usage to printf command
[deliverable/binutils-gdb.git] / gdb / target-float.c
index 32237ec9d9364b151cf1ba7d1a7e974a8d89411e..c2878cb0a08f11ff74192873c257f71d8fa6dc0a 100644 (file)
@@ -1,6 +1,6 @@
 /* Floating point routines for GDB, the GNU debugger.
 
-   Copyright (C) 2017 Free Software Foundation, Inc.
+   Copyright (C) 2017-2018 Free Software Foundation, Inc.
 
    This file is part of GDB.
 
@@ -1147,6 +1147,8 @@ host_float_ops<T>::compare (const gdb_byte *x, const struct type *type_x,
 
 #ifdef HAVE_LIBMPFR
 
+#define MPFR_USE_INTMAX_T
+
 #include <mpfr.h>
 
 class mpfr_float_ops : public target_float_ops
@@ -1310,7 +1312,7 @@ mpfr_float_ops::from_target (const struct floatformat *fmt,
 
       mant = get_field (from, order, fmt->totalsize, mant_off, mant_bits);
 
-      mpfr_set_si (tmp.val, mant, MPFR_RNDN);
+      mpfr_set_ui (tmp.val, mant, MPFR_RNDN);
       mpfr_mul_2si (tmp.val, tmp.val, exponent - mant_bits, MPFR_RNDN);
       mpfr_add (to.val, to.val, tmp.val, MPFR_RNDN);
       exponent -= mant_bits;
This page took 0.024514 seconds and 4 git commands to generate.