diff options
author | Ivan Maidanski <ivmai@mail.ru> | 2013-08-17 15:05:36 +0400 |
---|---|---|
committer | Ivan Maidanski <ivmai@mail.ru> | 2013-08-17 15:06:45 +0400 |
commit | 2daf685b7dec61f9e9b3e9cc208cbd1c31fb8b92 (patch) | |
tree | 0531922ffa6b88fd1f6138ded2876855d5d5e053 | |
parent | a81940c26cf3b66a5ea251b04a90db16161c5bbc (diff) |
Do not use LDREXD/STREXD for Clang3.2/arm (and earlier)
* src/atomic_ops/sysdeps/gcc/arm.h (AO_ARM_HAVE_LDREXD): Do not define
for pre-Clang3.3 (since it does not allocate register pairs for
LDREXD/STREXD instructions properly); add comment.
-rw-r--r-- | src/atomic_ops/sysdeps/gcc/arm.h | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/src/atomic_ops/sysdeps/gcc/arm.h b/src/atomic_ops/sysdeps/gcc/arm.h index 874ed07..c19f6da 100644 --- a/src/atomic_ops/sysdeps/gcc/arm.h +++ b/src/atomic_ops/sysdeps/gcc/arm.h @@ -62,12 +62,16 @@ /* DMB is present in ARMv6M and ARMv7+. */ # define AO_ARM_HAVE_DMB # endif -# if !defined(__thumb__) \ - || (defined(__thumb2__) && !defined(__ARM_ARCH_7__) \ - && !defined(__ARM_ARCH_7M__) && !defined(__ARM_ARCH_7EM__)) +# if (!defined(__thumb__) \ + || (defined(__thumb2__) && !defined(__ARM_ARCH_7__) \ + && !defined(__ARM_ARCH_7M__) && !defined(__ARM_ARCH_7EM__))) \ + && (!defined(__clang__) || (__clang_major__ > 3) \ + || (__clang_major__ == 3 && __clang_minor__ >= 3)) /* LDREXD/STREXD present in ARMv6K/M+ (see gas/config/tc-arm.c). */ /* In the Thumb mode, this works only starting from ARMv7 (except */ - /* for the base and 'M' models). */ + /* for the base and 'M' models). Clang3.2 (and earlier) does not */ + /* allocate register pairs for LDREXD/STREXD properly (besides, */ + /* Clang3.1 does not support "%H<r>" operand specification). */ # define AO_ARM_HAVE_LDREXD # endif /* !thumb || ARMv7A || ARMv7R+ */ # endif /* ARMv7+ */ |