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 28/28] powerpc: refactor logb{f,l}



On 04/07/2019 22:24, Gabriel F. T. Gomes wrote:
> 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).
> 


If no one opposes it, I will commit this shortly.


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