[LLVMbugs] [Bug 18470] New: [powerpc-darwin8] missing 64b atomic operations on PPC32
bugzilla-daemon at llvm.org
bugzilla-daemon at llvm.org
Mon Jan 13 21:28:10 PST 2014
http://llvm.org/bugs/show_bug.cgi?id=18470
Bug ID: 18470
Summary: [powerpc-darwin8] missing 64b atomic operations on
PPC32
Product: compiler-rt
Version: unspecified
Hardware: Macintosh
OS: MacOS X
Status: NEW
Severity: normal
Priority: P
Component: compiler-rt
Assignee: unassignedbugs at nondot.org
Reporter: fang at csl.cornell.edu
CC: llvmbugs at cs.uiuc.edu
Classification: Unclassified
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
>::store' requested here
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.
--
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20140114/1f1ad018/attachment.html>
More information about the llvm-bugs
mailing list