This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH 28/28] powerpc: refactor logb{f,l}
- From: "Gabriel F. T. Gomes" <gabriel at inconstante dot eti dot br>
- To: Adhemerval Zanella <adhemerval dot zanella at linaro dot org>
- Cc: <libc-alpha at sourceware dot org>
- Date: Thu, 4 Jul 2019 22:24:04 -0300
- Subject: Re: [PATCH 28/28] powerpc: refactor logb{f,l}
- References: <20190329133529.22523-1-adhemerval.zanella@linaro.org> <20190329133529.22523-29-adhemerval.zanella@linaro.org>
On Fri, Mar 29 2019, Adhemerval Zanella wrote:
> The power7 logb implementation does not show a performance gain on
> ISA 2.07+ chips with faster floating-point to GRP instructions
> (currently POWER8 and POWER9).
Looks good to me. Thanks.
Reviewed-by: Gabriel F. T. Gomes <gabrielftg@linux.ibm.com>
> - asm (
> - "xxland %x0,%x1,%x2\n"
> - "fcfid %0,%0"
> - : "=f" (ret)
> - : "f" (x), "f" (mask.d));
> + asm ("xxland %x0,%x1,%x2\n"
> + "fcfid %0,%0"
> + : "=d" (ret)
> + : "d" (x), "d" (0x7ff0000000000000ULL));
OK. I don't actually understand when the 'f' constraint is supposed to
be used, but 'd' looks good to me.
> -static const double two7m1 = -127.0; /* -2**7 + 1 */
> [...]
> - if (__builtin_expect (ret > -two7m1, 0))
> + if (ret > 127.0)
OK. Double negative.
> --- a/sysdeps/powerpc/powerpc64/fpu/multiarch/Makefile
> +++ /dev/null
Hurray. :)
Thanks, Adhemerval.
Sorry for taking too long to review this patch set (I tried to review
them all before the freeze, but it wasn't so easy for me).