<html>
    <head>
      <base href="http://llvm.org/bugs/" />
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW --- - [powerpc-darwin8] missing 64b atomic operations on PPC32"
   href="http://llvm.org/bugs/show_bug.cgi?id=18470">18470</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>[powerpc-darwin8] missing 64b atomic operations on PPC32
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>compiler-rt
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>unspecified
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>Macintosh
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>MacOS X
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>normal
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>compiler-rt
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>fang@csl.cornell.edu
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>llvmbugs@cs.uiuc.edu
          </td>
        </tr>

        <tr>
          <th>Classification</th>
          <td>Unclassified
          </td>
        </tr></table>
      <p>
        <div>
        <pre>I noticed during libc++ tests on powerpc-darwin8 that some tests fail due to
lack of 64b atomics (on PPC32).

In file included from integral.pass.cpp:87:
/Users/fang/local/src/LLVM-svn/libcxx.git/include/atomic:574:10: error: atomic
store requires runtime suppor
t that is not available for this target
        {__c11_atomic_store(&__a_, __d, __m);}
         ^
integral.pass.cpp:102:9: note: in instantiation of member function
'std::__1::__atomic_base<long long, false
<span class="quote">>::store' requested here</span >
    obj.store(T(0));
        ^
integral.pass.cpp:159:5: note: in instantiation of function template
specialization 'do_test<std::__1::atomi
c<long long>, long long>' requested here
    do_test<A, T>();
    ^
integral.pass.cpp:175:5: note: in instantiation of function template
specialization 'test<std::__1::atomic<l
ong long>, long long>' requested here
    test<std::atomic_llong, long long>();
    ^

Can a 32b architecture emulate 64b atomic ops?

On OS X, darwin8, <libkern/OSAtomic.h> provides prototypse for 64b atomics for
!PPC32:

#if defined(__ppc64__) || defined(__i386__) || defined(__x86_64__)

int64_t OSAtomicAdd64( int64_t theAmount, int64_t *theValue );
int64_t OSAtomicAdd64Barrier( int64_t theAmount, int64_t *theValue );

inline static
int64_t OSAtomicIncrement64( int64_t *theValue )
            { return OSAtomicAdd64(  1, theValue); }
inline static
int64_t OSAtomicIncrement64Barrier( int64_t *theValue )
            { return OSAtomicAdd64Barrier(  1, theValue); }

inline static
int64_t OSAtomicDecrement64( int64_t *theValue )
            { return OSAtomicAdd64( -1, theValue); }
inline static
int64_t OSAtomicDecrement64Barrier( int64_t *theValue )
            { return OSAtomicAdd64Barrier( -1, theValue); }

#endif  /* defined(__ppc64__) || defined(__i386__) || defined(__x86_64__) */

so if it's possible, I might end up having to provide my own definitions.</pre>
        </div>
      </p>
      <hr>
      <span>You are receiving this mail because:</span>
      
      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>