This is the mail archive of the libc-ports@sources.redhat.com mailing list for the libc-ports project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] Speed up libm on MIPS


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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]