From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 17403 invoked by alias); 15 Sep 2006 16:26:02 -0000 Received: (qmail 17370 invoked by alias); 15 Sep 2006 16:25:51 -0000 Date: Fri, 15 Sep 2006 16:26:00 -0000 Message-ID: <20060915162551.17369.qmail@sourceware.org> From: "joseph at codesourcery dot com" To: glibc-bugs@sources.redhat.com In-Reply-To: <20060609223502.2749.sjmunroe@us.ibm.com> References: <20060609223502.2749.sjmunroe@us.ibm.com> Reply-To: sourceware-bugzilla@sourceware.org Subject: [Bug ports/2749] powerpc32 does not build --without-fp X-Bugzilla-Reason: CC Mailing-List: contact glibc-bugs-help@sourceware.org; run by ezmlm Precedence: bulk List-Subscribe: List-Post: List-Help: , Sender: glibc-bugs-owner@sourceware.org X-SW-Source: 2006-09/txt/msg00068.txt.bz2 List-Id: ------- Additional Comments From joseph at codesourcery dot com 2006-09-15 16:25 ------- Subject: Re: powerpc32 does not build --without-fp On Fri, 15 Sep 2006, sjmunroe at us dot ibm dot com wrote: > ------- Additional Comments From sjmunroe at us dot ibm dot com 2006-09-15 15:11 ------- > Created an attachment (id=1298) --> (http://sourceware.org/bugzilla/attachment.cgi?id=1298&action=view) > --> (http://sourceware.org/bugzilla/attachment.cgi?id=1298&action=view) > Updated gcc-4.2 patch with fmsub soft-fp implement > > This patch implements updated darwin-ldouble.c to add a soft-fp implementation > of fmsub plus fixes to the FP_SUB_Q support. Note that the soft-fp fix must be accepted for glibc mainline before it can go in libgcc's copy, as per FSF policies. It looks OK to me but I have no approval rights for glibc's master copy, only for the GCC copy (which effectively means for the build infrastructure integration, i.e. the one file t-softfp). For the fmsub implementation, you do FP_PACK_SEMIRAW_Q between the subtraction and the truncation. This is not correct since it can lead to double rounding (first the value is rounded to a quad value exactly half way between two double values, then it gets rounded to a double value that wasn't the closest to the infinite-precision result). The truncation needs to be done on the output of the subtraction with sticky bits still in place, not on the rounded result. I think the bulk of the fmsub implementation should go in a macro in op-common.h, that could be used to implement the standard fma and fmaf library functions. It would need to take fs and wc for both the type in question and the double width type, and arguments for the three inputs and the result, and for whether it's to calculate a*b+c or a*b-c. Maybe also for the type of the long double temporaries you use, but I hope that you can avoid the explicit packing and unpacking into quad representation. -- http://sourceware.org/bugzilla/show_bug.cgi?id=2749 ------- You are receiving this mail because: ------- You are on the CC list for the bug, or are watching someone who is.