$include_dir="/home/hyper-archives/boost/include"; include("$include_dir/msg-header.inc") ?>
Subject: Re: [boost] [1.41.0] Beta 1 available
From: Peter Dimov (pdimov_at_[hidden])
Date: 2009-11-13 13:33:55
Alexander Churanov wrote:
> Folks,
>
> Boost 1.40.0 beta 1 fail to build on SPARC64 machines. 1.37, however,
> builds flawlessly.
>
> Brief analysis indicates that the issue arises when code of smart_ptr
> is assembled.
...
> The attached patch allows the code to build.
Doesn't seem right to me. How about
-    __asm__ __volatile__( "cas %0, %2, %1"
-                        : "+m" (*dest_), "+r" (swap_)
-                        : "r" (compare_)
-                        : "memory" );
+    __asm__ __volatile__( "cas [%1], %2, %0"
+                        : "+r" (swap_)
+                        : "r" (dest_), "r" (compare_)
+                        : "memory" );
?
> What is the appropriate way to check that the patched code works
> correctly both in terms of logic and atomicity?
You should run the smart_ptr tests, including shared_ptr_mt_test and 
weak_ptr_mt_test, on a multicore machine.