@@ -363,6 +363,11 @@ Armv8.4-A [[ARMARMv84]](#ARMARMv84). Support is added for the Dot Product intrin
363
363
to use keyword attributes instead of GNU-style attributes.
364
364
* Added description of SVE reinterpret intrinsics.
365
365
* 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.
366
371
* Changed the mangling rules [Name mangling](#name-mangling), such that
367
372
feature names are appended in lexicographic order, not in priority order.
368
373
* Mangled names contain a unique set of features (no duplicates).
@@ -2474,7 +2479,7 @@ The following attributes trigger the multi version code generation:
2474
2479
`__attribute__((target_version("name")))` and
2475
2480
`__attribute__((target_clones("name",...)))`.
2476
2481
2477
- * These attributes can't be mixed with each other.
2482
+ * These attributes can be mixed with each other.
2478
2483
* The `default` version means the version of the function that would
2479
2484
be generated without these attributes.
2480
2485
* `name` is the dependent features from the tables below.
@@ -2498,11 +2503,15 @@ following:
2498
2503
* when applied to a function it becomes one of the versions. Function
2499
2504
with the same name may exist with multiple versions in the same
2500
2505
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.
2502
2511
* Implicitly, without this attribute,
2503
2512
* or explicitly providing the `default` in the attribute.
2504
2513
* All instances of the versions shall share the same function
2505
- signature.
2514
+ signature and calling convention .
2506
2515
2507
2516
The attribute `__attribute__((target_clones("name",...)))` expresses the
2508
2517
following:
@@ -2511,8 +2520,9 @@ following:
2511
2520
based on the arguments.
2512
2521
* One of them is implicitly the `default`.
2513
2522
* If the `default` matches with an other explicitly provided
2514
- version the compiler can emit only one function instead of the
2515
- two.
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.
2516
2526
* If a name is not recognized the compiler should ignore it[^fmv-note-ignore].
2517
2527
2518
2528
[^fmv-note-ignore]: The intention is to support the usecase of newer code if
0 commit comments