diff options
| author | Richard Purdie <rpurdie@linux.intel.com> | 2010-09-01 19:09:11 +0100 |
|---|---|---|
| committer | Richard Purdie <rpurdie@linux.intel.com> | 2010-09-01 19:09:57 +0100 |
| commit | d62ee7eaf2ba025c3f64b2d4e10dc7cec4637612 (patch) | |
| tree | f36fe3008f36ff75cbdd31b630f8f13f1f205ebb /meta/recipes-support/boost/files/arm-intrinsics.patch | |
| parent | caab7fc509bf27706ff3248689f6afd04225cfda (diff) | |
| download | poky-d62ee7eaf2ba025c3f64b2d4e10dc7cec4637612.tar.gz | |
packages: Separate out most of the remaining packages into recipes
Signed-off-by: Richard Purdie <rpurdie@linux.intel.com>
Diffstat (limited to 'meta/recipes-support/boost/files/arm-intrinsics.patch')
| -rw-r--r-- | meta/recipes-support/boost/files/arm-intrinsics.patch | 53 |
1 files changed, 53 insertions, 0 deletions
diff --git a/meta/recipes-support/boost/files/arm-intrinsics.patch b/meta/recipes-support/boost/files/arm-intrinsics.patch new file mode 100644 index 0000000000..3f9c620ebe --- /dev/null +++ b/meta/recipes-support/boost/files/arm-intrinsics.patch | |||
| @@ -0,0 +1,53 @@ | |||
| 1 | 8/17/2010 - rebased to 1.44 by Qing He <qing.he@intel.com> | ||
| 2 | |||
| 3 | diff --git a/boost/smart_ptr/detail/atomic_count_sync.hpp b/boost/smart_ptr/detail/atomic_count_sync.hpp | ||
| 4 | index b6359b5..78b1cc2 100644 | ||
| 5 | --- a/boost/smart_ptr/detail/atomic_count_sync.hpp | ||
| 6 | +++ b/boost/smart_ptr/detail/atomic_count_sync.hpp | ||
| 7 | @@ -33,17 +33,46 @@ public: | ||
| 8 | |||
| 9 | long operator++() | ||
| 10 | { | ||
| 11 | +#ifdef __ARM_ARCH_7A__ | ||
| 12 | + int v1, tmp; | ||
| 13 | + asm volatile ("1: \n\t" | ||
| 14 | + "ldrex %0, %1 \n\t" | ||
| 15 | + "add %0 ,%0, #1 \n\t" | ||
| 16 | + "strex %2, %0, %1 \n\t" | ||
| 17 | + "cmp %2, #0 \n\t" | ||
| 18 | + "bne 1b \n\t" | ||
| 19 | + : "=&r" (v1), "+Q"(value_), "=&r"(tmp) | ||
| 20 | + ); | ||
| 21 | +#else | ||
| 22 | return __sync_add_and_fetch( &value_, 1 ); | ||
| 23 | +#endif | ||
| 24 | } | ||
| 25 | |||
| 26 | long operator--() | ||
| 27 | { | ||
| 28 | +#ifdef __ARM_ARCH_7A__ | ||
| 29 | + int v1, tmp; | ||
| 30 | + asm volatile ("1: \n\t" | ||
| 31 | + "ldrex %0, %1 \n\t" | ||
| 32 | + "sub %0 ,%0, #1 \n\t" | ||
| 33 | + "strex %2, %0, %1 \n\t" | ||
| 34 | + "cmp %2, #0 \n\t" | ||
| 35 | + "bne 1b \n\t" | ||
| 36 | + : "=&r" (v1), "+Q"(value_), "=&r"(tmp) | ||
| 37 | + ); | ||
| 38 | + return value_; | ||
| 39 | +#else | ||
| 40 | return __sync_add_and_fetch( &value_, -1 ); | ||
| 41 | +#endif | ||
| 42 | } | ||
| 43 | |||
| 44 | operator long() const | ||
| 45 | { | ||
| 46 | +#if __ARM_ARCH_7A__ | ||
| 47 | + return value_; | ||
| 48 | +#else | ||
| 49 | return __sync_fetch_and_add( &value_, 0 ); | ||
| 50 | +#endif | ||
| 51 | } | ||
| 52 | |||
| 53 | private: | ||
