From patchwork Mon Nov 20 13:44:12 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Ulrich Weigand X-Patchwork-Id: 24366 Received: (qmail 17218 invoked by alias); 20 Nov 2017 13:44:30 -0000 Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org Delivered-To: mailing list gdb-patches@sourceware.org Received: (qmail 17200 invoked by uid 89); 20 Nov 2017 13:44:28 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-15.3 required=5.0 tests=AWL, BAYES_00, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, KAM_ASCII_DIVIDERS, KB_WAM_FROM_NAME_SINGLEWORD, KHOP_DYNAMIC, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=ham version=3.3.2 spammy=gdbpatchessourcewareorg, U*gdb-patches, gdb-patches@sourceware.org, sk:gdb-pat X-HELO: mx0a-001b2d01.pphosted.com Received: from mx0a-001b2d01.pphosted.com (HELO mx0a-001b2d01.pphosted.com) (148.163.156.1) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Mon, 20 Nov 2017 13:44:26 +0000 Received: from pps.filterd (m0098393.ppops.net [127.0.0.1]) by mx0a-001b2d01.pphosted.com (8.16.0.21/8.16.0.21) with SMTP id vAKDiMAO000809 for ; Mon, 20 Nov 2017 08:44:25 -0500 Received: from e06smtp15.uk.ibm.com (e06smtp15.uk.ibm.com [195.75.94.111]) by mx0a-001b2d01.pphosted.com with ESMTP id 2ebykhjqxx-1 (version=TLSv1.2 cipher=AES256-SHA bits=256 verify=NOT) for ; Mon, 20 Nov 2017 08:44:24 -0500 Received: from localhost by e06smtp15.uk.ibm.com with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted for from ; Mon, 20 Nov 2017 13:44:16 -0000 Received: from b06cxnps3075.portsmouth.uk.ibm.com (9.149.109.195) by e06smtp15.uk.ibm.com (192.168.101.145) with IBM ESMTP SMTP Gateway: Authorized Use Only! Violators will be prosecuted; Mon, 20 Nov 2017 13:44:13 -0000 Received: from d06av26.portsmouth.uk.ibm.com (d06av26.portsmouth.uk.ibm.com [9.149.105.62]) by b06cxnps3075.portsmouth.uk.ibm.com (8.14.9/8.14.9/NCO v10.0) with ESMTP id vAKDiDYh1180094; Mon, 20 Nov 2017 13:44:13 GMT Received: from d06av26.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 67FEFAE055; Mon, 20 Nov 2017 13:37:31 +0000 (GMT) Received: from d06av26.portsmouth.uk.ibm.com (unknown [127.0.0.1]) by IMSVA (Postfix) with ESMTP id 50CAEAE053; Mon, 20 Nov 2017 13:37:31 +0000 (GMT) Received: from oc3748833570.ibm.com (unknown [9.152.213.29]) by d06av26.portsmouth.uk.ibm.com (Postfix) with ESMTP; Mon, 20 Nov 2017 13:37:31 +0000 (GMT) Received: by oc3748833570.ibm.com (Postfix, from userid 1000) id 0F07CD802C3; Mon, 20 Nov 2017 14:44:13 +0100 (CET) Subject: Doc update to mention MPFR (Re: [RFC][00/19] Target FP: Precise target floating-point emulation) To: eliz@gnu.org Date: Mon, 20 Nov 2017 14:44:12 +0100 (CET) From: "Ulrich Weigand" Cc: brobecker@adacore.com, gdb-patches@sourceware.org In-Reply-To: <83h8tuhvnk.fsf@gnu.org> from "Eli Zaretskii" at Nov 16, 2017 09:26:55 PM MIME-Version: 1.0 X-TM-AS-GCONF: 00 x-cbid: 17112013-0020-0000-0000-000003CE75CA X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 17112013-0021-0000-0000-00004263BD04 Message-Id: <20171120134413.0F07CD802C3@oc3748833570.ibm.com> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:, , definitions=2017-11-20_07:, , signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 priorityscore=1501 malwarescore=0 suspectscore=1 phishscore=0 bulkscore=0 spamscore=0 clxscore=1011 lowpriorityscore=0 impostorscore=0 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1709140000 definitions=main-1711200186 Eli Zaretskii wrote: > > Date: Thu, 16 Nov 2017 20:05:59 +0100 (CET) > > From: "Ulrich Weigand" > > Cc: eliz@gnu.org (Eli Zaretskii), gdb-patches@sourceware.org > > > > I've just posted an updated set of patches that implements the > > suggestion to use host FP if the format matches, and MPFR if not. > > To keep code complexity down, this is done by encapsulating the > > operations in an abstract base class with multiple implementations. > > https://sourceware.org/ml/gdb-patches/2017-11/msg00323.html > > https://sourceware.org/ml/gdb-patches/2017-11/msg00324.html > > > > Does this address your concerns? > > Yes, thank you very much. Thanks for confirming! I just noticed that I forgot to update the docs to mention MPFR. The following patch adds this to README and gdb.texinfo in the same places where libexpat is mentioned. It also add a brief mention to NEWS. Is this OK? Thanks, Ulrich gdb/ChangeLog: * NEWS: Document use of GNU MPFR. * README: Likewise. * doc/gdb.texinfo: Likewise Index: binutils-gdb/gdb/NEWS =================================================================== --- binutils-gdb.orig/gdb/NEWS +++ binutils-gdb/gdb/NEWS @@ -3,6 +3,10 @@ *** Changes since GDB 8.0 +* GDB now uses the GNU MPFR library, if available, to emulate target + floating-point arithmetic during expression evaluation when the target + uses different floating-point formats than the host. + * GDB now supports access to the guarded-storage-control registers and the software-based guarded-storage broadcast control registers on IBM z14. Index: binutils-gdb/gdb/README =================================================================== --- binutils-gdb.orig/gdb/README +++ binutils-gdb/gdb/README @@ -89,6 +89,15 @@ features. Expat will be linked in if it 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. At least version 3.1 of GNU MPFR is required. +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 +484,16 @@ prefer; but you may abbreviate option na 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. At least version 3.1 of GNU MPFR is required. 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 Index: binutils-gdb/gdb/doc/gdb.texinfo =================================================================== --- binutils-gdb.orig/gdb/doc/gdb.texinfo +++ binutils-gdb/gdb/doc/gdb.texinfo @@ -34270,6 +34270,22 @@ Branch trace (@pxref{Branch Trace Format @pxref{Branch Trace Configuration Format}) @end itemize +@item MPFR +@anchor{MPFR} +@value{GDBN} can use the GNU MPFR multiple-precision floating-point +library. This library may be included with your operating system +distribution; if it is not, you can get the latest version from +@url{http://www.mpfr.org}. At least version 3.1 of GNU MPFR is +required. The @file{configure} script will search for this library +in several standard locations; if it is installed in an unusual path, +you can use the @option{--with-libmpfr-prefix} option to specify +its location. + +GNU MPFR 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 it is not available, GDB will +fall back to using host floating-point arithmetic. + @item zlib @cindex compressed debug sections @value{GDBN} will use the @samp{zlib} library, if available, to read