From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 30001 invoked by alias); 23 Sep 2009 08:29:20 -0000 Received: (qmail 29981 invoked by uid 22791); 23 Sep 2009 08:29:19 -0000 X-SWARE-Spam-Status: No, hits=-1.5 required=5.0 tests=AWL,BAYES_00,J_CHICKENPOX_32,SARE_MSGID_LONG40,SPF_PASS X-Spam-Check-By: sourceware.org Received: from mail-vw0-f178.google.com (HELO mail-vw0-f178.google.com) (209.85.212.178) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 23 Sep 2009 08:29:13 +0000 Received: by vws8 with SMTP id 8so319319vws.14 for ; Wed, 23 Sep 2009 01:29:12 -0700 (PDT) MIME-Version: 1.0 Received: by 10.220.89.82 with SMTP id d18mr3163164vcm.34.1253694552101; Wed, 23 Sep 2009 01:29:12 -0700 (PDT) In-Reply-To: <1253666313.6130.8.camel@janis-laptop> References: <1253666313.6130.8.camel@janis-laptop> Date: Wed, 23 Sep 2009 08:29:00 -0000 Message-ID: <84fc9c000909230129w167878ccn2b3402b7305d1366@mail.gmail.com> Subject: Re: C++ support for decimal floating point From: Richard Guenther To: janis187@us.ibm.com Cc: gcc@gcc.gnu.org, libstdc++@gcc.gnu.org Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-IsSubscribed: yes Mailing-List: contact gcc-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Archive: List-Post: List-Help: Sender: gcc-owner@gcc.gnu.org X-SW-Source: 2009-09/txt/msg00453.txt.bz2 On Wed, Sep 23, 2009 at 2:38 AM, Janis Johnson wrote: > I've been implementing ISO/IEC TR 24733, "an extension for the > programming language C++ to support decimal floating-point arithmetic", > in GCC. =A0It might be ready as an experimental feature for 4.5, but I > would particularly like to get in the compiler changes that are needed > for it. > > Most of the support for the TR is in new header files in libstdc++ that > depend on compiler support for decimal float scalar types. =A0Most of that > compiler functionality was already available in G++ via mode attributes. > I've made a couple of small fixes and have a couple more to submit, and > when those are in I'll starting running dfp tests for C++ as well as C. > The suitable tests have already been moved from gcc.dg to c-c++-common. > > In order to provide interoperability with C, people on the C++ ABI > mailing list suggested that a C++ compiler should recognize the new > decimal classes defined in the TR and pass arguments of those types the > same as scalar decimal float types for a particular target. =A0I had this > working in an ugly way using a langhook, but that broke with LTO. =A0I'm > looking for the right places to record that an argument or return value > should be passed as if it were a different type, but could use some > advice about that. How do we (do we?) handle std::complex<> there? My first shot would be to make sure the aggregate type has the proper mode, but I guess most target ABIs would already pass them in registers, no? Richard.