summaryrefslogtreecommitdiff
path: root/libatomic
diff options
context:
space:
mode:
authorChristophe Lyon <christophe.lyon@linaro.org>2018-06-21 11:05:36 +0000
committerChristophe Lyon <clyon@gcc.gnu.org>2018-06-21 13:05:36 +0200
commit9b2e34ef6d56fae077b175d73d6f7440af8eba25 (patch)
tree078e50444aca70b367b54be4b7f3a51c4c824f79 /libatomic
parentd1b0dd54ab096ebd088025215230c968ec6ac4f8 (diff)
[ARM] Use __ARM_ARCH and __ARM_FEATURE_LDREX instead of __ARM_ARCH__
2018-06-21 Christophe Lyon <christophe.lyon@linaro.org> libatomic/ * config/arm/arm-config.h (__ARM_ARCH__): Remove definitions, use __ARM_ARCH instead. Use __ARM_FEATURE_LDREX to define HAVE_STREX and HAVE_STREXBHD libgcc/ * config/arm/lib1funcs.S (__ARM_ARCH__): Remove definitions, use __ARM_ARCH and __ARM_FEATURE_CLZ instead. (HAVE_ARM_CLZ): Remove definition, use __ARM_FEATURE_CLZ instead. * config/arm/ieee754-df.S: Use __ARM_FEATURE_CLZ instead of __ARM_ARCH__. * config/arm/ieee754-sf.S: Likewise. * config/arm/libunwind.S: Use __ARM_ARCH instead of __ARM_ARCH__. From-SVN: r261841
Diffstat (limited to 'libatomic')
-rw-r--r--libatomic/ChangeLog6
-rw-r--r--libatomic/config/arm/arm-config.h52
2 files changed, 11 insertions, 47 deletions
diff --git a/libatomic/ChangeLog b/libatomic/ChangeLog
index dcb1bae089a..41c52731415 100644
--- a/libatomic/ChangeLog
+++ b/libatomic/ChangeLog
@@ -1,3 +1,9 @@
+2018-06-21 Christophe Lyon <christophe.lyon@linaro.org>
+
+ * config/arm/arm-config.h (__ARM_ARCH__): Remove definitions, use
+ __ARM_ARCH instead. Use __ARM_FEATURE_LDREX to define HAVE_STREX
+ and HAVE_STREXBHD
+
2018-05-23 Florian Weimer <fweimer@redhat.com>
PR libgcc/60790
diff --git a/libatomic/config/arm/arm-config.h b/libatomic/config/arm/arm-config.h
index c0504befe7c..b4783ad63bc 100644
--- a/libatomic/config/arm/arm-config.h
+++ b/libatomic/config/arm/arm-config.h
@@ -23,57 +23,15 @@
<http://www.gnu.org/licenses/>. */
-#if defined(__ARM_ARCH_2__)
-# define __ARM_ARCH__ 2
-#endif
-
-#if defined(__ARM_ARCH_3__)
-# define __ARM_ARCH__ 3
-#endif
-
-#if defined(__ARM_ARCH_3M__) || defined(__ARM_ARCH_4__) \
- || defined(__ARM_ARCH_4T__)
-/* We use __ARM_ARCH__ set to 4 here, but in reality it's any processor with
- long multiply instructions. That includes v3M. */
-# define __ARM_ARCH__ 4
-#endif
-
-#if defined(__ARM_ARCH_5__) || defined(__ARM_ARCH_5T__) \
- || defined(__ARM_ARCH_5E__) || defined(__ARM_ARCH_5TE__) \
- || defined(__ARM_ARCH_5TEJ__)
-# define __ARM_ARCH__ 5
-#endif
-
-#if defined(__ARM_ARCH_6__) || defined(__ARM_ARCH_6J__) \
- || defined(__ARM_ARCH_6K__) || defined(__ARM_ARCH_6Z__) \
- || defined(__ARM_ARCH_6ZK__) || defined(__ARM_ARCH_6T2__) \
- || defined(__ARM_ARCH_6M__)
-# define __ARM_ARCH__ 6
-#endif
-
-#if defined(__ARM_ARCH_7__) || defined(__ARM_ARCH_7A__) \
- || defined(__ARM_ARCH_7R__) || defined(__ARM_ARCH_7M__) \
- || defined(__ARM_ARCH_7EM__)
-# define __ARM_ARCH__ 7
-#endif
-
-#if defined(__ARM_ARCH_8A__)
-# define __ARM_ARCH__ 8
-#endif
-
-#ifndef __ARM_ARCH__
-#error Unable to determine architecture.
-#endif
-
-#if __ARM_ARCH__ >= 7 || defined(__ARM_ARCH_6K__) || defined(__ARM_ARCH_6ZK__)
+#if __ARM_FEATURE_LDREX & 4
# define HAVE_STREX 1
+#endif
+#if (__ARM_FEATURE_LDREX & 0xF) == 0xF
# define HAVE_STREXBHD 1
-#elif __ARM_ARCH__ == 6
-# define HAVE_STREX 1
#endif
-#if __ARM_ARCH__ >= 7
+#if __ARM_ARCH >= 7
# define HAVE_DMB 1
-#elif __ARM_ARCH__ == 6
+#elif __ARM_ARCH == 6
# define HAVE_DMB_MCR 1
#endif