summaryrefslogtreecommitdiff
path: root/packages/boost/files
diff options
context:
space:
mode:
authorPhilip Balister <philip@balister.org>2008-10-05 19:18:55 +0000
committerPhilip Balister <philip@balister.org>2008-10-05 19:18:55 +0000
commit74e7c9a96d176e32aac4791c7e308a0c904f735b (patch)
treedb657bce517a5f208bf1425e1c99897d2a1af061 /packages/boost/files
parent161f8ed7b53911a89a4bd8f2f75880e0a4cec44f (diff)
boost-1.36.0 : Add support for building boost-1.36.
* Not all libraries are built.
Diffstat (limited to 'packages/boost/files')
-rw-r--r--packages/boost/files/arm-intrinsics.patch51
1 files changed, 51 insertions, 0 deletions
diff --git a/packages/boost/files/arm-intrinsics.patch b/packages/boost/files/arm-intrinsics.patch
new file mode 100644
index 0000000000..860b6df67c
--- /dev/null
+++ b/packages/boost/files/arm-intrinsics.patch
@@ -0,0 +1,51 @@
+diff -Nurd boost_1_36_0.orig/boost/detail/atomic_count_sync.hpp boost_1_36_0.arm/boost/detail/atomic_count_sync.hpp
+--- boost_1_36_0.orig/boost/detail/atomic_count_sync.hpp 2007-11-23 12:03:14.000000000 -0500
++++ boost_1_36_0.arm/boost/detail/atomic_count_sync.hpp 2008-09-09 13:15:21.000000000 -0400
+@@ -29,17 +29,46 @@
+
+ void operator++()
+ {
++#ifdef __ARM_ARCH_7A__
++ int v1, tmp;
++ asm volatile ("1: \n\t"
++ "ldrex %0, %1 \n\t"
++ "add %0 ,%0, #1 \n\t"
++ "strex %2, %0, %1 \n\t"
++ "cmp %2, #0 \n\t"
++ "bne 1b \n\t"
++ : "=&r" (v1), "+Q"(value_), "=&r"(tmp)
++ );
++#else
+ __sync_add_and_fetch( &value_, 1 );
++#endif
+ }
+
+ long operator--()
+ {
++#ifdef __ARM_ARCH_7A__
++ int v1, tmp;
++ asm volatile ("1: \n\t"
++ "ldrex %0, %1 \n\t"
++ "sub %0 ,%0, #1 \n\t"
++ "strex %2, %0, %1 \n\t"
++ "cmp %2, #0 \n\t"
++ "bne 1b \n\t"
++ : "=&r" (v1), "+Q"(value_), "=&r"(tmp)
++ );
++ return value_;
++#else
+ return __sync_add_and_fetch( &value_, -1 );
++#endif
+ }
+
+ operator long() const
+ {
++#if __ARM_ARCH_7A__
++ return value_;
++#else
+ return __sync_fetch_and_add( &value_, 0 );
++#endif
+ }
+
+ private:
+Binary files boost_1_36_0.orig/boost/detail/.atomic_count_sync.hpp.swp and boost_1_36_0.arm/boost/detail/.atomic_count_sync.hpp.swp differ