This is the mail archive of the
libc-ports@sources.redhat.com
mailing list for the libc-ports project.
Re: [PATCH] Speed up libm on MIPS
- From: "Joseph S. Myers" <joseph at codesourcery dot com>
- To: Steve Ellcey <sellcey at mips dot com>
- Cc: <libc-ports at sourceware dot org>
- Date: Fri, 20 Sep 2013 15:35:30 +0000
- Subject: Re: [PATCH] Speed up libm on MIPS
- Authentication-results: sourceware.org; auth=none
- References: <1379631395 dot 5770 dot 445 dot camel at 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