aboutsummaryrefslogtreecommitdiff
path: root/gdb/README
diff options
context:
space:
mode:
authorUlrich Weigand <ulrich.weigand@de.ibm.com>2017-11-22 13:53:43 +0100
committerUlrich Weigand <ulrich.weigand@de.ibm.com>2017-11-22 13:53:43 +0100
commit2400729ecfd2c7be8b18aeaa822fef5a4b503f8a (patch)
treed97f66e4c319d0634280907310a35f563fe5e70a /gdb/README
parent7a26362d360ee34de1e8e927bd7159860fe8354b (diff)
downloadbinutils-2400729ecfd2c7be8b18aeaa822fef5a4b503f8a.zip
binutils-2400729ecfd2c7be8b18aeaa822fef5a4b503f8a.tar.gz
binutils-2400729ecfd2c7be8b18aeaa822fef5a4b503f8a.tar.bz2
Target FP: Make use of MPFR if available
This second patch introduces mfpr_float_ops, an new implementation of target_float_ops. This implements precise emulation of target floating-point formats using the MPFR library. This is then used to perform operations on types that do not match any host type. Note that use of MPFR is still not required. The patch adds a configure option --with-mpfr similar to --with-expat. If use of MPFR is disabled via the option or MPFR is not available, code will fall back to current behavior. This means that operations on types that do not match any host type will be implemented on the host long double type instead. A new test case verifies that we can correctly print the largest __float128 value now. gdb/ChangeLog: 2017-11-22 Ulrich Weigand <uweigand@de.ibm.com> * NEWS: Document use of GNU MPFR. * README: Likewise. * Makefile.in (LIBMPFR): Add define. (CLIBS): Add $(LIBMPFR). * configure.ac: Add --with-mpfr configure option. * configure: Regenerate. * config.in: Regenerate. * target-float.c [HAVE_LIBMPFR]: Include <mpfr.h>. (class mpfr_float_ops): New type. (mpfr_float_ops::from_target): Two new overloaded functions. (mpfr_float_ops::to_target): Likewise. (mpfr_float_ops::to_string): New function. (mpfr_float_ops::from_string): Likewise. (mpfr_float_ops::to_longest): Likewise. (mpfr_float_ops::from_longest): Likewise. (mpfr_float_ops::from_ulongest): Likewise. (mpfr_float_ops::to_host_double): Likewise. (mpfr_float_ops::from_host_double): Likewise. (mpfr_float_ops::convert): Likewise. (mpfr_float_ops::binop): Likewise. (mpfr_float_ops::compare): Likewise. (get_target_float_ops): Use mpfr_float_ops if available. gdb/doc/ChangeLog: 2017-11-22 Ulrich Weigand <uweigand@de.ibm.com> * gdb.texinfo (Requirements): Document use of GNU MPFR. gdb/testsuite/ChangeLog: 2017-11-22 Ulrich Weigand <uweigand@de.ibm.com> * gdb.base/float128.c (large128): New variable. * gdb.base/float128.exp: Add test to print largest __float128 value.
Diffstat (limited to 'gdb/README')
-rw-r--r--gdb/README17
1 files changed, 17 insertions, 0 deletions
diff --git a/gdb/README b/gdb/README
index d485536..e43887f 100644
--- a/gdb/README
+++ b/gdb/README
@@ -89,6 +89,14 @@ features. Expat will be linked in if it is available at build time, or
those features will be disabled. The latest version of Expat should be
available from `http://expat.sourceforge.net'.
+ GDB uses GNU MPFR, a library for multiple-precision floating-point
+computation with correct rounding, to emulate target floating-point
+arithmetic during expression evaluation when the target uses different
+floating-point formats than the host. MPFR will be linked in if it is
+available at build time. If GNU MPFR it is not available, GDB will fall
+back to using host floating-point arithmetic. The latest version of
+GNU MPFR should be available from `http://www.mpfr.org'.
+
GDB can be used as a cross-debugger, running on a machine of one
type while debugging a program running on a machine of another type.
See below.
@@ -475,6 +483,15 @@ prefer; but you may abbreviate option names if you use `--'.
have libexpat installed, you can get the latest version from
http://expat.sourceforge.net.
+`--with-mpfr'
+ Build GDB with the GNU MPFR library. (Done by default if
+ GNU MPFR is installed and found at configure time.) This library
+ is used to emulate target floating-point arithmetic during expression
+ evaluation when the target uses different floating-point formats than
+ the host. If GNU MPFR is not available, GDB will fall back to using
+ host floating-point arithmetic. If your host does not have GNU MPFR
+ installed, you can get the latest version from http://www.mpfr.org.
+
`--with-python[=PATH]'
Build GDB with Python scripting support. (Done by default if
libpython is present and found at configure time.) Python makes