summaryrefslogtreecommitdiffstats
path: root/libatomic/gcas.c
diff options
context:
space:
mode:
authorak <ak@138bc75d-0d04-0410-961f-82ee72b054a4>2013-03-24 00:23:10 +0000
committerak <ak@138bc75d-0d04-0410-961f-82ee72b054a4>2013-03-24 00:23:10 +0000
commite411626fc6e4e9b5e3367f40e88be6bb34b32d09 (patch)
tree269d27bfd77024794cb584070ad5cfd266a0dd75 /libatomic/gcas.c
parent5f953a64e7429c5a0a1174100aba0f4103823669 (diff)
downloadppe42-gcc-e411626fc6e4e9b5e3367f40e88be6bb34b32d09.tar.gz
ppe42-gcc-e411626fc6e4e9b5e3367f40e88be6bb34b32d09.zip
Avoid non constant memory model uses in libatomic
x86 ends up using non constant memory models for some of the libatomic functions. These all end up as __ATOMIC_SEQ_CST. Just use this directly. This avoids a new warning for non constant memory models, which broke the bootstrap with -Werror Passed bootstrap and test on x86_64-linux. libatomic/: 2013-03-23 Andi Kleen <ak@linux.intel.com> * gcas.c: (EXACT_INLINE): Use __ATOMIC_SEQ_CST. * gexch.c: (EXACT_INLINE): Use __ATOMIC_SEQ_CST. * gload.c: (EXACT_INLINE): Use __ATOMIC_SEQ_CST. * gstore.c: (EXACT_INLINE): Use __ATOMIC_SEQ_CST. diff --git a/libatomic/gcas.c b/libatomic/gcas.c index edbf611..e3d77f3 100644 --- a/libatomic/gcas.c +++ b/libatomic/gcas.c @@ -32,7 +32,7 @@ # define EXACT_INLINE(N) \ if (C2(HAVE_ATOMIC_CAS_,N)) \ return __atomic_compare_exchange_n \ - (PTR(N,mptr), PTR(N,eptr), *PTR(N,dptr), false, smodel, fmodel) + (PTR(N,mptr), PTR(N,eptr), *PTR(N,dptr), false, __ATOMIC_SEQ_CST, __ATOMIC_SEQ_CST) #else # define EXACT_INLINE(N) #endif diff --git a/libatomic/gexch.c b/libatomic/gexch.c index 1999067..c8c8658 100644 --- a/libatomic/gexch.c +++ b/libatomic/gexch.c @@ -33,7 +33,7 @@ if (C2(HAVE_ATOMIC_EXCHANGE_,N)) \ { \ *PTR(N,rptr) = __atomic_exchange_n \ - (PTR(N,mptr), *PTR(N,vptr), smodel); \ + (PTR(N,mptr), *PTR(N,vptr), __ATOMIC_SEQ_CST); \ return; \ } #else diff --git a/libatomic/gload.c b/libatomic/gload.c index df318d5..85865bd 100644 --- a/libatomic/gload.c +++ b/libatomic/gload.c @@ -32,7 +32,7 @@ # define EXACT_INLINE(N, DEST, SRC, DONE) \ if (C2(HAVE_ATOMIC_LDST_,N)) \ { \ - DEST = __atomic_load_n (SRC, smodel); \ + DEST = __atomic_load_n (SRC, __ATOMIC_SEQ_CST); \ DONE; \ } #else diff --git a/libatomic/gstore.c b/libatomic/gstore.c index d571e58..84f9a8d 100644 --- a/libatomic/gstore.c +++ b/libatomic/gstore.c @@ -32,7 +32,7 @@ # define EXACT_INLINE(N) \ if (C2(HAVE_ATOMIC_LDST_,N)) \ { \ - __atomic_store_n (PTR(N,mptr), *PTR(N,vptr), smodel); \ + __atomic_store_n (PTR(N,mptr), *PTR(N,vptr), __ATOMIC_SEQ_CST); \ return; \ } #else git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@197017 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libatomic/gcas.c')
-rw-r--r--libatomic/gcas.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/libatomic/gcas.c b/libatomic/gcas.c
index edbf611f1b4..e3d77f3f558 100644
--- a/libatomic/gcas.c
+++ b/libatomic/gcas.c
@@ -32,7 +32,7 @@
# define EXACT_INLINE(N) \
if (C2(HAVE_ATOMIC_CAS_,N)) \
return __atomic_compare_exchange_n \
- (PTR(N,mptr), PTR(N,eptr), *PTR(N,dptr), false, smodel, fmodel)
+ (PTR(N,mptr), PTR(N,eptr), *PTR(N,dptr), false, __ATOMIC_SEQ_CST, __ATOMIC_SEQ_CST)
#else
# define EXACT_INLINE(N)
#endif
OpenPOWER on IntegriCloud