public inbox for libc-ports@sourceware.org
 help / color / mirror / Atom feed
From: "Joseph S. Myers" <joseph@codesourcery.com>
To: Steve Ellcey <sellcey@mips.com>
Cc: <libc-ports@sourceware.org>
Subject: Re: [PATCH] Speed up libm on MIPS
Date: Fri, 20 Sep 2013 15:35:00 -0000	[thread overview]
Message-ID: <Pine.LNX.4.64.1309201528160.3814@digraph.polyomino.org.uk> (raw)
In-Reply-To: <1379631395.5770.445.camel@ubuntu-sellcey>

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 <fenv.h>

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

      parent reply	other threads:[~2013-09-20 15:35 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-09-19 22:58 Steve Ellcey
2013-09-20  3:32 ` Carlos O'Donell
2013-09-20 16:51   ` Steve Ellcey
2013-09-20 17:06     ` Carlos O'Donell
2013-09-21 18:47       ` Maciej W. Rozycki
2013-09-22 17:40         ` Carlos O'Donell
2013-09-23 16:42           ` Steve Ellcey
2013-09-20 15:01 ` Richard Henderson
2013-09-20 15:35 ` Joseph S. Myers [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Pine.LNX.4.64.1309201528160.3814@digraph.polyomino.org.uk \
    --to=joseph@codesourcery.com \
    --cc=libc-ports@sourceware.org \
    --cc=sellcey@mips.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).