From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 26009 invoked by alias); 20 Sep 2013 15:35:39 -0000 Mailing-List: contact libc-ports-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: libc-ports-owner@sourceware.org Received: (qmail 25944 invoked by uid 89); 20 Sep 2013 15:35:39 -0000 Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 20 Sep 2013 15:35:39 +0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.7 required=5.0 tests=AWL,BAYES_00,KHOP_THREADED,RDNS_NONE,SPF_HELO_FAIL autolearn=no version=3.3.2 X-HELO: relay1.mentorg.com Received: from svr-orw-exc-10.mgc.mentorg.com ([147.34.98.58]) by relay1.mentorg.com with esmtp id 1VN2k1-0002JC-M1 from joseph_myers@mentor.com ; Fri, 20 Sep 2013 08:35:33 -0700 Received: from SVR-IES-FEM-01.mgc.mentorg.com ([137.202.0.104]) by SVR-ORW-EXC-10.mgc.mentorg.com with Microsoft SMTPSVC(6.0.3790.4675); Fri, 20 Sep 2013 08:35:33 -0700 Received: from digraph.polyomino.org.uk (137.202.0.76) by SVR-IES-FEM-01.mgc.mentorg.com (137.202.0.104) with Microsoft SMTP Server id 14.2.247.3; Fri, 20 Sep 2013 16:35:31 +0100 Received: from jsm28 (helo=localhost) by digraph.polyomino.org.uk with local-esmtp (Exim 4.76) (envelope-from ) id 1VN2jy-0001Mj-L3; Fri, 20 Sep 2013 15:35:30 +0000 Date: Fri, 20 Sep 2013 15:35:00 -0000 From: "Joseph S. Myers" To: Steve Ellcey CC: Subject: Re: [PATCH] Speed up libm on MIPS In-Reply-To: <1379631395.5770.445.camel@ubuntu-sellcey> Message-ID: References: <1379631395.5770.445.camel@ubuntu-sellcey> MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" X-SW-Source: 2013-09/txt/msg00115.txt.bz2 On Thu, 19 Sep 2013, Steve Ellcey wrote: > This patch defines various inline routines and macros used by the math > library in order to speed up libm on MIPS. It does not affect There are at least two other obvious opportunities to speed up MIPS libm (though I don't know if the benchmarks cover them at present). The hardware sqrt instruction isn't being used - bug 15632 - and sysdeps/ieee754/dbl-64/wordsize-64 should be used for n64 (all functions) and n32 (all functions except for those where the aliasing of "long" and "long long" functions would be wrong for n32 - llround and lround - see the wiki todo list). > diff --git a/ports/sysdeps/mips/math_private.h b/ports/sysdeps/mips/math_private.h > index 6b99957..0ac18fd 100644 > --- a/ports/sysdeps/mips/math_private.h > +++ b/ports/sysdeps/mips/math_private.h > @@ -26,6 +26,119 @@ > # define HIGH_ORDER_BIT_IS_SET_FOR_SNAN > #endif > > +/* Inline functions to speed up the math library implementation. The > + default versions of these routines are in generic/math_private.h > + and call fesetround, feholdexcept, etc. These routines use inlined > + code instead. */ > + > +#ifdef __mips_hard_float > + > +#include Use "# include" etc. indentation inside this #ifdef. OK with that fixed and the other fixes other people have noted. -- Joseph S. Myers joseph@codesourcery.com