V4: [PATCH] x86: Install <sys/platform/x86.h> [BZ #26124]

Adhemerval Zanella adhemerval.zanella@linaro.org
Wed Jun 24 20:04:10 GMT 2020



On 24/06/2020 11:33, Florian Weimer via Libc-alpha wrote:
> * H. J. Lu:
> 
>> Here is the updated patch with
>>
>>  -- Macro: int HAS_CPU_FEATURE (NAME)
>>      This macro returns a nonzero value (true) if the processor has the
>>      feature NAME.
>>
>>  -- Macro: int CPU_FEATURE_USABLE (NAME)
>>      This macro returns a nonzero value (true) if the processor has the
>>      feature NAME and the feature is supported by the operating system.
> 
> This is indeed less confusing.  Thanks.
> 
> I'm still convinced we have a real use case for HAS_CPU_FEATURE.
> 
> Does anyone else want to comment on this?
> 
> Thanks,
> Florian
> 

Should we provide it only for __USE_GNU (_GNU_SOURCE)? And I guess that cpuid
is not expected to be extendable. The macro API is not my favorite way of 
doing it, but it looks ok.


More information about the Libc-alpha mailing list