From owner-cvs-src@FreeBSD.ORG Sat Aug 23 14:26:33 2003 Return-Path: Delivered-To: cvs-src@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9B14616A4BF; Sat, 23 Aug 2003 14:26:33 -0700 (PDT) Received: from HAL9000.homeunix.com (12-233-57-131.client.attbi.com [12.233.57.131]) by mx1.FreeBSD.org (Postfix) with ESMTP id 62BA843FDD; Sat, 23 Aug 2003 14:26:30 -0700 (PDT) (envelope-from das@FreeBSD.ORG) Received: from HAL9000.homeunix.com (localhost [127.0.0.1]) by HAL9000.homeunix.com (8.12.9/8.12.9) with ESMTP id h7NLQctT011940; Sat, 23 Aug 2003 14:26:38 -0700 (PDT) (envelope-from das@FreeBSD.ORG) Received: (from das@localhost) by HAL9000.homeunix.com (8.12.9/8.12.9/Submit) id h7NLQbFB011939; Sat, 23 Aug 2003 14:26:37 -0700 (PDT) (envelope-from das@FreeBSD.ORG) Date: Sat, 23 Aug 2003 14:26:37 -0700 From: David Schultz To: "Dag-Erling =?us-ascii:iso-8859-1?Q?Sm=F8rgrav?=" Message-ID: <20030823212637.GA11742@HAL9000.homeunix.com> Mail-Followup-To: "Dag-Erling =?us-ascii:iso-8859-1?Q?Sm=F8rgrav?=" , Kris Kennaway , Bruce Evans , Hajimu UMEMOTO , src-committers@freebsd.org, cvs-src@freebsd.org, cvs-all@freebsd.org References: <200308171605.h7HG5nOd095330@repoman.freebsd.org> <20030818070415.W3401@gamplex.bde.org> <20030818083502.GA71675@rot13.obsecurity.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: cc: src-committers@FreeBSD.ORG cc: Hajimu UMEMOTO cc: Bruce Evans cc: Kris Kennaway cc: cvs-src@FreeBSD.ORG cc: cvs-all@FreeBSD.ORG Subject: Re: cvs commit: src/usr.sbin/route6d route6d.c X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 23 Aug 2003 21:26:33 -0000 On Mon, Aug 18, 2003, Dag-Erling Smrgrav wrote: > Kris Kennaway writes: > > On Mon, Aug 18, 2003 at 10:23:27AM +0200, Dag-Erling Sm?rgrav wrote: > > > I have patches which allow world to build successfully with > > > -fno-builtin... > > What did you do about the libstdc++ breakage (some symbols are > > undefined by our tree and only provided by gcc's builtins), or did > > someone else fix that? > > I implemented fabsl(3), which is what libstdc++ complained about. We > could also get by simply by adding > > #ifdef __GNUC__ > #define fabsl(x) __builtin_fabsl(x) > #endif > > to src/lib/msun/src/math.h. > > I tried to raise interest on the -standards list a few months ago for > implementing the "long double" versions of the standard math routines, > as mandated by C99 and SUSv3, but nobody took my bait. I also managed > to trash the partial implementation I did have, so all I have right > now is fabsl(3). I have implementations of a few of the long double math functions lying around. fabsl(3) should be as simple as: #include "fpmath.h" long double fabsl(long double e) { union IEEEl2bits u; u.e = e; u.bits.sign = 0; return (u.e); } However, it would be *much* faster if implemented in assembly, and slightly faster than that as a builtin. I've been holding off on working on this until I can figure out a good way to add MI support in such a way that an MD version would override, if present. That way, we could support long double floating point efficiently on most architectures without hampering porting efforts. Any suggestions?