From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 8784 invoked by alias); 18 Nov 2009 19:20:51 -0000 Received: (qmail 8775 invoked by uid 22791); 18 Nov 2009 19:20:50 -0000 X-SWARE-Spam-Status: No, hits=-2.3 required=5.0 tests=AWL,BAYES_00,SPF_PASS X-Spam-Check-By: sourceware.org Received: from e32.co.us.ibm.com (HELO e32.co.us.ibm.com) (32.97.110.150) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 18 Nov 2009 19:19:45 +0000 Received: from d03relay04.boulder.ibm.com (d03relay04.boulder.ibm.com [9.17.195.106]) by e32.co.us.ibm.com (8.14.3/8.13.1) with ESMTP id nAIJELsJ012264 for ; Wed, 18 Nov 2009 12:14:22 -0700 Received: from d03av02.boulder.ibm.com (d03av02.boulder.ibm.com [9.17.195.168]) by d03relay04.boulder.ibm.com (8.13.8/8.13.8/NCO v10.0) with ESMTP id nAIJJNTX044776 for ; Wed, 18 Nov 2009 12:19:24 -0700 Received: from d03av02.boulder.ibm.com (loopback [127.0.0.1]) by d03av02.boulder.ibm.com (8.14.3/8.13.1/NCO v10.0 AVout) with ESMTP id nAICCnas005552 for ; Wed, 18 Nov 2009 05:12:49 -0700 Received: from [9.47.18.88] (dyn9047018088.beaverton.ibm.com [9.47.18.88]) by d03av02.boulder.ibm.com (8.14.3/8.13.1/NCO v10.0 AVin) with ESMTP id nAICCmYf005501; Wed, 18 Nov 2009 05:12:48 -0700 Subject: Re: Supporting decimal float on additional platforms From: Janis Johnson Reply-To: janis187@us.ibm.com To: Rainer Orth Cc: gcc@gcc.gnu.org In-Reply-To: References: Content-Type: text/plain Date: Wed, 18 Nov 2009 19:20:00 -0000 Message-Id: <1258571958.6391.11.camel@janis-laptop> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit 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-11/txt/msg00470.txt.bz2 On Wed, 2009-11-18 at 19:19 +0100, Rainer Orth wrote: > I've recently looked into what it takes to support decimal float on > additional platforms (like Solaris, IRIX, and Tru64 UNIX in my case). > I've found no documentation, and while I could figure out some things > myself, I'd like to get some advice before continuing down that road. > > I found that --enable-decimal-float alone is not enough. One at least > needs to add config/t-dfprules to config.gcc, too. In addition, the > platform _scalar_mode_supported_p function needs to be augmented > accordingly. (I haven't tried this yet; it's just from code > inspection.) The target ABI needs to define how to handle the decimal32/64/128 data types. The compiler backend needs to implement that ABI for argument passing and function results, and needs to define which registers to use for those types. > Even if this works, I now think this won't be enough and probably not > even remotely useful (if only to pass parts of the testsuite) without > libc support for the new *printf/*scanf formats, which certainly won't > be added on legacy platforms like IRIX and Tru64 UNIX, and even on > Solaris probably won't show up until DFP is fully standardized. Much of the support for decimal floating types is in libraries that are outside the scope of the GCC project. This includes not just I/O but math functions and support for floating-point exceptions and rounding modes. That support is provided by the libdfp project hosted in the EGLIBC repository. libdfp currently supports only GNU/Linux targets, but that could be changed. Janis