gcc/libatomic
Andi Kleen 94f3ccc8d9 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
2013-03-24 00:23:10 +00:00
..
config Update copyright years in libatomic. 2013-01-14 18:16:23 +00:00
testsuite Update copyright years in libatomic. 2013-01-14 18:16:23 +00:00
.gitignore
ChangeLog Update copyright years in libatomic. 2013-01-14 18:16:23 +00:00
Makefile.am Update copyright years in libatomic. 2013-01-14 18:16:23 +00:00
Makefile.in re PR go/55201 (libgo.so: undefined reference to `__atomic_compare_exchange_8') 2012-12-18 22:04:08 +00:00
acinclude.m4 acinclude.m4 (LIBAT_CHECK_IFUNC): Clarify message. 2012-11-05 00:27:03 +01:00
aclocal.m4 Allow for objects in libatomic_la_LIBADD 2012-05-07 16:11:14 +00:00
auto-config.h.in
cas_n.c Update copyright years in libatomic. 2013-01-14 18:16:23 +00:00
configure acinclude.m4 (LIBAT_CHECK_IFUNC): Clarify message. 2012-11-05 00:27:03 +01:00
configure.ac Update copyright years in libatomic. 2013-01-14 18:16:23 +00:00
configure.tgt Update copyright years in libatomic. 2013-01-14 18:16:23 +00:00
exch_n.c Update copyright years in libatomic. 2013-01-14 18:16:23 +00:00
fadd_n.c Update copyright years in libatomic. 2013-01-14 18:16:23 +00:00
fand_n.c
fior_n.c
fnand_n.c
fop_n.c Update copyright years in libatomic. 2013-01-14 18:16:23 +00:00
fsub_n.c
fxor_n.c
gcas.c Avoid non constant memory model uses in libatomic 2013-03-24 00:23:10 +00:00
gexch.c Avoid non constant memory model uses in libatomic 2013-03-24 00:23:10 +00:00
glfree.c Update copyright years in libatomic. 2013-01-14 18:16:23 +00:00
gload.c Avoid non constant memory model uses in libatomic 2013-03-24 00:23:10 +00:00
gstore.c Avoid non constant memory model uses in libatomic 2013-03-24 00:23:10 +00:00
host-config.h Update copyright years in libatomic. 2013-01-14 18:16:23 +00:00
init.c
libatomic.map
libatomic_i.h Update copyright years in libatomic. 2013-01-14 18:16:23 +00:00
load_n.c Update copyright years in libatomic. 2013-01-14 18:16:23 +00:00
store_n.c Update copyright years in libatomic. 2013-01-14 18:16:23 +00:00
tas_n.c Update copyright years in libatomic. 2013-01-14 18:16:23 +00:00