From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 2553 invoked by alias); 1 May 2004 12:53:45 -0000 Mailing-List: contact gdb-patches-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sources.redhat.com Received: (qmail 2538 invoked from network); 1 May 2004 12:53:44 -0000 Received: from unknown (HELO mx1.redhat.com) (66.187.233.31) by sources.redhat.com with SMTP; 1 May 2004 12:53:44 -0000 Received: from int-mx1.corp.redhat.com (int-mx1.corp.redhat.com [172.16.52.254]) by mx1.redhat.com (8.12.10/8.12.10) with ESMTP id i41CriKI012828; Sat, 1 May 2004 08:53:44 -0400 Received: from localhost.redhat.com (porkchop.devel.redhat.com [172.16.58.2]) by int-mx1.corp.redhat.com (8.11.6/8.11.6) with ESMTP id i41Crhv30902; Sat, 1 May 2004 08:53:43 -0400 Received: from gnu.org (localhost [127.0.0.1]) by localhost.redhat.com (Postfix) with ESMTP id 4D57B2B9D; Sat, 1 May 2004 08:53:40 -0400 (EDT) Message-ID: <40939DD4.3000706@gnu.org> Date: Sat, 01 May 2004 12:53:00 -0000 From: Andrew Cagney User-Agent: Mozilla/5.0 (X11; U; NetBSD macppc; en-GB; rv:1.4.1) Gecko/20040217 MIME-Version: 1.0 To: binutils@sources.redhat.com, gdb-patches@sources.redhat.com, dj@redhat.com Subject: [patch/rfc] Add host's floatformat Content-Type: multipart/mixed; boundary="------------070009060500030801080506" X-SW-Source: 2004-05/txt/msg00014.txt.bz2 This is a multi-part message in MIME format. --------------070009060500030801080506 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit Content-length: 200 Hello, This patch adds the host's floatformat (when known) to floatformat.[hc]. It lets us wack of a heap of bogus code in GDB's configury. DJ, any comments? I'll need to double commit. Andrew --------------070009060500030801080506 Content-Type: text/plain; name="diffs" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="diffs" Content-length: 3139 2004-04-30 Andrew Cagney * configure.ac: Define HOST_FLOAT_FORMAT, HOST_DOUBLE_FORMAT, and HOST_LONG_DOUBLE_FORMAT. * configure, config.in: Re-generate. * floatformat.c (floatformat_float, floatformat_double) (floatformat_long_double): Index: include/ChangeLog 2004-04-30 Andrew Cagney * floatformat.h (floatformat_float, floatformat_double) (floatformat_long_double): Declare. Index: libiberty/configure.ac =================================================================== RCS file: /cvs/src/src/libiberty/configure.ac,v retrieving revision 1.6 diff -p -u -r1.6 configure.ac --- libiberty/configure.ac 26 Apr 2004 18:23:59 -0000 1.6 +++ libiberty/configure.ac 1 May 2004 12:46:58 -0000 @@ -520,6 +520,28 @@ case "${host}" in esac AC_SUBST(pexecute) +# Figure out which floatformat to use. +case "${host}" in +i[34567]86-*-*) + host_float_format="&floatformat_ieee_single_little" + host_double_format="&floatformat_ieee_double_little" + host_long_double_format="&floatformat_i387_ext" + ;; +hppa*-*-linux*) + host_float_format="&floatformat_ieee_single_big" + host_double_format="&floatformat_ieee_double_big" + host_long_double_format="&floatformat_ieee_double_big" + ;; +*) + host_float_format=0 + host_double_format=0 + host_long_double_format=0 + ;; +esac +AC_DEFINE_UNQUOTED(HOST_FLOAT_FORMAT,$host_float_format,[Host float floatformat]) +AC_DEFINE_UNQUOTED(HOST_DOUBLE_FORMAT,$host_double_format,[Host double floatformat]) +AC_DEFINE_UNQUOTED(HOST_LONG_DOUBLE_FORMAT,$host_long_double_format,[Host long double floatformat]) + libiberty_AC_FUNC_STRNCMP # Install a library built with a cross compiler in $(tooldir) rather Index: libiberty/floatformat.c =================================================================== RCS file: /cvs/src/src/libiberty/floatformat.c,v retrieving revision 1.12 diff -p -u -r1.12 floatformat.c --- libiberty/floatformat.c 3 Dec 2003 19:03:29 -0000 1.12 +++ libiberty/floatformat.c 1 May 2004 12:46:58 -0000 @@ -548,6 +548,10 @@ floatformat_is_valid (fmt, from) return fmt->is_valid (fmt, from); } +/* If non-NULL, the host's floatformat. */ +const struct floatformat *const floatformat_float = HOST_FLOAT_FORMAT; +const struct floatformat *const floatformat_double = HOST_DOUBLE_FORMAT; +const struct floatformat *const floatformat_long_double = HOST_LONG_DOUBLE_FORMAT; #ifdef IEEE_DEBUG Index: include/floatformat.h =================================================================== RCS file: /cvs/src/src/include/floatformat.h,v retrieving revision 1.9 diff -p -u -r1.9 floatformat.h --- include/floatformat.h 22 Sep 2003 17:41:02 -0000 1.9 +++ include/floatformat.h 1 May 2004 12:47:00 -0000 @@ -130,4 +130,9 @@ floatformat_from_double PARAMS ((const s extern int floatformat_is_valid PARAMS ((const struct floatformat *fmt, const char *from)); +/* If non-NULL, the host's floatformat. */ +extern const struct floatformat *const floatformat_float; +extern const struct floatformat *const floatformat_double; +extern const struct floatformat *const floatformat_long_double; + #endif /* defined (FLOATFORMAT_H) */ --------------070009060500030801080506--