@@ -1848,6 +1848,11 @@ execution state. Intrinsics for the use of these instructions are specified in
18481848data placement hints (FEAT_PCDPHINT) instructions and their associated
18491849intrinsics are available on the target.
18501850
1851+ ### Contention Management hints
1852+
1853+ `__ARM_FEATURE_CMH` is defined to `1` if the Contention Management hints
1854+ (FEAT_CMH) instructions and their associated intrinsics are available on the target.
1855+
18511856## Floating-point and vector hardware
18521857
18531858### Hardware floating point
@@ -2654,6 +2659,7 @@ be found in [[BA]](#BA).
26542659| [`__ARM_FEATURE_CDE`](#custom-datapath-extension) | Custom Datapath Extension | 0x01 |
26552660| [`__ARM_FEATURE_CDE_COPROC`](#custom-datapath-extension) | Custom Datapath Extension | 0xf |
26562661| [`__ARM_FEATURE_CLZ`](#clz) | CLZ instruction | 1 |
2662+ | [`__ARM_FEATURE_CMH`](#contention-management-hints) | Contention management hints | 1 |
26572663| [`__ARM_FEATURE_COMPLEX`](#complex-number-intrinsics) | Armv8.3-A extension | 1 |
26582664| [`__ARM_FEATURE_COPROC`](#coprocessor-intrinsics) | Coprocessor Intrinsics | 1 |
26592665| [`__ARM_FEATURE_CRC32`](#crc32-extension) | CRC32 extension | 1 |
@@ -4980,6 +4986,58 @@ The fourth argument can contain the following values:
49804986| KEEP | 0 | Signals to retain the updated location in the local cache of the updating PE. |
49814987| STRM | 1 | Signals to not retain the updated location in the local cache of the updating PE. |
49824988
4989+ ## Atomic store with CMH intrinsics
4990+
4991+ These intrinsics provide an atomic store, which will
4992+ make use of the `STCPH` or `SHUH` hint instructions immediately followed by the
4993+ associated store instruction. These intrinsics are type generic and
4994+ support scalar types from 8-64 bits and are available when
4995+ `__ARM_FEATURE_CMH` is defined.
4996+
4997+ To access these intrinsics, `<arm_acle.h>` should be included.
4998+
4999+ ``` c
5000+ void __arm_atomic_store_with_stcph(type *ptr, type data, int memory_order);
5001+ void __arm_atomic_store_with_shuh(type *ptr, type data, int memory_order, int priority_hint);
5002+ ```
5003+
5004+ The first argument in these intrinsics is a pointer `ptr` which is the location to store to.
5005+ The second argument `data` is the data which is to be stored.
5006+ The third argument `mem` can be one of 3 memory ordering variables supported by atomic_store:
5007+ __ATOMIC_RELAXED, __ATOMIC_SEQ_CST, and __ATOMIC_RELEASE.
5008+ The fourth argument `priority_hint` can be either 0 or 1. If set to 1 then if the next instruction in program order generates
5009+ an Explicit Memory Write Effect, then there is a performance benefit if that Explicit Memory Write Effect
5010+ is sequenced before Memory Effects from other threads of execution in the coherence order to the same
5011+ location.
5012+
5013+ ## Atomic fetch with CMH intrinsics
5014+
5015+ These intrinsics provide some atomic fetch operations, which will
5016+ make use of the `SHUH` hint instruction immediately followed by the
5017+ associated fetch instructions. These intrinsics are type generic and
5018+ support scalar types from 8-64 bits and are available when
5019+ `__ARM_FEATURE_CMH` is defined.
5020+
5021+ To access these intrinsics, `<arm_acle.h>` should be included.
5022+
5023+ ``` c
5024+ type __arm_atomic_fetch_add_with_shuh(type *ptr, type data, int memory_order, int priority_hint);
5025+ type __arm_atomic_fetch_sub_with_shuh(type *ptr, type data, int memory_order, int priority_hint);
5026+ type __arm_atomic_fetch_and_with_shuh(type *ptr, type data, int memory_order, int priority_hint);
5027+ type __arm_atomic_fetch_xor_with_shuh(type *ptr, type data, int memory_order, int priority_hint);
5028+ type __arm_atomic_fetch_or_with_shuh(type *ptr, type data, int memory_order, int priority_hint);
5029+ type __arm_atomic_fetch_nand_with_shuh(type *ptr, type data, int memory_order, int priority_hint);
5030+ ```
5031+
5032+ The first argument in these intrinsic is a pointer `ptr` which is the location to store to.
5033+ The second argument `data` is the data which is to be stored.
5034+ The third argument `mem` can be one of 6 memory ordering variables supported by atomic_fetch:
5035+ __ATOMIC_RELAXED, __ATOMIC_SEQ_CST, __ATOMIC_ACQUIRE, __ATOMIC_CONSUME, __ATOMIC_ACQ_REL and __ATOMIC_RELEASE.
5036+ The fourth argument `priority_hint` can be either 0 or 1. If set to 1 then if the next instruction in program order generates
5037+ an Explicit Memory Write Effect, then there is a performance benefit if that Explicit Memory Write Effect
5038+ is sequenced before Memory Effects from other threads of execution in the coherence order to the same
5039+ location.
5040+
49835041# Custom Datapath Extension
49845042
49855043The intrinsics in this section provide access to instructions in the
0 commit comments