Hello Kyrill,

On Thu, Oct 31, 2024 at 02:11:02PM +0000, Kyrylo Tkachov wrote:
> 
> 
> > On 31 Oct 2024, at 14:23, Yury Khrustalev <yury.khrusta...@arm.com> wrote:
> > 
> > From: Szabolcs Nagy <szabolcs.n...@arm.com>
> > 
> > Builtin for chkfeat: the input argument is used to initialize x16 then
> > execute chkfeat and return the updated x16.
> > 
> > +  tree ftype_chkfeat
> > +    = build_function_type_list (uint64_type_node, uint64_type_node, NULL);
> > +  aarch64_builtin_decls[AARCH64_BUILTIN_CHKFEAT]
> > +    = aarch64_general_add_builtin ("__builtin_aarch64_chkfeat", 
> > ftype_chkfeat,
> > +   AARCH64_BUILTIN_CHKFEAT);
> > +
> 
> Is the builtin intended to be used just to implement the ACLE __chkfeat () 
> intrinsic in the future or is it expected to be used directly by users?
> If so, it should be documented somehow. I also note that Clang seems to have 
> a similar builtin with a deviating name “__builtin_arm_chkfeat”.
> This is fine, of course, if the user is only expected to use the arm_acle.h 
> intrinsic. Do you intend to implement that in this cycle as well?

Thank you for flagging this.

This builtin is used internally in libgcc for unwinder. It is not expected to 
be used
directly by users. I will shortly submit updated patch series with patch for 
ACLE
builtin __chkfeat that will be implemented using __builtin_aarch64_chkfeat.

Kind regards,
Yury

Reply via email to