@@ -363,6 +363,11 @@ Armv8.4-A [[ARMARMv84]](#ARMARMv84). Support is added for the Dot Product intrin
363363 to use keyword attributes instead of GNU-style attributes.
364364* Added description of SVE reinterpret intrinsics.
365365* Changes and fixes for [Function Multi Versioning](#function-multi-versioning):
366+ * Combination of attributes `target_version` and `target_clones` is allowed.
367+ * Clarify the existance of a single default version across all translation
368+ units with the explicitly provided version being the preferred in case
369+ `target_version` and `target_clones` are mixed.
370+ * Emphasise that all instances of the versions share the same calling convention.
366371 * Changed the mangling rules [Name mangling](#name-mangling), such that
367372 feature names are appended in lexicographic order, not in priority order.
368373 * Mangled names contain a unique set of features (no duplicates).
@@ -2474,11 +2479,11 @@ The following attributes trigger the multi version code generation:
24742479`__attribute__((target_version("name")))` and
24752480`__attribute__((target_clones("name",...)))`.
24762481
2477- * These attributes can't be mixed with each other.
2482+ * These attributes can be mixed with each other.
24782483* The `default` version means the version of the function that would
24792484 be generated without these attributes.
24802485* `name` is the dependent features from the tables below.
2481- * If a feature depends on an other feature as defined by the Architecture
2486+ * If a feature depends on another feature as defined by the Architecture
24822487 Reference Manual then no need to explicitly state in the attribute[^fmv-note-names].
24832488* The dependent features could be joined by the `+` sign.
24842489* None of these attributes will enable the corresponding ACLE feature(s)
@@ -2498,21 +2503,26 @@ following:
24982503* when applied to a function it becomes one of the versions. Function
24992504 with the same name may exist with multiple versions in the same
25002505 translation unit.
2501- * One `default` version of the function is required to be provided.
2506+ * Function versions may reside in different translation units.
2507+ * Each version declaration should be visible at the translation
2508+ unit in which the corresponding function version resides.
2509+ * One `default` version of the function is required to be provided
2510+ in one of the translation units.
25022511 * Implicitly, without this attribute,
25032512 * or explicitly providing the `default` in the attribute.
25042513* All instances of the versions shall share the same function
2505- signature.
2514+ signature and calling convention .
25062515
25072516The attribute `__attribute__((target_clones("name",...)))` expresses the
25082517following:
25092518
25102519* when applied to a function the compiler emits multiple versions
25112520 based on the arguments.
25122521 * One of them is implicitly the `default`.
2513- * If the `default` matches with an other explicitly provided
2514- version the compiler can emit only one function instead of the
2515- two.
2522+ * If the `default` matches with another explicitly provided
2523+ version in the same translation unit, then the compiler can
2524+ emit only one function instead of the two. The explicitly
2525+ provided version shall be preferred.
25162526* If a name is not recognized the compiler should ignore it[^fmv-note-ignore].
25172527
25182528[^fmv-note-ignore]: The intention is to support the usecase of newer code if
0 commit comments