From 2d34b90ee2e3a701d2bac5d9c280c84c3fdf9fee Mon Sep 17 00:00:00 2001 From: Szabolcs Nagy Date: Tue, 7 Feb 2017 12:51:00 +0000 Subject: [PATCH] [ARM][PR target/78945] Fix libatomic on armv7-m libatomic/ Backport from mainline: 2017-01-30 Szabolcs Nagy PR target/78945 * config/arm/exch_n.c (libat_exchange): Check __ARM_FEATURE_SIMD32. From-SVN: r245247 --- libatomic/ChangeLog | 8 ++++++++ libatomic/config/arm/exch_n.c | 4 ++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/libatomic/ChangeLog b/libatomic/ChangeLog index 488ec85588f4..916db3cf95cf 100644 --- a/libatomic/ChangeLog +++ b/libatomic/ChangeLog @@ -1,3 +1,11 @@ +2017-02-07 Szabolcs Nagy + + Backport from mainline: + 2017-01-30 Szabolcs Nagy + + PR target/78945 + * config/arm/exch_n.c (libat_exchange): Check __ARM_FEATURE_SIMD32. + 2016-06-03 Release Manager * GCC 5.4.0 released. diff --git a/libatomic/config/arm/exch_n.c b/libatomic/config/arm/exch_n.c index 7ad73b73577a..bc88ac9f9ac9 100644 --- a/libatomic/config/arm/exch_n.c +++ b/libatomic/config/arm/exch_n.c @@ -29,7 +29,7 @@ /* When using STREX to implement sub-word exchange, we can do much better than the compiler by using the APSR.GE and APSR.C flags. */ -#if !DONE && HAVE_STREX && !HAVE_STREXBH && N == 2 +#if !DONE && __ARM_FEATURE_SIMD32 && HAVE_STREX && !HAVE_STREXBH && N == 2 UTYPE SIZE(libat_exchange) (UTYPE *mptr, UTYPE newval, int smodel) { @@ -79,7 +79,7 @@ SIZE(libat_exchange) (UTYPE *mptr, UTYPE newval, int smodel) #endif /* !HAVE_STREXBH && N == 2 */ -#if !DONE && HAVE_STREX && !HAVE_STREXBH && N == 1 +#if !DONE && __ARM_FEATURE_SIMD32 && HAVE_STREX && !HAVE_STREXBH && N == 1 UTYPE SIZE(libat_exchange) (UTYPE *mptr, UTYPE newval, int smodel) { -- 2.47.2