[PATCH] PowerPC: Optimized mpn functions for PowerPC64
Will Schmidt
will_schmidt@vnet.ibm.com
Tue Dec 3 20:06:00 GMT 2013
On Mon, 2013-11-04 at 10:40 -0200, Adhemerval Zanella wrote:
> Hi all,
>
> This patch add optimized __mpn_addmul, __mpn_addsub, __mpn_lshift, and
> __mpn_mul_1 implementations for PowerPC64. They are originally from GMP
> with adjustments for GLIBC.
>
> With this patch I noticed improvements of about 20% for strtod with
> different kind of inputs (the speed up in the function itself are higher,
> due the fact strtod symbol itself takes about half of total strtod spent
> time).
>
> Tested on PPC64 and PP64le.
Cosmetic comments about the copyright blurbs below. I've read over
most of the assembly, no issues with the ode, LGTM.
Thanks,
-Will
>
> 2013-11-04 Adhemerval Zanella <azanella@linux.vnet.ibm.com>
>
> * sysdeps/powerpc/powerpc64/addmul_1.S: New file: optimized
> __mpn_addmul_1 for PowerPC64.
> * sysdeps/powerpc/powerpc64/submul_1.S: New file: optimized
> __mpn_submul_1 for PowerPC64.
> * sysdeps/powerpc/powerpc64/lshift.S: New file: optimized __mpn_lshift
> for PowerPC64.
> * sysdeps/powerpc/powerpc64/mul_1.S: New file: optimized __mpn_mul_1
> for PowerPC64.
>
> diff --git a/sysdeps/powerpc/powerpc64/addmul_1.S b/sysdeps/powerpc/powerpc64/addmul_1.S
> new file mode 100644
> index 0000000..f256506
> --- /dev/null
> +++ b/sysdeps/powerpc/powerpc64/addmul_1.S
> @@ -0,0 +1,208 @@
> +/* PowerPC64 __mpn_addmul_1 -- Multiply a limb vector with a limb and add
> + the result to a second limb vector.
> + Copyright (C) 1999-2013 Free Software Foundation, Inc.
^ from a glance at other files, I think this should be just "Copyright
(C) 2013 ". Similar comment for the other files.
<snip..>
I've read over most of the .asm, nothing jumps out at me as an issue or
concern.
> diff --git a/sysdeps/powerpc/powerpc64/submul_1.S b/sysdeps/powerpc/powerpc64/submul_1.S
> new file mode 100644
> index 0000000..145b1d4
> --- /dev/null
> +++ b/sysdeps/powerpc/powerpc64/submul_1.S
> @@ -0,0 +1,21 @@
> +/* PowerPC64 __mpn_addmul_1 -- Multiply a limb vector with a limb and subtract
> + the result to a second limb vector.
> + Copyright (C) 2013 Free Software Foundation, Inc.
> + This file is part of the GNU C Library.
> +
> + The GNU C Library is free software; you can redistribute it and/or
> + modify it under the terms of the GNU Lesser General Public
> + License as published by the Free Software Foundation; either
> + version 2.1 of the License, or (at your option) any later version.
> +
> + The GNU C Library is distributed in the hope that it will be useful,
> + but WITHOUT ANY WARRANTY; without even the implied warranty of
> + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
> + Lesser General Public License for more details.
> +
> + You should have received a copy of the GNU Lesser General Public
> + License along with the GNU C Library; if not, see
> + <http://www.gnu.org/licenses/>. */
> +
> +#define USE_AS_SUBMUL
> +#include "addmul_1.S"
I see other files with just a #include often skip the Copyright blurb.
I'd be tempted to do the same here, but don't feel strongly about it,
and don't know if there is a coding style in place to address it.
More information about the Libc-alpha
mailing list