diff options
author | Andi Kleen <ak@gcc.gnu.org> | 2013-03-24 00:23:10 +0000 |
---|---|---|
committer | Andi Kleen <ak@gcc.gnu.org> | 2013-03-24 00:23:10 +0000 |
commit | 94f3ccc8d92b9225626e1f69c31b8cc9d109f74d (patch) | |
tree | 269d27bfd77024794cb584070ad5cfd266a0dd75 /libatomic/gload.c | |
parent | 0b8799fbf3272f81b9932a04774f99a6addab430 (diff) | |
download | gcc-94f3ccc8d92b9225626e1f69c31b8cc9d109f74d.zip gcc-94f3ccc8d92b9225626e1f69c31b8cc9d109f74d.tar.gz gcc-94f3ccc8d92b9225626e1f69c31b8cc9d109f74d.tar.bz2 |
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
From-SVN: r197017
Diffstat (limited to 'libatomic/gload.c')
-rw-r--r-- | libatomic/gload.c | 2 |
1 files changed, 1 insertions, 1 deletions
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 |