Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r77317 - in branches/release: . boost boost/smart_ptr/detail
From: pdimov_at_[hidden]
Date: 2012-03-12 13:37:52


Author: pdimov
Date: 2012-03-12 13:37:51 EDT (Mon, 12 Mar 2012)
New Revision: 77317
URL: http://svn.boost.org/trac/boost/changeset/77317

Log:
Merge [77315] to release. Closes #5331.
Properties modified:
   branches/release/ (props changed)
   branches/release/boost/ (props changed)
Text files modified:
   branches/release/boost/smart_ptr/detail/spinlock_gcc_arm.hpp | 29 +++++++++++++++++++++++++++--
   1 files changed, 27 insertions(+), 2 deletions(-)

Modified: branches/release/boost/smart_ptr/detail/spinlock_gcc_arm.hpp
==============================================================================
--- branches/release/boost/smart_ptr/detail/spinlock_gcc_arm.hpp (original)
+++ branches/release/boost/smart_ptr/detail/spinlock_gcc_arm.hpp 2012-03-12 13:37:51 EDT (Mon, 12 Mar 2012)
@@ -43,13 +43,38 @@
     {
         int r;
 
+#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_7__) \
+ || defined(__ARM_ARCH_7A__) \
+ || defined(__ARM_ARCH_7R__) \
+ || defined(__ARM_ARCH_7M__) \
+ || defined(__ARM_ARCH_7EM__)
+
+ __asm__ __volatile__(
+ "ldrex %0, [%2]; \n"
+ "cmp %0, %1; \n"
+ "strexne %0, %1, [%2]; \n"
+ BOOST_SP_ARM_BARRIER :
+ "=&r"( r ): // outputs
+ "r"( 1 ), "r"( &v_ ): // inputs
+ "memory", "cc" );
+
+#else
+
         __asm__ __volatile__(
- "swp %0, %1, [%2]\n\t"
- BOOST_SP_ARM_BARRIER :
+ "swp %0, %1, [%2];\n"
+ BOOST_SP_ARM_BARRIER :
             "=&r"( r ): // outputs
             "r"( 1 ), "r"( &v_ ): // inputs
             "memory", "cc" );
 
+#endif
+
         return r == 0;
     }
 


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk