This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc 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] Sync up powerpc __mp_dbl with default code


Ping!  A correction to the blurb I wrote earlier - this change results
in automatic inlining of norm() resulting in very a minor speedup on
Power7.  This is where I had first typo'd the configure line
(--enable-cpu instead of --with-cpu).

Siddhesh

On Thu, Feb 14, 2013 at 03:38:44PM +0530, Siddhesh Poyarekar wrote:
> Hi,
> 
> Here's another patch that syncs up changes I had made in default code
> with the powerpc code since it makes sense to do so.  The result does
> not alter the output code, i.e. the output code is identical before
> and after this change.  OK to commit?
> 
> Siddhesh
> 
> 	* sysdeps/powerpc/powerpc32/power4/fpu/mpa.c (__mp_dbl): Sync
> 	up changes with default code.
> 	* sysdeps/powerpc/powerpc64/power4/fpu/mpa.c (__mp_dbl):
> 	Likewise.
> 
> diff --git a/sysdeps/powerpc/powerpc32/power4/fpu/mpa.c b/sysdeps/powerpc/powerpc32/power4/fpu/mpa.c
> index 517a9cd..25e88a3 100644
> --- a/sysdeps/powerpc/powerpc32/power4/fpu/mpa.c
> +++ b/sysdeps/powerpc/powerpc32/power4/fpu/mpa.c
> @@ -304,9 +304,7 @@ __mp_dbl (const mp_no *x, double *y, int p)
>        return;
>      }
>  
> -  if (EX > -42)
> -    norm (x, y, p);
> -  else if (EX == -42 && X[1] >= TWO10)
> +  if (__glibc_likely (EX > -42 || (EX == -42 && X[1] >= TWO10)))
>      norm (x, y, p);
>    else
>      denorm (x, y, p);
> diff --git a/sysdeps/powerpc/powerpc64/power4/fpu/mpa.c b/sysdeps/powerpc/powerpc64/power4/fpu/mpa.c
> index 517a9cd..25e88a3 100644
> --- a/sysdeps/powerpc/powerpc64/power4/fpu/mpa.c
> +++ b/sysdeps/powerpc/powerpc64/power4/fpu/mpa.c
> @@ -304,9 +304,7 @@ __mp_dbl (const mp_no *x, double *y, int p)
>        return;
>      }
>  
> -  if (EX > -42)
> -    norm (x, y, p);
> -  else if (EX == -42 && X[1] >= TWO10)
> +  if (__glibc_likely (EX > -42 || (EX == -42 && X[1] >= TWO10)))
>      norm (x, y, p);
>    else
>      denorm (x, y, p);


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