diff options
author | Tim Northover <tnorthover@apple.com> | 2014-07-02 12:56:02 +0000 |
---|---|---|
committer | Tim Northover <tnorthover@apple.com> | 2014-07-02 12:56:02 +0000 |
commit | ce437d1ab312eeb3a267b5038a5ddba04f2f9e7b (patch) | |
tree | bbc05f317a7f22fc1934418b84c9f9eb3b178765 /docs/LanguageExtensions.rst | |
parent | 862a959d36f83378dbc0a18079dea5a01394b36b (diff) | |
download | clang-ce437d1ab312eeb3a267b5038a5ddba04f2f9e7b.tar.gz |
ARM: add support for v8 ldaex/stlex builtins.
ARMv8 adds (to both AArch32 and AArch64) acquiring and releasing
variants of the exclusive operations, in line with the C++11 memory
model.
This adds support for two new intrinsics to expose them to C & C++
developers directly: __builtin_arm_ldaex and __builtin_arm_stlex, in
direct analogy with the versions with no implicit barrier.
rdar://problem/15885451
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@212175 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'docs/LanguageExtensions.rst')
-rw-r--r-- | docs/LanguageExtensions.rst | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/docs/LanguageExtensions.rst b/docs/LanguageExtensions.rst index de9d513d5b..ad7821af70 100644 --- a/docs/LanguageExtensions.rst +++ b/docs/LanguageExtensions.rst @@ -1580,7 +1580,9 @@ instructions for implementing atomic operations. .. code-block:: c T __builtin_arm_ldrex(const volatile T *addr); + T __builtin_arm_ldaex(const volatile T *addr); int __builtin_arm_strex(T val, volatile T *addr); + int __builtin_arm_stlex(T val, volatile T *addr); void __builtin_arm_clrex(void); The types ``T`` currently supported are: @@ -1589,11 +1591,11 @@ The types ``T`` currently supported are: * Pointer types. Note that the compiler does not guarantee it will not insert stores which clear -the exclusive monitor in between an ``ldrex`` and its paired ``strex``. In -practice this is only usually a risk when the extra store is on the same cache -line as the variable being modified and Clang will only insert stack stores on -its own, so it is best not to use these operations on variables with automatic -storage duration. +the exclusive monitor in between an ``ldrex`` type operation and its paired +``strex``. In practice this is only usually a risk when the extra store is on +the same cache line as the variable being modified and Clang will only insert +stack stores on its own, so it is best not to use these operations on variables +with automatic storage duration. Also, loads and stores may be implicit in code written between the ``ldrex`` and ``strex``. Clang will not necessarily mitigate the effects of these either, so |