[RFC] Function Multi Versioning on Arm
Martin Liška
mliska@suse.cz
Wed Nov 23 12:28:33 GMT 2022
On 7/18/22 12:36, Daniel Kiss via Gcc wrote:
> Hello,
>
> We are going to add Function Multiversioning [1] support to Arm architectures.
> The specification is made public as beta[2] to ensure toolchain that follows Arm
> C Language Extension will implement it in the same way.
>
> A few tweaks considered to make the developers' life easier.
> Since the `target` attribute is used widely on Arm, we would like to introduce a
> new attribute `target_version` to avoid confusion and possible deployment
> problems. The `target_clones` attribute will be supported too. Also the “default”
> version to be made optional.
>
> We are looking for feedback on the specification (reply, github works too).
>
> Thanks so much,
> Daniel
>
> [1] https://gcc.gnu.org/onlinedocs/gcc/Function-Multiversioning.html
> [2] https://github.com/ARM-software/acle/blob/main/main/acle.md#function-multi-versioning
>
Hey.
I've just spent some time looking into https://gitlab.com/x86-psABIs/i386-ABI ABI and I noticed
you may define something similar to:
GNU 0x00000020 NT_GNU_PROPERTY_TYPE_0
Properties: x86 ISA needed: x86-64-baseline, x86-64-v2, x86-64-v3, x86-64-v4
x86 feature used: x86
Where GNU_PROPERTY_X86_FEATURE_2_NEEDED has only 4B pr_data field. In you case you have ~60 features
or so, which barely fits into 8B even. If you plan to add a something similar
(GNU_PROPERTY_AARCH64_FEATURE_NEEDED or something similar), keep that in mind.
Cheers,
Martin
More information about the Gcc
mailing list