[PATCH v6 2/2] aarch64: add __ifunc_hwcap function to be used in ifunc resolvers

Yury Khrustalev yury.khrustalev@arm.com
Tue Jun 3 08:42:06 GMT 2025


Hi Adhemerval,

> > +/* A helper function to obtain HWCAP element by its ID from the
> > +   parameters ARG0 and ARG1 passed to the ifunc resolver.  Note that
> > +   ID 1 corresponds to AT_HWCAP, ID 2 corresponds to AT_HWCAP2, etc.
> > +   If there is no element available for the requested ID then 0 is
> > +   returned.  If ID doesn't much any supported AT_HWCAP{,2,...} value,
> > +   then 0 is also returned.  */
> 
> I am not sure how confusing and error-prone using a blank integer would
> be, specially by not using the default 0-base index from C.  Maybe 
> by using an enum to specify which hwcap user want would hide this
> implementation detail.

The v4 patch [1] had a enum but then discussion seem to be against it. I don't
have a strong opinion here but we need to make up our mind.

[1]: https://inbox.sourceware.org/libc-alpha/20250425113522.3310684-4-yury.khrustalev@arm.com/

Thanks,
Yury



More information about the Libc-alpha mailing list