aboutsummaryrefslogtreecommitdiff
path: root/libatomic/config/arm/arm-config.h
diff options
context:
space:
mode:
Diffstat (limited to 'libatomic/config/arm/arm-config.h')
-rw-r--r--libatomic/config/arm/arm-config.h52
1 files changed, 5 insertions, 47 deletions
diff --git a/libatomic/config/arm/arm-config.h b/libatomic/config/arm/arm-config.h
index c0504be..b4783ad 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