Skip to content

Commit 73c35a3

Browse files
authored
[FMV] Document feature dependencies and detect at selection. (ARM-software#368)
1 parent 11ce13e commit 73c35a3

File tree

1 file changed

+45
-5
lines changed

1 file changed

+45
-5
lines changed

Diff for: main/acle.md

+45-5
Original file line numberDiff line numberDiff line change
@@ -422,6 +422,7 @@ Armv8.4-A [[ARMARMv84]](#ARMARMv84). Support is added for the Dot Product intrin
422422
* Removed Function Multi Versioning features sve-bf16, sve-ebf16, and sve-i8mm.
423423
* Removed Function Multi Versioning features ebf16, memtag3, and rpres.
424424
* Removed Function Multi Versioning feature dgh.
425+
* Document Function Multi Versioning feature dependencies.
425426
* Fixed range of operand `o0` (too small) in AArch64 system register designations.
426427
* Fixed SVE2.1 quadword gather load/scatter store intrinsics.
427428
* Removed unnecessary Zd argument from `svcvtnb_mf8[_f32_x2]_fpm`.
@@ -2675,8 +2676,6 @@ The following attributes trigger the multi version code generation:
26752676
* The `default` version means the version of the function that would
26762677
be generated without these attributes.
26772678
* `name` is the dependent features from the tables below.
2678-
* If a feature depends on another feature as defined by the Architecture
2679-
Reference Manual then no need to explicitly state in the attribute[^fmv-note-names].
26802679
* The dependent features could be joined by the `+` sign.
26812680
* None of these attributes will enable the corresponding ACLE feature(s)
26822681
associated to the `name` expressed in the attribute.
@@ -2686,9 +2685,6 @@ The following attributes trigger the multi version code generation:
26862685
* FMV may be disabled in compile time by a compiler flag. In this
26872686
case the `default` version shall be used.
26882687

2689-
[^fmv-note-names]: For example the `sve_bf16` feature depends on `sve`
2690-
but it is enough to say `target_version("sve_bf16")` in the code.
2691-
26922688
The attribute `__attribute__((target_version("name")))` expresses the
26932689
following:
26942690

@@ -2828,6 +2824,50 @@ The following table lists the architectures feature mapping for AArch64
28282824
| 580 | `FEAT_SME2` | sme2 | ```ID_AA64PFR1_EL1.SMEver >= 0b0001``` |
28292825
| 650 | `FEAT_MOPS` | mops | ```ID_AA64ISAR2_EL1.MOPS >= 0b0001``` |
28302826

2827+
### Dependencies
2828+
2829+
If a feature depends on another feature as defined by the table below then:
2830+
2831+
* the depended-on feature *need not* be specified in the attribute,
2832+
* the depended-on feature *may* be specified in the attribute.
2833+
2834+
These dependencies are taken into account transitively when selecting the
2835+
most appropriate version of a function (see section [Selection](#selection)).
2836+
The following table lists the feature dependencies for AArch64.
2837+
2838+
| **Feature** | **Depends on** |
2839+
| ---------------- | ----------------- |
2840+
| flagm2 | flagm |
2841+
| simd | fp |
2842+
| dotprod | simd |
2843+
| sm4 | simd |
2844+
| rdm | simd |
2845+
| sha2 | simd |
2846+
| sha3 | sha2 |
2847+
| aes | simd |
2848+
| fp16 | fp |
2849+
| fp16fml | simd, fp16 |
2850+
| dpb2 | dpb |
2851+
| jscvt | fp |
2852+
| fcma | simd |
2853+
| rcpc2 | rcpc |
2854+
| rcpc3 | rcpc2 |
2855+
| frintts | fp |
2856+
| i8mm | simd |
2857+
| bf16 | simd |
2858+
| sve | fp16 |
2859+
| f32mm | sve |
2860+
| f64mm | sve |
2861+
| sve2 | sve |
2862+
| sve2-aes | sve2, aes |
2863+
| sve2-bitperm | sve2 |
2864+
| sve2-sha3 | sve2, sha3 |
2865+
| sve2-sm4 | sve2, sm4 |
2866+
| sme | fp16, bf16 |
2867+
| sme-f64f64 | sme |
2868+
| sme-i16i64 | sme |
2869+
| sme2 | sme |
2870+
28312871
### Selection
28322872

28332873
The following rules shall be followed by all implementations:

0 commit comments

Comments
 (0)