From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11480 invoked by alias); 22 Jul 2011 14:55:33 -0000 Received: (qmail 11469 invoked by uid 22791); 22 Jul 2011 14:55:33 -0000 X-SWARE-Spam-Status: No, hits=-2.4 required=5.0 tests=AWL,BAYES_00,RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from snape.CeBiTec.Uni-Bielefeld.DE (HELO smtp-relay.CeBiTec.Uni-Bielefeld.DE) (129.70.160.84) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 22 Jul 2011 14:55:15 +0000 Received: from localhost (localhost.CeBiTec.Uni-Bielefeld.DE [127.0.0.1]) by smtp-relay.CeBiTec.Uni-Bielefeld.DE (Postfix) with ESMTP id 7E139805; Fri, 22 Jul 2011 16:55:14 +0200 (CEST) Received: from smtp-relay.CeBiTec.Uni-Bielefeld.DE ([127.0.0.1]) by localhost (malfoy.CeBiTec.Uni-Bielefeld.DE [127.0.0.1]) (amavisd-new, port 10024) with LMTP id z6hpY+1vmOxy; Fri, 22 Jul 2011 16:55:12 +0200 (CEST) Received: from manam.CeBiTec.Uni-Bielefeld.DE (manam.CeBiTec.Uni-Bielefeld.DE [129.70.161.120]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp-relay.CeBiTec.Uni-Bielefeld.DE (Postfix) with ESMTPS id 88BB5803; Fri, 22 Jul 2011 16:55:12 +0200 (CEST) Received: (from ro@localhost) by manam.CeBiTec.Uni-Bielefeld.DE (8.14.5+Sun/8.14.5/Submit) id p6MEtBZb003526; Fri, 22 Jul 2011 16:55:11 +0200 (MEST) From: Rainer Orth To: "Joseph S. Myers" Cc: gcc-patches@gcc.gnu.org, Paolo Bonzini , Ian Lance Taylor , Richard Sandiford Subject: Re: CFT: [build] Move fp-bit support to toplevel libgcc References: Date: Fri, 22 Jul 2011 15:30:00 -0000 In-Reply-To: (Joseph S. Myers's message of "Thu, 21 Jul 2011 15:59:07 +0000 (UTC)") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.3 (usg-unix-v) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-IsSubscribed: yes Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org X-SW-Source: 2011-07/txt/msg01968.txt.bz2 Joseph, >> -tp-bit.c: $(srcdir)/config/fp-bit.c >> - echo '#ifdef __MIPSEL__' > tp-bit.c >> - echo '# define FLOAT_BIT_ORDER_MISMATCH' >> tp-bit.c >> - echo '#endif' >> tp-bit.c >> - echo '#if __LDBL_MANT_DIG__ == 113' >> tp-bit.c >> - echo '#define QUIET_NAN_NEGATED' >> tp-bit.c >> - echo '# define TFLOAT' >> tp-bit.c >> - cat $(srcdir)/config/fp-bit.c >> tp-bit.c >> - echo '#endif' >> tp-bit.c > > How does your code replace the "#if __LDBL_MANT_DIG__ == 113" condition > that stops tp-bit.c being built for o32 multilibs that don't have TFmode? Richard Sandiford already pointed this out in private mail. My initial analysis was based on the IRIX case, where long double has __LDBL_MANT_DIG__ = 106 (ibm extended format), which is used for all supported ABIs. Unfortunately, I forgot that at least Linux/MIPS still supports (or even defaults to) the O32 ABI, where double and long double are both 64-bit. > (The best way would I think be configure tests in libgcc that cause > tp-bit.c only to be built at all for the relevant multilibs for this > target.) That's one option, which I currently prefer. RX has a similar issue, where I sort of solved it like this ifneq ($(filter -m64bit-doubles,$(INTERNAL_CFLAGS)),) DPBIT = true endif but it seems this cannot reliably be done on mips. I see two possible solutions: * Provide fpbit_wrap_start/fpbit_wrap_end as in soft-fp, which is a general solution. * Use configure tests. My current preference would be to use AC_CHECK_SIZEOF([double]) (for rx) and AC_CHECK_SIZEOF([long double]) (for mips) and substitute ac_cv_sizeof_double/ac_cv_sizeof_long_double (perhaps * 8) as make variables to do the test above. Preferences? Rainer -- ----------------------------------------------------------------------------- Rainer Orth, Center for Biotechnology, Bielefeld University