[PATCH 02/56] S390: Use hwcap instead of dl_hwcap in ifunc-resolvers.

Stefan Liebler stli@linux.ibm.com
Mon Dec 3 08:20:00 GMT 2018


On 11/30/2018 06:36 PM, Florian Weimer wrote:
> * Stefan Liebler:
> 
>> +  if (__glibc_likely((hwcap & HWCAP_S390_STFLE)				\
> 
> Missing space before paren.  Since HWCAP_S390_STFLE 4 is four, this
> __glibc_likely is actually equivalent to __glibc_unlikely, so perhaps
> you should drop it.
> 
> Thanks,
> Florian
> 

Hi Florian,

I've added the missing space.

The condition of __glibc_likely does not result in the value "4"
as the full condition is:
(hwcap & HWCAP_S390_STFLE)
&& (hwcap & HWCAP_S390_ZARCH)
&& (hwcap & HWCAP_S390_HIGH_GPRS)

If hwcap is e.g. 518, then the result is one and __glibc_likely is not 
equivalent to __glibc_unlikely.

Note: here are the other HWCAP_S390 defines:
#define HWCAP_S390_STFLE        4
#define HWCAP_S390_ZARCH        2
#define HWCAP_S390_HIGH_GPRS    512

Thanks.
Stefan
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 0002-S390-Use-hwcap-instead-of-dl_hwcap-in-ifunc-resolver.patch
Type: text/x-patch
Size: 2426 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/libc-alpha/attachments/20181203/b170eed1/attachment.bin>


More information about the Libc-alpha mailing list