Re: [arm-embedded] [PATCH, 1/7] Move memory model declarations in memmodel.h

2016-10-27 Thread Thomas Preudhomme

On 22/09/16 17:41, Thomas Preudhomme wrote:

Hi,

We've decided to apply the following patch to ARM/embedded-6-branch.


Sorry I meant ARM/embedded-5-branch. This has just been applied on 
ARM/embedded-6-branch as well 2 days ago (2016-10-25).


Best regards,

Thomas


[arm-embedded] [PATCH, 1/7] Move memory model declarations in memmodel.h

2016-09-22 Thread Thomas Preudhomme

Hi,

We've decided to apply the following patch to ARM/embedded-6-branch.

Best regards,

Thomas
--- Begin Message ---

Hi,

This patch is part of a patch series to add support for ARMv8-M[1] to GCC. This 
specific patch moves memory model declarations in memmodel.h.


Currently, is_mm_* memory model related functions are declared in tree.h which 
prevents using them in constraints machine description files. This patch move 
this functions into a new memmodel.h header to allow such a thing and update all 
users of this function to include the new header.


ChangeLog entries are as follows:

*** gcc/ChangeLog ***

2016-04-20  Thomas Preud'homme  

* tree.h (memmodel_from_int, memmodel_base, is_mm_relaxed,
is_mm_consume, is_mm_acquire, is_mm_release, is_mm_acq_rel,
is_mm_seq_cst, is_mm_sync): Move to ...
* memmodel.h: This.  New file.
* builtins.c: Include memmodel.h.
* optabs.c: Likewise.
* tsan.c: Likewise.
* config/aarch64/aarch64.c: Likewise.
* config/alpha/alpha.c: Likewise.
* config/arm/arm.c: Likewise.
* config/i386/i386.c: Likewise.
* config/ia64/ia64.c: Likewise.
* config/mips/mips.c: Likewise.
* config/rs6000/rs6000.c: Likewise.
* config/sparc/sparc.c: Likewise.
* genconditions.c: Include memmodel.h in generated file.
* genemit.c: Likewise.
* genoutput.c: Likewise.
* genpeep.c: Likewise.
* genpreds.c: Likewise.
* genrecog.c: Likewise.


*** gcc/c-family/ChangeLog ***

2016-04-20  Thomas Preud'homme  

* c-common.c: Include memmodel.h.


Is this ok for trunk?

Best regards,

Thomas
diff --git a/gcc/builtins.c b/gcc/builtins.c
index b981bcd281af29cdbb1d6bcc1e9f93b769708897..3d9c8aa38b6aea03b2f4ddc59222f19ba078 100644
--- a/gcc/builtins.c
+++ b/gcc/builtins.c
@@ -28,6 +28,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "target.h"
 #include "rtl.h"
 #include "tree.h"
+#include "memmodel.h"
 #include "gimple.h"
 #include "predict.h"
 #include "tm_p.h"
diff --git a/gcc/c-family/c-common.c b/gcc/c-family/c-common.c
index 399ba975184e934bc061113286787840a7531291..a74301fa6de1897007635574ab36058572d953b3 100644
--- a/gcc/c-family/c-common.c
+++ b/gcc/c-family/c-common.c
@@ -25,6 +25,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "target.h"
 #include "function.h"
 #include "tree.h"
+#include "memmodel.h"
 #include "c-common.h"
 #include "gimple-expr.h"
 #include "tm_p.h"
diff --git a/gcc/config/aarch64/aarch64.c b/gcc/config/aarch64/aarch64.c
index 5efad462f11f2954a65386b3b6b8d51bd61c51c1..913e026f54cc8464ba9cee0dbecd2a711458dc41 100644
--- a/gcc/config/aarch64/aarch64.c
+++ b/gcc/config/aarch64/aarch64.c
@@ -26,6 +26,7 @@
 #include "target.h"
 #include "rtl.h"
 #include "tree.h"
+#include "memmodel.h"
 #include "gimple.h"
 #include "cfghooks.h"
 #include "cfgloop.h"
diff --git a/gcc/config/alpha/alpha.c b/gcc/config/alpha/alpha.c
index 702cd277ede8860c53d3ce4c03a8c6d81f7b5c5b..488902741504bc2f93424da6e80e83270d24edd2 100644
--- a/gcc/config/alpha/alpha.c
+++ b/gcc/config/alpha/alpha.c
@@ -26,6 +26,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "target.h"
 #include "rtl.h"
 #include "tree.h"
+#include "memmodel.h"
 #include "gimple.h"
 #include "df.h"
 #include "tm_p.h"
diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c
index 946f308ca84e232af8af6eca4813464914cbd59c..97b3ef1673a98f406aed023f5715c35ebf69b07e 100644
--- a/gcc/config/arm/arm.c
+++ b/gcc/config/arm/arm.c
@@ -27,6 +27,7 @@
 #include "target.h"
 #include "rtl.h"
 #include "tree.h"
+#include "memmodel.h"
 #include "cfghooks.h"
 #include "df.h"
 #include "tm_p.h"
diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c
index 3ac115c64f717f928eeb8085fea941383121df85..00c5a3db569e0d1758a8e96b3ff1b9f4446b6ad7 100644
--- a/gcc/config/i386/i386.c
+++ b/gcc/config/i386/i386.c
@@ -23,6 +23,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "backend.h"
 #include "rtl.h"
 #include "tree.h"
+#include "memmodel.h"
 #include "gimple.h"
 #include "cfghooks.h"
 #include "cfgloop.h"
diff --git a/gcc/config/ia64/ia64.c b/gcc/config/ia64/ia64.c
index ebd2c86b8d8f917248453070105b1fb5178bc7a3..1f3628b254cac4ef9ea0e72024fe309c4d0eb0da 100644
--- a/gcc/config/ia64/ia64.c
+++ b/gcc/config/ia64/ia64.c
@@ -26,6 +26,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "target.h"
 #include "rtl.h"
 #include "tree.h"
+#include "memmodel.h"
 #include "cfghooks.h"
 #include "df.h"
 #include "tm_p.h"
diff --git a/gcc/config/mips/mips.c b/gcc/config/mips/mips.c
index 88f4038224a9cdc904cbf15b2a5833b6525702ab..3586a1001e7a920571b1be6d41f9a8e1345f33cc 100644
--- a/gcc/config/mips/mips.c
+++ b/gcc/config/mips/mips.c
@@ -28,6 +28,7 @@ along with GCC; see the file COPYING3.  If not see
 #include "target.h"
 #include "rtl.h"
 #include "tree.h"
+#include