@@ -3383,7 +3383,7 @@ s-params.options: $(srcdir)/params-options.h $(srcdir)/params.def
PLUGIN_HEADERS = $(TREE_H) $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) \
toplev.h $(DIAGNOSTIC_CORE_H) $(BASIC_BLOCK_H) $(HASH_TABLE_H) \
tree-ssa-alias.h $(INTERNAL_FN_H) gimple-fold.h tree-eh.h gimple-expr.h \
- gimple.h is-a.h $(TREE_PASS_H) $(GCC_PLUGIN_H) \
+ gimple.h is-a.h memmodel.h $(TREE_PASS_H) $(GCC_PLUGIN_H) \
$(GGC_H) $(TREE_DUMP_H) $(PRETTY_PRINT_H) $(OPTS_H) $(PARAMS_H) \
$(tm_file_list) $(tm_include_list) $(tm_p_file_list) $(tm_p_include_list) \
$(host_xm_file_list) $(host_xm_include_list) $(xm_include_list) \
@@ -26,6 +26,7 @@
#include "config.h"
#include "system.h"
#include "coretypes.h"
+#include "memmodel.h"
#include "tm.h"
#include "vec.h"
#include "alias.h"
@@ -27,6 +27,7 @@ along with GCC; see the file COPYING3. If not see
#include "tree.h"
#include "gimple.h"
#include "df.h"
+#include "memmodel.h"
#include "tm_p.h"
#include "gimple-ssa.h"
#include "emit-rtl.h"
@@ -30,6 +30,7 @@ along with GCC; see the file COPYING3. If not see
#include "cfghooks.h"
#include "alloc-pool.h"
#include "tree-pass.h"
+#include "memmodel.h"
#include "tm_p.h"
#include "stringpool.h"
#include "tree-vrp.h"
@@ -28,6 +28,7 @@ along with GCC; see the file COPYING3. If not see
#include "predict.h"
#include "df.h"
#include "insn-config.h"
+#include "memmodel.h"
#include "emit-rtl.h"
#include "recog.h"
#include "cfgrtl.h"
@@ -100,6 +100,7 @@
#include "tree.h"
#include "cfghooks.h"
#include "df.h"
+#include "memmodel.h"
#include "optabs.h"
#include "regs.h"
#include "emit-rtl.h"
@@ -27,6 +27,7 @@ along with GCC; see the file COPYING3. If not see
#include "df.h"
#include "insn-config.h"
#include "regs.h"
+#include "memmodel.h"
#include "emit-rtl.h"
#include "recog.h"
#include "diagnostic-core.h"
@@ -22,6 +22,7 @@ along with GCC; see the file COPYING3. If not see
#include "coretypes.h"
#include "target.h"
#include "c-common.h"
+#include "memmodel.h"
#include "tm_p.h" /* For TARGET_CPU_CPP_BUILTINS & friends. */
#include "stringpool.h"
#include "stor-layout.h"
@@ -24,6 +24,7 @@ along with GCC; see the file COPYING3. If not see
#include "tm.h"
#include "c-target.h"
#include "c-common.h"
+#include "memmodel.h"
#include "tm_p.h" /* For C_COMMON_OVERRIDE_OPTIONS. */
#include "diagnostic.h"
#include "c-pragma.h"
@@ -23,6 +23,7 @@ along with GCC; see the file COPYING3. If not see
#include "target.h"
#include "function.h" /* For cfun. */
#include "c-common.h"
+#include "memmodel.h"
#include "tm_p.h" /* For REGISTER_TARGET_PRAGMAS. */
#include "stringpool.h"
#include "cgraph.h"
@@ -24,6 +24,7 @@ along with GCC; see the file COPYING3. If not see
#include "function.h"
#include "tree.h"
#include "c-common.h"
+#include "memmodel.h"
#include "tm_p.h"
#include "diagnostic.h"
#include "intl.h"
@@ -26,6 +26,7 @@ along with GCC; see the file COPYING3. If not see
#include "config.h"
#include "system.h"
#include "coretypes.h"
+#include "memmodel.h"
#include "target.h"
#include "function.h"
#include "bitmap.h"
@@ -25,6 +25,7 @@ along with GCC; see the file COPYING3. If not see
#include "tree.h"
#include "predict.h"
#include "df.h"
+#include "memmodel.h"
#include "tm_p.h"
#include "insn-config.h"
#include "regs.h"
@@ -26,6 +26,7 @@ along with GCC; see the file COPYING3. If not see
#include "tree.h"
#include "gimple.h"
#include "predict.h"
+#include "memmodel.h"
#include "tm_p.h"
#include "stringpool.h"
#include "expmed.h"
@@ -25,6 +25,7 @@ along with GCC; see the file COPYING3. If not see
#include "rtl.h"
#include "tree.h"
#include "gimple.h"
+#include "memmodel.h"
#include "tm_p.h"
#include "ssa.h"
#include "expmed.h"
@@ -24,6 +24,7 @@ along with GCC; see the file COPYING3. If not see
#include "backend.h"
#include "rtl.h"
#include "cfghooks.h"
+#include "memmodel.h"
#include "emit-rtl.h"
#include "cfgrtl.h"
#include "cfganal.h"
@@ -38,6 +38,7 @@ along with GCC; see the file COPYING3. If not see
#include "tree.h"
#include "cfghooks.h"
#include "df.h"
+#include "memmodel.h"
#include "tm_p.h"
#include "insn-config.h"
#include "emit-rtl.h"
@@ -27,6 +27,7 @@ along with GCC; see the file COPYING3. If not see
#include "gimple.h"
#include "cfghooks.h"
#include "tree-pass.h"
+#include "memmodel.h"
#include "tm_p.h"
#include "ssa.h"
#include "optabs.h"
@@ -24,6 +24,7 @@ along with GCC; see the file COPYING3. If not see
#include "rtl.h"
#include "tree.h"
#include "predict.h"
+#include "memmodel.h"
#include "emit-rtl.h"
#include "cfgloop.h"
#include "explow.h"
@@ -47,6 +47,7 @@ along with GCC; see the file COPYING3. If not see
#include "cfghooks.h"
#include "df.h"
#include "insn-config.h"
+#include "memmodel.h"
#include "emit-rtl.h"
#include "cfgrtl.h"
#include "cfganal.h"
@@ -31,6 +31,7 @@ along with GCC; see the file COPYING3. If not see
#include "expmed.h"
#include "optabs-query.h"
#include "insn-config.h"
+#include "memmodel.h"
#include "emit-rtl.h"
#include "recog.h"
#include "fold-const.h"
@@ -45,6 +45,7 @@ along with GCC; see the file COPYING3. If not see
#include "rtl.h"
#include "df.h"
#include "insn-config.h"
+#include "memmodel.h"
#include "emit-rtl.h"
#include "recog.h"
#include "cfgrtl.h"
@@ -84,6 +84,7 @@ along with GCC; see the file COPYING3. If not see
#include "tree.h"
#include "predict.h"
#include "df.h"
+#include "memmodel.h"
#include "tm_p.h"
#include "optabs.h"
#include "regs.h"
@@ -23,6 +23,7 @@
#include "system.h"
#include "coretypes.h"
#include "tm.h"
+#include "memmodel.h"
#include "tm_p.h"
#include "common/common-target.h"
#include "common/common-target-def.h"
@@ -21,6 +21,7 @@
#include "system.h"
#include "coretypes.h"
#include "tm.h"
+#include "memmodel.h"
#include "tm_p.h"
#include "common/common-target.h"
#include "common/common-target-def.h"
@@ -22,6 +22,7 @@
#include "coretypes.h"
#include "diagnostic-core.h"
#include "tm.h"
+#include "memmodel.h"
#include "tm_p.h"
#include "common/common-target.h"
#include "common/common-target-def.h"
@@ -22,6 +22,7 @@ along with GCC; see the file COPYING3. If not see
#include "coretypes.h"
#include "diagnostic-core.h"
#include "tm.h"
+#include "memmodel.h"
#include "tm_p.h"
#include "common/common-target.h"
#include "common/common-target-def.h"
@@ -22,6 +22,7 @@ along with GCC; see the file COPYING3. If not see
#include "coretypes.h"
#include "diagnostic-core.h"
#include "tm.h"
+#include "memmodel.h"
#include "tm_p.h"
#include "common/common-target.h"
#include "common/common-target-def.h"
@@ -22,6 +22,7 @@ along with GCC; see the file COPYING3. If not see
#include "coretypes.h"
#include "diagnostic-core.h"
#include "tm.h"
+#include "memmodel.h"
#include "tm_p.h"
#include "common/common-target.h"
#include "common/common-target-def.h"
@@ -23,6 +23,7 @@ along with GCC; see the file COPYING3. If not see
#include "coretypes.h"
#include "diagnostic-core.h"
#include "tm.h"
+#include "memmodel.h"
#include "tm_p.h"
#include "common/common-target.h"
#include "common/common-target-def.h"
@@ -61,6 +61,7 @@ along with GCC; see the file COPYING3. If not see
#include "target.h"
#include "rtl.h"
#include "df.h"
+#include "memmodel.h"
#include "tm_p.h"
#include "insn-config.h"
#include "recog.h"
@@ -27,6 +27,7 @@
#include "rtl.h"
#include "tree.h"
#include "gimple.h"
+#include "memmodel.h"
#include "tm_p.h"
#include "expmed.h"
#include "optabs.h"
@@ -22,6 +22,7 @@
#include "coretypes.h"
#include "tm.h"
#include "input.h"
+#include "memmodel.h"
#include "tm_p.h"
#include "flags.h"
#include "c-family/c-common.h"
@@ -28,6 +28,7 @@
#include "df.h"
#include "insn-config.h"
#include "regs.h"
+#include "memmodel.h"
#include "emit-rtl.h"
#include "recog.h"
#include "cfganal.h"
@@ -22,6 +22,7 @@
#include "coretypes.h"
#include "tm.h"
#include "tree.h"
+#include "memmodel.h"
#include "tm_p.h"
#include "cpplib.h"
#include "c-family/c-common.h"
@@ -31,6 +31,7 @@ along with GCC; see the file COPYING3. If not see
#include "config.h"
#include "system.h"
#include "coretypes.h"
+#include "memmodel.h"
#include "backend.h"
#include "target.h"
#include "rtl.h"
@@ -25,6 +25,7 @@
#include "rtl.h"
#include "tree.h"
#include "gimple-expr.h"
+#include "memmodel.h"
#include "tm_p.h"
#include "optabs.h"
#include "emit-rtl.h"
@@ -21,6 +21,7 @@
#include "coretypes.h"
#include "target.h"
#include "c-family/c-common.h"
+#include "memmodel.h"
#include "tm_p.h"
#include "c-family/c-pragma.h"
#include "stringpool.h"
@@ -26,6 +26,7 @@
#include "c-family/c-common.h"
#include "stor-layout.h"
#include "langhooks.h"
+#include "memmodel.h"
#include "tm_p.h"
/* IDs for all the AVR builtins. */
@@ -26,6 +26,7 @@
#include "rtl.h"
#include "tree.h"
#include "tree-pass.h" /* for current_pass */
+#include "memmodel.h"
#include "tm_p.h"
#include "print-tree.h"
@@ -27,6 +27,7 @@
#include "c-family/c-common.h"
#include "cfghooks.h"
#include "df.h"
+#include "memmodel.h"
#include "tm_p.h"
#include "optabs.h"
#include "regs.h"
@@ -27,6 +27,7 @@
#include "tree.h"
#include "cfghooks.h"
#include "df.h"
+#include "memmodel.h"
#include "tm_p.h"
#include "optabs.h"
#include "regs.h"
@@ -29,6 +29,7 @@
#include "gimple-expr.h"
#include "cfghooks.h"
#include "df.h"
+#include "memmodel.h"
#include "tm_p.h"
#include "stringpool.h"
#include "optabs.h"
@@ -26,6 +26,7 @@
#include "rtl.h"
#include "tree.h"
#include "df.h"
+#include "memmodel.h"
#include "tm_p.h"
#include "regs.h"
#include "emit-rtl.h"
@@ -27,6 +27,7 @@ along with GCC; see the file COPYING3. If not see
#include "tree.h"
#include "cfghooks.h"
#include "df.h"
+#include "memmodel.h"
#include "tm_p.h"
#include "optabs.h"
#include "regs.h"
@@ -24,6 +24,7 @@ along with GCC; see the file COPYING3. If not see
#include "target.h"
#include "c-family/c-target.h"
#include "c-family/c-target-def.h"
+#include "memmodel.h"
#include "tm_p.h"
#include "cgraph.h"
#include "incpath.h"
@@ -28,6 +28,7 @@ along with GCC; see the file COPYING3. If not see
#include "gimple.h"
#include "cfghooks.h"
#include "df.h"
+#include "memmodel.h"
#include "tm_p.h"
#include "stringpool.h"
#include "insn-config.h"
@@ -26,6 +26,7 @@ along with GCC; see the file COPYING3. If not see
#include "rtl.h"
#include "tree.h"
#include "df.h"
+#include "memmodel.h"
#include "tm_p.h"
#include "stringpool.h"
#include "optabs.h"
@@ -25,6 +25,7 @@ along with GCC; see the file COPYING3. If not see
#include "backend.h"
#include "rtl.h"
#include "df.h"
+#include "memmodel.h"
#include "tm_p.h"
#include "emit-rtl.h"
#include "tree-pass.h"
@@ -24,6 +24,7 @@ along with GCC; see the file COPYING3. If not see
#include "backend.h"
#include "rtl.h"
#include "df.h"
+#include "memmodel.h"
#include "tm_p.h"
#include "insn-config.h"
#include "emit-rtl.h"
@@ -28,6 +28,7 @@
#include "rtl.h"
#include "tree.h"
#include "df.h"
+#include "memmodel.h"
#include "emit-rtl.h"
#include "stor-layout.h"
#include "varasm.h"
@@ -25,6 +25,7 @@ along with GCC; see the file COPYING3. If not see
#include "rtl.h"
#include "tree.h"
#include "df.h"
+#include "memmodel.h"
#include "tm_p.h"
#include "stringpool.h"
#include "optabs.h"
@@ -26,6 +26,7 @@
#include "rtl.h"
#include "tree.h"
#include "df.h"
+#include "memmodel.h"
#include "tm_p.h"
#include "regs.h"
#include "emit-rtl.h"
@@ -27,6 +27,7 @@ along with GCC; see the file COPYING3. If not see
#include "rtl.h"
#include "tree.h"
#include "df.h"
+#include "memmodel.h"
#include "tm_p.h"
#include "stringpool.h"
#include "optabs.h"
@@ -22,6 +22,7 @@ along with GCC; see the file COPYING3. If not see
#include "coretypes.h"
#include "target.h"
#include "c-family/c-common.h"
+#include "memmodel.h"
#include "tm_p.h"
#include "c-family/c-pragma.h"
@@ -27,6 +27,7 @@ along with GCC; see the file COPYING3. If not see
#include "rtl.h"
#include "tree.h"
#include "gimple.h"
+#include "memmodel.h"
#include "tm_p.h"
#include "stringpool.h"
#include "emit-rtl.h"
@@ -25,6 +25,7 @@ along with GCC; see the file COPYING3. If not see
#include "rtl.h"
#include "tree.h"
#include "df.h"
+#include "memmodel.h"
#include "tm_p.h"
#include "optabs.h"
#include "regs.h"
@@ -27,6 +27,7 @@
#include "rtl.h"
#include "tree.h"
#include "df.h"
+#include "memmodel.h"
#include "tm_p.h"
#include "optabs.h"
#include "regs.h"
@@ -26,6 +26,7 @@
#include "rtl.h"
#include "tree.h"
#include "df.h"
+#include "memmodel.h"
#include "tm_p.h"
#include "optabs.h"
#include "regs.h"
@@ -25,6 +25,7 @@
#include "rtl.h"
#include "tree.h"
#include "df.h"
+#include "memmodel.h"
#include "tm_p.h"
#include "stringpool.h"
#include "insn-config.h"
@@ -41,6 +41,7 @@ along with GCC; see the file COPYING3. If not see
#include "expmed.h"
#include "dojump.h"
#include "explow.h"
+#include "memmodel.h"
#include "emit-rtl.h"
#include "stmt.h"
#include "expr.h"
@@ -25,6 +25,7 @@
#include "rtl.h"
#include "tree.h"
#include "df.h"
+#include "memmodel.h"
#include "tm_p.h"
#include "stringpool.h"
#include "emit-rtl.h"
@@ -27,6 +27,7 @@
#include "rtl.h"
#include "tree.h"
#include "df.h"
+#include "memmodel.h"
#include "tm_p.h"
#include "optabs.h"
#include "regs.h"
@@ -26,6 +26,7 @@ along with GCC; see the file COPYING3. If not see
#include "rtl.h"
#include "tree.h"
#include "df.h"
+#include "memmodel.h"
#include "tm_p.h"
#include "insn-config.h"
#include "regs.h"
@@ -28,6 +28,7 @@
#include "cfghooks.h"
#include "cfgloop.h"
#include "df.h"
+#include "memmodel.h"
#include "tm_p.h"
#include "optabs.h"
#include "regs.h"
@@ -27,6 +27,7 @@
#include "tree.h"
#include "df.h"
#include "regs.h"
+#include "memmodel.h"
#include "emit-rtl.h"
#include "diagnostic-core.h"
#include "output.h"
@@ -27,6 +27,7 @@
#include "tree.h"
#include "gimple-expr.h"
#include "df.h"
+#include "memmodel.h"
#include "tm_p.h"
#include "regs.h"
#include "emit-rtl.h"
@@ -27,6 +27,7 @@
#include "target.h"
#include "rtl.h"
#include "tree.h"
+#include "memmodel.h"
#include "tm_p.h"
#include "optabs.h" /* For GEN_FCN. */
#include "recog.h"
@@ -27,6 +27,7 @@
#include "target.h"
#include "rtl.h"
#include "tree.h"
+#include "memmodel.h"
#include "optabs.h" /* For GEN_FCN. */
#include "diagnostic-core.h"
#include "stor-layout.h"
@@ -28,6 +28,7 @@
#include "target.h"
#include "rtl.h"
#include "tree.h"
+#include "memmodel.h"
#include "tm_p.h"
#include "optabs.h" /* For GEN_FCN. */
#include "recog.h"
@@ -27,6 +27,7 @@
#include "backend.h"
#include "target.h"
#include "rtl.h"
+#include "memmodel.h"
#include "emit-rtl.h"
#include "explow.h"
@@ -27,6 +27,7 @@
#include "target.h"
#include "rtl.h"
#include "tree.h"
+#include "memmodel.h"
#include "tm_p.h"
#include "optabs.h" /* For GEN_FCN. */
#include "emit-rtl.h"
@@ -28,6 +28,7 @@
#include "rtl.h"
#include "tree.h"
#include "df.h"
+#include "memmodel.h"
#include "tm_p.h"
#include "optabs.h" /* For GEN_FCN. */
#include "regs.h"
@@ -28,6 +28,7 @@
#include "rtl.h"
#include "tree.h"
#include "df.h"
+#include "memmodel.h"
#include "tm_p.h"
#include "optabs.h"
#include "regs.h"
@@ -28,6 +28,7 @@
#include "tree.h"
#include "cfghooks.h"
#include "df.h"
+#include "memmodel.h"
#include "tm_p.h"
#include "expmed.h"
#include "optabs.h"
@@ -21,6 +21,7 @@ along with GCC; see the file COPYING3. If not see
#include "config.h"
#include "system.h"
#include "coretypes.h"
+#include "memmodel.h"
#include "backend.h"
#include "target.h"
#include "rtl.h"
@@ -26,6 +26,7 @@ along with GCC; see the file COPYING3. If not see
#include "rtl.h"
#include "tree.h"
#include "df.h"
+#include "memmodel.h"
#include "tm_p.h"
#include "insn-config.h"
#include "regs.h"
@@ -26,6 +26,7 @@
#include "rtl.h"
#include "tree.h"
#include "df.h"
+#include "memmodel.h"
#include "tm_p.h"
#include "stringpool.h"
#include "optabs.h"
@@ -25,6 +25,7 @@
#include "coretypes.h"
#include "target.h"
#include "c-family/c-common.h"
+#include "memmodel.h"
#include "tm_p.h"
#include "stringpool.h"
#include "stor-layout.h"
@@ -31,6 +31,7 @@
#include "tree.h"
#include "cfghooks.h"
#include "df.h"
+#include "memmodel.h"
#include "tm_p.h"
#include "regs.h"
#include "emit-rtl.h"
@@ -34,6 +34,7 @@
#include "tree.h"
#include "c-family/c-common.h"
#include "c/c-tree.h"
+#include "memmodel.h"
#include "tm_p.h"
#include "stringpool.h"
#include "c-family/c-pragma.h"
@@ -32,6 +32,7 @@ along with GCC; see the file COPYING3. If not see
#include "cfghooks.h"
#include "cfgloop.h"
#include "df.h"
+#include "memmodel.h"
#include "tm_p.h"
#include "stringpool.h"
#include "expmed.h"
@@ -23,6 +23,7 @@ along with GCC; see the file COPYING3. If not see
#include "coretypes.h"
#include "target.h"
#include "c-family/c-common.h"
+#include "memmodel.h"
#include "tm_p.h"
#include "stringpool.h"
#include "attribs.h"
@@ -25,6 +25,7 @@ along with GCC; see the file COPYING3. If not see
#include "basic-block.h"
#include "rtl.h"
#include "tree.h"
+#include "memmodel.h"
#include "tm_p.h"
#include "emit-rtl.h"
#include "explow.h"
@@ -32,6 +32,7 @@ along with GCC; see the file COPYING3. If not see
#include "gimple.h"
#include "cfghooks.h"
#include "df.h"
+#include "memmodel.h"
#include "tm_p.h"
#include "stringpool.h"
#include "optabs.h"
@@ -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 "optabs.h"
#include "emit-rtl.h"
#include "recog.h"
@@ -24,6 +24,7 @@ along with GCC; see the file COPYING3. If not see
#include "target.h"
#include "rtl.h"
#include "tree.h"
+#include "memmodel.h"
#include "tm_p.h"
#include "stringpool.h"
#include "diagnostic-core.h"
@@ -25,6 +25,7 @@
#include "cfghooks.h"
#include "cfgloop.h"
#include "df.h"
+#include "memmodel.h"
#include "tm_p.h"
#include "stringpool.h"
#include "expmed.h"
@@ -27,6 +27,7 @@
#include "tree.h"
#include "gimple.h"
#include "df.h"
+#include "memmodel.h"
#include "tm_p.h"
#include "stringpool.h"
#include "optabs.h"
@@ -21,6 +21,7 @@
#include "config.h"
#include "system.h"
#include "coretypes.h"
+#include "memmodel.h"
#include "backend.h"
#include "target.h"
#include "rtl.h"
@@ -27,6 +27,7 @@
#include "tree.h"
#include "gimple.h"
#include "df.h"
+#include "memmodel.h"
#include "tm_p.h"
#include "stringpool.h"
#include "expmed.h"
@@ -26,6 +26,7 @@
#include "rtl.h"
#include "tree.h"
#include "df.h"
+#include "memmodel.h"
#include "tm_p.h"
#include "stringpool.h"
#include "insn-config.h"
@@ -25,6 +25,7 @@ along with GCC; see the file COPYING3. If not see
#include "rtl.h"
#include "tree.h"
#include "df.h"
+#include "memmodel.h"
#include "tm_p.h"
#include "optabs.h"
#include "regs.h"
@@ -27,6 +27,7 @@
#include "tree.h"
#include "gimple-expr.h"
#include "df.h"
+#include "memmodel.h"
#include "tm_p.h"
#include "stringpool.h"
#include "expmed.h"
@@ -25,6 +25,7 @@ along with GCC; see the file COPYING3. If not see
#include "tree.h"
#include "c-family/c-common.h"
#include "c/c-tree.h"
+#include "memmodel.h"
#include "tm_p.h"
#include "c-family/c-pragma.h"
#include "toplev.h"
@@ -28,6 +28,7 @@ along with GCC; see the file COPYING3. If not see
#include "gimple.h"
#include "cfghooks.h"
#include "df.h"
+#include "memmodel.h"
#include "tm_p.h"
#include "stringpool.h"
#include "optabs.h"
@@ -331,34 +331,6 @@ enum symbol_visibility
VISIBILITY_INTERNAL
};
-/* Suppose that higher bits are target dependent. */
-#define MEMMODEL_MASK ((1<<16)-1)
-
-/* Legacy sync operations set this upper flag in the memory model. This allows
- targets that need to do something stronger for sync operations to
- differentiate with their target patterns and issue a more appropriate insn
- sequence. See bugzilla 65697 for background. */
-#define MEMMODEL_SYNC (1<<15)
-
-/* Memory model without SYNC bit for targets/operations that do not care. */
-#define MEMMODEL_BASE_MASK (MEMMODEL_SYNC-1)
-
-/* Memory model types for the __atomic* builtins.
- This must match the order in libstdc++-v3/include/bits/atomic_base.h. */
-enum memmodel
-{
- MEMMODEL_RELAXED = 0,
- MEMMODEL_CONSUME = 1,
- MEMMODEL_ACQUIRE = 2,
- MEMMODEL_RELEASE = 3,
- MEMMODEL_ACQ_REL = 4,
- MEMMODEL_SEQ_CST = 5,
- MEMMODEL_LAST = 6,
- MEMMODEL_SYNC_ACQUIRE = MEMMODEL_ACQUIRE | MEMMODEL_SYNC,
- MEMMODEL_SYNC_RELEASE = MEMMODEL_RELEASE | MEMMODEL_SYNC,
- MEMMODEL_SYNC_SEQ_CST = MEMMODEL_SEQ_CST | MEMMODEL_SYNC
-};
-
/* Support for user-provided GGC and PCH markers. The first parameter
is a pointer to a pointer, the second a cookie. */
typedef void (*gt_pointer_operator) (void *, void *);
@@ -32,6 +32,7 @@ along with GCC; see the file COPYING3. If not see
#include "rtl.h"
#include "tree.h"
#include "tree-pass.h"
+#include "memmodel.h"
#include "tm_p.h"
#include "stringpool.h"
#include "cgraph.h"
@@ -29,6 +29,7 @@ along with GCC; see the file COPYING3. If not see
#include "config.h"
#include "system.h"
#include "coretypes.h"
+#include "memmodel.h"
#include "target.h"
#include "cp-tree.h"
#include "c-family/c-common.h"
@@ -23,6 +23,7 @@ along with GCC; see the file COPYING3. If not see
#include "coretypes.h"
#include "target.h"
#include "cp-tree.h"
+#include "memmodel.h"
#include "tm_p.h"
#include "stringpool.h"
#include "intl.h"
@@ -20,6 +20,7 @@ along with GCC; see the file COPYING3. If not see
#include "config.h"
#include "system.h"
#include "coretypes.h"
+#include "memmodel.h"
#include "target.h"
#include "tree.h"
#include "version.h"
@@ -25,6 +25,7 @@ along with GCC; see the file COPYING3. If not see
#include "cfghooks.h"
#include "df.h"
#include "insn-config.h"
+#include "memmodel.h"
#include "emit-rtl.h"
#include "recog.h"
#include "diagnostic-core.h"
@@ -26,6 +26,7 @@ along with GCC; see the file COPYING3. If not see
#include "tree.h"
#include "cfghooks.h"
#include "df.h"
+#include "memmodel.h"
#include "tm_p.h"
#include "insn-config.h"
#include "regs.h"
@@ -25,6 +25,7 @@ along with GCC; see the file COPYING3. If not see
#include "rtl.h"
#include "tree.h"
#include "df.h"
+#include "memmodel.h"
#include "tm_p.h"
#include "regs.h"
#include "emit-rtl.h"
@@ -73,6 +73,7 @@ along with GCC; see the file COPYING3. If not see
#include "function.h"
#include "rtl.h"
#include "tree.h"
+#include "memmodel.h"
#include "tm_p.h"
#include "stringpool.h"
#include "insn-config.h"
@@ -25,6 +25,7 @@ along with GCC; see the file COPYING3. If not see
#include "tree.h"
#include "predict.h"
#include "df.h"
+#include "memmodel.h"
#include "tm_p.h"
#include "emit-rtl.h" /* FIXME: Can go away once crtl is moved to rtl.h. */
#include "cfgrtl.h"
@@ -380,6 +380,7 @@ are write-only operations.
#include "backend.h"
#include "rtl.h"
#include "df.h"
+#include "memmodel.h"
#include "emit-rtl.h"
#include "cfganal.h"
#include "tree-pass.h"
@@ -28,6 +28,7 @@ along with GCC; see the file COPYING3. If not see
#include "target.h"
#include "rtl.h"
#include "df.h"
+#include "memmodel.h"
#include "tm_p.h"
#include "insn-config.h"
#include "cfganal.h"
@@ -29,6 +29,7 @@ along with GCC; see the file COPYING3. If not see
#include "rtl.h"
#include "tree.h"
#include "df.h"
+#include "memmodel.h"
#include "tm_p.h"
#include "regs.h"
#include "emit-rtl.h" /* FIXME: Can go away once crtl is moved to rtl.h. */
@@ -25,6 +25,7 @@ along with GCC; see the file COPYING3. If not see
#include "rtl.h"
#include "tree.h"
#include "predict.h"
+#include "memmodel.h"
#include "tm_p.h"
#include "optabs.h"
#include "emit-rtl.h"
@@ -32,6 +32,7 @@ along with GCC; see the file COPYING3. If not see
#include "gimple.h"
#include "predict.h"
#include "df.h"
+#include "memmodel.h"
#include "tm_p.h"
#include "gimple-ssa.h"
#include "expmed.h"
@@ -24,6 +24,7 @@ along with GCC; see the file COPYING3. If not see
#include "target.h"
#include "rtl.h"
#include "tree.h"
+#include "memmodel.h"
#include "tm_p.h"
#include "stringpool.h"
#include "varasm.h"
@@ -25,6 +25,7 @@ along with GCC; see the file COPYING3. If not see
#include "rtl.h"
#include "tree.h"
#include "tree-pass.h"
+#include "memmodel.h"
#include "tm_p.h"
#include "emit-rtl.h"
#include "stor-layout.h"
@@ -62,6 +62,7 @@ along with GCC; see the file COPYING3. If not see
#include "function.h"
#include "rtl.h"
#include "tree.h"
+#include "memmodel.h"
#include "tm_p.h"
#include "stringpool.h"
#include "insn-config.h"
@@ -34,6 +34,7 @@ along with GCC; see the file COPYING3. If not see
#include "config.h"
#include "system.h"
#include "coretypes.h"
+#include "memmodel.h"
#include "backend.h"
#include "target.h"
#include "rtl.h"
@@ -118,6 +118,7 @@ along with GCC; see the file COPYING3. If not see
#include "tree.h"
#include "cfghooks.h"
#include "tree-pass.h"
+#include "memmodel.h"
#include "tm_p.h"
#include "stringpool.h"
#include "expmed.h"
@@ -25,6 +25,7 @@ along with GCC; see the file COPYING3. If not see
#include "function.h"
#include "rtl.h"
#include "tree.h"
+#include "memmodel.h"
#include "tm_p.h"
#include "expmed.h"
#include "optabs.h"
@@ -27,6 +27,7 @@ along with GCC; see the file COPYING3. If not see
#include "rtl.h"
#include "tree.h"
#include "predict.h"
+#include "memmodel.h"
#include "tm_p.h"
#include "expmed.h"
#include "optabs.h"
@@ -26,6 +26,7 @@ along with GCC; see the file COPYING3. If not see
#include "tree.h"
#include "gimple.h"
#include "predict.h"
+#include "memmodel.h"
#include "tm_p.h"
#include "ssa.h"
#include "expmed.h"
@@ -52,6 +52,7 @@ along with GCC; see the file COPYING3. If not see
#include "tree.h"
#include "cfghooks.h"
#include "df.h"
+#include "memmodel.h"
#include "tm_p.h"
#include "insn-config.h"
#include "regs.h"
@@ -49,6 +49,7 @@ along with GCC; see the file COPYING3. If not see
#include "tree.h"
#include "gimple.h"
#include "predict.h"
+#include "memmodel.h"
#include "tm_p.h"
#include "tree-ssa-operands.h"
#include "optabs-query.h"
@@ -24,6 +24,7 @@ along with GCC; see the file COPYING3. If not see
#include "config.h"
#include "system.h"
#include "coretypes.h"
+#include "memmodel.h"
#include "tm.h" /* For UNITS_PER_WORD. */
#include "tree.h"
#include "gfortran.h"
@@ -41,6 +41,7 @@ along with GCC; see the file COPYING3. If not see
#include "gimple-expr.h"
#include "cfghooks.h"
#include "df.h"
+#include "memmodel.h"
#include "tm_p.h"
#include "stringpool.h"
#include "expmed.h"
@@ -26,6 +26,7 @@ along with GCC; see the file COPYING3. If not see
#include "rtl.h"
#include "predict.h"
#include "df.h"
+#include "memmodel.h"
#include "tm_p.h"
#include "insn-config.h"
#include "emit-rtl.h"
@@ -141,6 +141,7 @@ along with GCC; see the file COPYING3. If not see
#include "tree.h"
#include "predict.h"
#include "df.h"
+#include "memmodel.h"
#include "tm_p.h"
#include "insn-config.h"
#include "print-rtl.h"
@@ -5159,6 +5159,7 @@ write_header (FILE *outf)
fprintf (outf, "#include \"stor-layout.h\"\n");
fprintf (outf, "#include \"calls.h\"\n");
fprintf (outf, "#include \"insn-attr.h\"\n");
+ fprintf (outf, "#include \"memmodel.h\"\n");
fprintf (outf, "#include \"tm_p.h\"\n");
fprintf (outf, "#include \"insn-config.h\"\n");
fprintf (outf, "#include \"recog.h\"\n");
@@ -9651,6 +9651,7 @@ main (int argc, const char **argv)
"#include \"stor-layout.h\"\n"
"#include \"calls.h\"\n"
"#include \"rtl.h\"\n"
+ "#include \"memmodel.h\"\n"
"#include \"tm_p.h\"\n"
"#include \"insn-config.h\"\n"
"#include \"recog.h\"\n"
@@ -72,6 +72,7 @@ write_header (void)
#include \"tm.h\"\n\
#include \"insn-constants.h\"\n\
#include \"rtl.h\"\n\
+#include \"memmodel.h\"\n\
#include \"tm_p.h\"\n\
#include \"hard-reg-set.h\"\n\
#include \"function.h\"\n\
@@ -94,7 +95,6 @@ write_header (void)
#include \"resource.h\"\n\
#include \"diagnostic-core.h\"\n\
#include \"reload.h\"\n\
-#include \"memmodel.h\"\n\
#include \"tm-constrs.h\"\n");
if (saw_eh_return)
@@ -773,6 +773,7 @@ from the machine description file `md'. */\n\n");
printf ("#include \"varasm.h\"\n");
printf ("#include \"stor-layout.h\"\n");
printf ("#include \"calls.h\"\n");
+ printf ("#include \"memmodel.h\"\n");
printf ("#include \"tm_p.h\"\n");
printf ("#include \"flags.h\"\n");
printf ("#include \"insn-config.h\"\n");
@@ -792,7 +793,6 @@ from the machine description file `md'. */\n\n");
printf ("#include \"reload.h\"\n");
printf ("#include \"diagnostic-core.h\"\n");
printf ("#include \"regs.h\"\n");
- printf ("#include \"memmodel.h\"\n");
printf ("#include \"tm-constrs.h\"\n");
printf ("#include \"ggc.h\"\n");
printf ("#include \"dumpfile.h\"\n");
@@ -1710,14 +1710,14 @@ open_base_files (void)
"config.h", "system.h", "coretypes.h", "backend.h", "predict.h", "tree.h",
"rtl.h", "gimple.h", "fold-const.h", "insn-codes.h", "splay-tree.h",
"alias.h", "insn-config.h", "flags.h", "expmed.h", "dojump.h",
- "explow.h", "calls.h", "cilk.h", "emit-rtl.h", "varasm.h", "stmt.h",
- "expr.h", "alloc-pool.h", "cselib.h", "insn-addr.h", "optabs.h",
- "libfuncs.h", "debug.h", "internal-fn.h", "gimple-fold.h", "tree-eh.h",
- "gimple-iterator.h", "gimple-ssa.h", "tree-cfg.h", "tree-vrp.h",
- "tree-phinodes.h", "ssa-iterators.h", "stringpool.h", "tree-ssanames.h",
- "tree-ssa-loop.h", "tree-ssa-loop-ivopts.h", "tree-ssa-loop-manip.h",
- "tree-ssa-loop-niter.h", "tree-into-ssa.h", "tree-dfa.h",
- "tree-ssa.h", "reload.h", "cpp-id-data.h", "tree-chrec.h",
+ "explow.h", "calls.h", "cilk.h", "memmodel.h", "emit-rtl.h", "varasm.h",
+ "stmt.h", "expr.h", "alloc-pool.h", "cselib.h", "insn-addr.h",
+ "optabs.h", "libfuncs.h", "debug.h", "internal-fn.h", "gimple-fold.h",
+ "tree-eh.h", "gimple-iterator.h", "gimple-ssa.h", "tree-cfg.h",
+ "tree-vrp.h", "tree-phinodes.h", "ssa-iterators.h", "stringpool.h",
+ "tree-ssanames.h", "tree-ssa-loop.h", "tree-ssa-loop-ivopts.h",
+ "tree-ssa-loop-manip.h", "tree-ssa-loop-niter.h", "tree-into-ssa.h",
+ "tree-dfa.h", "tree-ssa.h", "reload.h", "cpp-id-data.h", "tree-chrec.h",
"except.h", "output.h", "cfgloop.h", "target.h", "lto-streamer.h",
"target-globals.h", "ipa-ref.h", "cgraph.h", "symbol-summary.h",
"ipa-prop.h", "ipa-inline.h", "dwarf2out.h", "omp-low.h", NULL
@@ -257,6 +257,7 @@ main (int argc, const char **argv)
"#include \"varasm.h\"\n"
"#include \"stor-layout.h\"\n"
"#include \"calls.h\"\n"
+ "#include \"memmodel.h\"\n"
"#include \"tm_p.h\"\n"
"#include \"flags.h\"\n"
"#include \"insn-config.h\"\n"
@@ -219,6 +219,7 @@ output_prologue (void)
printf ("#include \"expmed.h\"\n");
printf ("#include \"dojump.h\"\n");
printf ("#include \"explow.h\"\n");
+ printf ("#include \"memmodel.h\"\n");
printf ("#include \"emit-rtl.h\"\n");
printf ("#include \"stmt.h\"\n");
printf ("#include \"expr.h\"\n");
@@ -231,7 +232,6 @@ output_prologue (void)
printf ("#include \"diagnostic-core.h\"\n");
printf ("#include \"output.h\"\n");
printf ("#include \"target.h\"\n");
- printf ("#include \"memmodel.h\"\n");
printf ("#include \"tm-constrs.h\"\n");
}
@@ -366,6 +366,7 @@ from the machine description file `md'. */\n\n");
printf ("#include \"varasm.h\"\n");
printf ("#include \"stor-layout.h\"\n");
printf ("#include \"calls.h\"\n");
+ printf ("#include \"memmodel.h\"\n");
printf ("#include \"tm_p.h\"\n");
printf ("#include \"regs.h\"\n");
printf ("#include \"output.h\"\n");
@@ -373,7 +374,6 @@ from the machine description file `md'. */\n\n");
printf ("#include \"except.h\"\n");
printf ("#include \"diagnostic-core.h\"\n");
printf ("#include \"flags.h\"\n");
- printf ("#include \"memmodel.h\"\n");
printf ("#include \"tm-constrs.h\"\n\n");
printf ("extern rtx peep_operand[];\n\n");
@@ -1569,6 +1569,7 @@ write_insn_preds_c (void)
#include \"varasm.h\"\n\
#include \"stor-layout.h\"\n\
#include \"calls.h\"\n\
+#include \"memmodel.h\"\n\
#include \"tm_p.h\"\n\
#include \"insn-config.h\"\n\
#include \"recog.h\"\n\
@@ -1580,7 +1581,6 @@ write_insn_preds_c (void)
#include \"reload.h\"\n\
#include \"regs.h\"\n\
#include \"emit-rtl.h\"\n\
-#include \"memmodel.h\"\n\
#include \"tm-constrs.h\"\n");
FOR_ALL_PREDICATES (p)
@@ -4181,6 +4181,7 @@ write_header (void)
#include \"backend.h\"\n\
#include \"predict.h\"\n\
#include \"rtl.h\"\n\
+#include \"memmodel.h\"\n\
#include \"tm_p.h\"\n\
#include \"emit-rtl.h\"\n\
#include \"insn-config.h\"\n\
@@ -4192,7 +4193,6 @@ write_header (void)
#include \"diagnostic-core.h\"\n\
#include \"reload.h\"\n\
#include \"regs.h\"\n\
-#include \"memmodel.h\"\n\
#include \"tm-constrs.h\"\n\
\n");
@@ -24,6 +24,7 @@ along with GCC; see the file COPYING3. If not see
#include "alias.h"
#include "tree.h"
#include "rtl.h"
+#include "memmodel.h"
#include "tm_p.h"
#include "diagnostic-core.h"
#include "flags.h"
@@ -22,6 +22,7 @@ along with GCC; see the file COPYING3. If not see
#include "coretypes.h"
#include "target.h"
#include "tree.h"
+#include "memmodel.h"
#include "tm_p.h"
#include "diagnostic.h"
#include "simple-object.h"
@@ -130,6 +130,7 @@ along with GCC; see the file COPYING3. If not see
#include "rtl.h"
#include "cfghooks.h"
#include "df.h"
+#include "memmodel.h"
#include "tm_p.h"
#include "insn-config.h"
#include "regs.h"
@@ -24,6 +24,7 @@ along with GCC; see the file COPYING3. If not see
#include "coretypes.h"
#include "tm.h"
#include "target.h"
+#include "memmodel.h"
#include "tm_p.h"
#include "is-a.h"
#include "vec.h"
@@ -22,6 +22,7 @@ along with GCC; see the file COPYING3. If not see
#include "config.h"
#include "system.h"
#include "coretypes.h"
+#include "memmodel.h"
#include "tm.h"
#include "is-a.h"
#include "hash-table.h"
@@ -26,6 +26,7 @@ along with GCC; see the file COPYING3. If not see
#include "df.h"
#include "insn-config.h"
#include "regs.h"
+#include "memmodel.h"
#include "emit-rtl.h"
#include "recog.h"
#include "cfgrtl.h"
@@ -26,6 +26,7 @@
#include "tree.h"
#include "cfghooks.h"
#include "df.h"
+#include "memmodel.h"
#include "tm_p.h"
#include "expmed.h"
#include "optabs.h"
@@ -24,6 +24,7 @@ along with GCC; see the file COPYING3. If not see
#include "rtl.h"
#include "tree.h"
#include "df.h"
+#include "memmodel.h"
#include "emit-rtl.h"
#include "expr.h"
#include "tree-pass.h"
@@ -30,6 +30,7 @@ along with GCC; see the file COPYING3. If not see
#include "tree-vrp.h"
#include "tree-ssanames.h"
#include "expmed.h"
+#include "memmodel.h"
#include "optabs.h"
#include "emit-rtl.h"
#include "diagnostic-core.h"
@@ -28,6 +28,7 @@ along with GCC; see the file COPYING3. If not see
#include "df.h"
#include "insn-config.h"
#include "regs.h"
+#include "memmodel.h"
#include "ira.h"
#include "ira-int.h"
#include "params.h"
@@ -27,6 +27,7 @@ along with GCC; see the file COPYING3. If not see
#include "tree.h"
#include "predict.h"
#include "df.h"
+#include "memmodel.h"
#include "tm_p.h"
#include "insn-config.h"
#include "regs.h"
@@ -25,6 +25,7 @@ along with GCC; see the file COPYING3. If not see
#include "target.h"
#include "rtl.h"
#include "predict.h"
+#include "memmodel.h"
#include "tm_p.h"
#include "insn-config.h"
#include "regs.h"
@@ -26,6 +26,7 @@ along with GCC; see the file COPYING3. If not see
#include "rtl.h"
#include "tree.h"
#include "predict.h"
+#include "memmodel.h"
#include "tm_p.h"
#include "insn-config.h"
#include "regs.h"
@@ -75,6 +75,7 @@ along with GCC; see the file COPYING3. If not see
#include "df.h"
#include "insn-config.h"
#include "regs.h"
+#include "memmodel.h"
#include "ira.h"
#include "ira-int.h"
#include "cfgrtl.h"
@@ -26,6 +26,7 @@ along with GCC; see the file COPYING3. If not see
#include "rtl.h"
#include "predict.h"
#include "df.h"
+#include "memmodel.h"
#include "tm_p.h"
#include "insn-config.h"
#include "regs.h"
@@ -371,6 +371,7 @@ along with GCC; see the file COPYING3. If not see
#include "rtl.h"
#include "tree.h"
#include "df.h"
+#include "memmodel.h"
#include "tm_p.h"
#include "insn-config.h"
#include "regs.h"
@@ -42,6 +42,7 @@ along with GCC; see the file COPYING3. If not see
#include "tree.h"
#include "cfghooks.h"
#include "tree-pass.h"
+#include "memmodel.h"
#include "tm_p.h"
#include "insn-config.h"
#include "regs.h"
@@ -26,6 +26,7 @@ along with GCC; see the file COPYING3. If not see
#include "rtl.h"
#include "tree.h"
#include "cfghooks.h"
+#include "memmodel.h"
#include "emit-rtl.h"
#include "dojump.h"
#include "expr.h"
@@ -43,6 +43,7 @@ along with GCC; see the file COPYING3. If not see
#include "tree.h"
#include "cfghooks.h"
#include "df.h"
+#include "memmodel.h"
#include "tm_p.h"
#include "insn-config.h"
#include "regs.h"
@@ -53,6 +53,7 @@ along with GCC; see the file COPYING3. If not see
#include "backend.h"
#include "rtl.h"
#include "df.h"
+#include "memmodel.h"
#include "emit-rtl.h"
#include "diagnostic-core.h"
#include "cfgloop.h"
@@ -25,6 +25,7 @@ along with GCC; see the file COPYING3. If not see
#include "rtl.h"
#include "tree.h"
#include "cfghooks.h"
+#include "memmodel.h"
#include "optabs.h"
#include "emit-rtl.h"
#include "recog.h"
@@ -27,6 +27,7 @@ along with GCC; see the file COPYING3. If not see
#include "tree.h"
#include "cfghooks.h"
#include "df.h"
+#include "memmodel.h"
#include "tm_p.h"
#include "expmed.h"
#include "insn-config.h"
@@ -83,6 +83,7 @@ along with GCC; see the file COPYING3. If not see
#include "tree.h"
#include "predict.h"
#include "df.h"
+#include "memmodel.h"
#include "tm_p.h"
#include "insn-config.h"
#include "regs.h"
@@ -51,6 +51,7 @@ along with GCC; see the file COPYING3. If not see
#include "df.h"
#include "insn-config.h"
#include "regs.h"
+#include "memmodel.h"
#include "ira.h"
#include "recog.h"
#include "lra-int.h"
@@ -115,6 +115,7 @@
#include "tree.h"
#include "predict.h"
#include "df.h"
+#include "memmodel.h"
#include "tm_p.h"
#include "expmed.h"
#include "optabs.h"
@@ -59,6 +59,7 @@ along with GCC; see the file COPYING3. If not see
#include "rtl.h"
#include "tree.h"
#include "df.h"
+#include "memmodel.h"
#include "tm_p.h"
#include "optabs.h"
#include "regs.h"
@@ -33,6 +33,7 @@ along with GCC; see the file COPYING3. If not see
#include "tree.h"
#include "predict.h"
#include "df.h"
+#include "memmodel.h"
#include "tm_p.h"
#include "insn-config.h"
#include "regs.h"
@@ -60,6 +60,7 @@ along with GCC; see the file COPYING3. If not see
#include "df.h"
#include "insn-config.h"
#include "regs.h"
+#include "memmodel.h"
#include "ira.h"
#include "recog.h"
#include "lra.h"
@@ -64,6 +64,7 @@ along with GCC; see the file COPYING3. If not see
#include "df.h"
#include "insn-config.h"
#include "regs.h"
+#include "memmodel.h"
#include "ira.h"
#include "recog.h"
#include "output.h"
@@ -109,6 +109,7 @@ along with GCC; see the file COPYING3. If not see
#include "tree.h"
#include "predict.h"
#include "df.h"
+#include "memmodel.h"
#include "tm_p.h"
#include "optabs.h"
#include "regs.h"
@@ -1,5 +1,5 @@
/* Prototypes of memory model helper functions.
- Copyright (C) 2015-2016 Free Software Foundation, Inc.
+ Copyright (C) 2011-2016 Free Software Foundation, Inc.
This file is part of GCC.
@@ -13,6 +13,10 @@ WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
for more details.
+Under Section 7 of GPL version 3, you are granted additional
+permissions described in the GCC Runtime Library Exception, version
+3.1, as published by the Free Software Foundation.
+
You should have received a copy of the GNU General Public License
along with GCC; see the file COPYING3. If not see
<http://www.gnu.org/licenses/>. */
@@ -20,6 +24,38 @@ along with GCC; see the file COPYING3. If not see
#ifndef GCC_MEMMODEL_H
#define GCC_MEMMODEL_H
+/* Suppose that higher bits are target dependent. */
+#define MEMMODEL_MASK ((1<<16)-1)
+
+/* Legacy sync operations set this upper flag in the memory model. This allows
+ targets that need to do something stronger for sync operations to
+ differentiate with their target patterns and issue a more appropriate insn
+ sequence. See bugzilla 65697 for background. */
+#define MEMMODEL_SYNC (1<<15)
+
+/* Memory model without SYNC bit for targets/operations that do not care. */
+#define MEMMODEL_BASE_MASK (MEMMODEL_SYNC-1)
+
+/* Memory model types for the __atomic* builtins.
+ This must match the order in libstdc++-v3/include/bits/atomic_base.h. */
+enum memmodel
+{
+ MEMMODEL_RELAXED = 0,
+ MEMMODEL_CONSUME = 1,
+ MEMMODEL_ACQUIRE = 2,
+ MEMMODEL_RELEASE = 3,
+ MEMMODEL_ACQ_REL = 4,
+ MEMMODEL_SEQ_CST = 5,
+ MEMMODEL_LAST = 6,
+ MEMMODEL_SYNC_ACQUIRE = MEMMODEL_ACQUIRE | MEMMODEL_SYNC,
+ MEMMODEL_SYNC_RELEASE = MEMMODEL_RELEASE | MEMMODEL_SYNC,
+ MEMMODEL_SYNC_SEQ_CST = MEMMODEL_SEQ_CST | MEMMODEL_SYNC
+};
+
+/* memmodel.h is included in libgcc where HOST_WIDE_INT and bool do not make
+ sense. This guards definitions using those. */
+#ifndef USED_FOR_TARGET
+
/* Return the memory model from a host integer. */
static inline enum memmodel
memmodel_from_int (unsigned HOST_WIDE_INT val)
@@ -83,4 +119,6 @@ is_mm_sync (enum memmodel model)
return (model & MEMMODEL_SYNC);
}
+#endif /* !USED_FOR_TARGET */
+
#endif /* GCC_MEMMODEL_H */
@@ -25,6 +25,7 @@ along with GCC; see the file COPYING3. If not see
#include "rtl.h"
#include "cfghooks.h"
#include "df.h"
+#include "memmodel.h"
#include "tm_p.h"
#include "regs.h"
#include "emit-rtl.h"
@@ -28,6 +28,7 @@ along with GCC; see the file COPYING3. If not see
#include "tree.h"
#include "cfghooks.h"
#include "df.h"
+#include "memmodel.h"
#include "optabs.h"
#include "regs.h"
#include "emit-rtl.h"
@@ -25,6 +25,7 @@ along with GCC; see the file COPYING3. If not see
#include "config.h"
#include "system.h"
#include "coretypes.h"
+#include "memmodel.h"
#include "backend.h"
#include "target.h"
#include "rtl.h"
@@ -32,6 +32,7 @@ along with GCC; see the file COPYING3. If not see
#include "gimple.h"
#include "cfghooks.h"
#include "df.h"
+#include "memmodel.h"
#include "tm_p.h"
#include "ssa.h"
#include "emit-rtl.h"
@@ -26,6 +26,7 @@ along with GCC; see the file COPYING3. If not see
#include "tree.h"
#include "predict.h"
#include "df.h"
+#include "memmodel.h"
#include "tm_p.h"
#include "insn-config.h"
#include "emit-rtl.h"
@@ -26,6 +26,7 @@ along with GCC; see the file COPYING3. If not see
#include "tree.h"
#include "predict.h"
#include "df.h"
+#include "memmodel.h"
#include "tm_p.h"
#include "optabs.h"
#include "regs.h"
@@ -37,6 +37,7 @@ along with GCC; see the file COPYING3. If not see
#include "cfghooks.h"
#include "tree-pass.h"
#include "ssa.h"
+#include "memmodel.h"
#include "emit-rtl.h"
#include "cgraph.h"
#include "coverage.h"
@@ -31,6 +31,7 @@ along with GCC; see the file COPYING3. If not see
#include "basic-block.h"
#include "print-rtl.h"
#include "langhooks.h"
+#include "memmodel.h"
#include "emit-rtl.h"
/* Print an "(edge-from)" or "(edge-to)" directive describing E
@@ -27,6 +27,7 @@ along with GCC; see the file COPYING3. If not see
#include "tree.h"
#include "cfghooks.h"
#include "df.h"
+#include "memmodel.h"
#include "tm_p.h"
#include "insn-config.h"
#include "regs.h"
@@ -223,6 +223,7 @@ along with GCC; see the file COPYING3. If not see
#include "rtl.h"
#include "tree.h"
#include "df.h"
+#include "memmodel.h"
#include "tm_p.h"
#include "optabs.h"
#include "emit-rtl.h"
@@ -161,6 +161,7 @@
#include "tree.h"
#include "df.h"
#include "insn-config.h"
+#include "memmodel.h"
#include "emit-rtl.h" /* FIXME: Can go away once crtl is moved to rtl.h. */
#include "recog.h"
#include "varasm.h"
@@ -23,6 +23,7 @@
#include "backend.h"
#include "rtl.h"
#include "df.h"
+#include "memmodel.h"
#include "tm_p.h"
#include "insn-config.h"
#include "regs.h"
@@ -33,6 +33,7 @@ along with GCC; see the file COPYING3. If not see
#include "rtl.h"
#include "tree.h"
#include "df.h"
+#include "memmodel.h"
#include "tm_p.h"
#include "insn-config.h"
#include "regs.h"
@@ -24,6 +24,7 @@
#include "target.h"
#include "rtl.h"
#include "df.h"
+#include "memmodel.h"
#include "tm_p.h"
#include "insn-config.h"
#include "regs.h"
@@ -96,6 +96,7 @@ a register with any other reload. */
#include "rtl.h"
#include "tree.h"
#include "df.h"
+#include "memmodel.h"
#include "tm_p.h"
#include "optabs.h"
#include "regs.h"
@@ -26,6 +26,7 @@ along with GCC; see the file COPYING3. If not see
#include "tree.h"
#include "predict.h"
#include "df.h"
+#include "memmodel.h"
#include "tm_p.h"
#include "optabs.h"
#include "regs.h"
@@ -108,6 +108,7 @@ along with GCC; see the file COPYING3. If not see
#include "rtl.h"
#include "tree.h"
#include "predict.h"
+#include "memmodel.h"
#include "tm_p.h"
#include "expmed.h"
#include "insn-config.h"
@@ -23,6 +23,7 @@ along with GCC; see the file COPYING3. If not see
#include "backend.h"
#include "rtl.h"
#include "df.h"
+#include "memmodel.h"
#include "tm_p.h"
#include "regs.h"
#include "emit-rtl.h"
@@ -25,6 +25,7 @@ along with GCC; see the file COPYING3. If not see
#include "target.h"
#include "rtl.h"
#include "tree.h"
+#include "memmodel.h"
#include "emit-rtl.h"
#include "expr.h"
#include "rtl-chkp.h"
@@ -39,6 +39,7 @@ along with GCC; see the file COPYING3. If not see
#include "print-rtl.h"
#include "selftest.h"
#include "function.h"
+#include "memmodel.h"
#include "emit-rtl.h"
#if CHECKING_P
@@ -27,6 +27,7 @@ along with GCC; see the file COPYING3. If not see
#include "tree.h"
#include "predict.h"
#include "df.h"
+#include "memmodel.h"
#include "tm_p.h"
#include "insn-config.h"
#include "regs.h"
@@ -25,6 +25,7 @@ along with GCC; see the file COPYING3. If not see
#include "rtl.h"
#include "tree.h"
#include "insn-config.h"
+#include "memmodel.h"
#include "emit-rtl.h"
#include "recog.h"
#include "rtlhooks-def.h"
@@ -30,6 +30,7 @@ along with GCC; see the file COPYING3. If not see
#include "df.h"
#include "insn-config.h"
#include "regs.h"
+#include "memmodel.h"
#include "ira.h"
#include "ira-int.h"
#include "insn-attr.h"
@@ -50,6 +50,7 @@ along with GCC; see the file COPYING3. If not see
#include "target.h"
#include "rtl.h"
#include "df.h"
+#include "memmodel.h"
#include "tm_p.h"
#include "insn-config.h"
#include "emit-rtl.h"
@@ -69,6 +69,7 @@ static GTY(()) bool sdbout_initialized;
#include "rtl.h"
#include "regs.h"
#include "function.h"
+#include "memmodel.h"
#include "emit-rtl.h"
#include "flags.h"
#include "insn-config.h"
@@ -25,6 +25,7 @@ along with GCC; see the file COPYING3. If not see
#include "tree.h"
#include "rtl.h"
#include "df.h"
+#include "memmodel.h"
#include "tm_p.h"
#include "cfgrtl.h"
#include "cfganal.h"
@@ -24,6 +24,7 @@ along with GCC; see the file COPYING3. If not see
#include "tree.h"
#include "rtl.h"
#include "df.h"
+#include "memmodel.h"
#include "tm_p.h"
#include "regs.h"
#include "cfgbuild.h"
@@ -28,6 +28,7 @@ along with GCC; see the file COPYING3. If not see
#include "tree.h"
#include "cfghooks.h"
#include "df.h"
+#include "memmodel.h"
#include "tm_p.h"
#include "regs.h"
#include "emit-rtl.h"
@@ -26,6 +26,7 @@ along with GCC; see the file COPYING3. If not see
#include "rtl.h"
#include "tree.h"
#include "predict.h"
+#include "memmodel.h"
#include "optabs.h"
#include "emit-rtl.h"
#include "recog.h"
@@ -23,6 +23,7 @@ along with GCC; see the file COPYING3. If not see
#include "backend.h"
#include "rtl.h"
#include "df.h"
+#include "memmodel.h"
#include "emit-rtl.h"
#include "tree-pass.h"
@@ -32,6 +32,7 @@ along with GCC; see the file COPYING3. If not see
#include "gimple.h"
#include "predict.h"
#include "alloc-pool.h"
+#include "memmodel.h"
#include "tm_p.h"
#include "optabs.h"
#include "regs.h"
@@ -25,6 +25,7 @@ along with GCC; see the file COPYING3. If not see
#include "function.h"
#include "rtl.h"
#include "tree.h"
+#include "memmodel.h"
#include "tm_p.h"
#include "stringpool.h"
#include "regs.h"
@@ -27,6 +27,7 @@ along with GCC; see the file COPYING3. If not see
#include "optabs-query.h"
#include "insn-config.h"
#include "regs.h"
+#include "memmodel.h"
#include "ira.h"
#include "ira-int.h"
#include "toplev.h"
@@ -55,6 +55,7 @@ along with GCC; see the file COPYING3. If not see
#include "tree.h"
#include "tree-ssa-alias.h"
#include "gimple-expr.h"
+#include "memmodel.h"
#include "tm_p.h"
#include "stringpool.h"
#include "tree-vrp.h"
@@ -32,6 +32,7 @@ along with GCC; see the file COPYING3. If not see
#include "gimple.h"
#include "alloc-pool.h"
#include "timevar.h"
+#include "memmodel.h"
#include "tm_p.h"
#include "optabs-libfuncs.h"
#include "insn-config.h"
@@ -24,6 +24,7 @@
#include "rtl.h"
#include "tree.h"
#include "gimple.h"
+#include "memmodel.h"
#include "tm_p.h"
#include "stringpool.h"
#include "cgraph.h"
@@ -27,6 +27,7 @@ along with GCC; see the file COPYING3. If not see
#include "gimple.h"
#include "cfghooks.h"
#include "ssa.h"
+#include "memmodel.h"
#include "emit-rtl.h"
#include "gimple-pretty-print.h"
#include "diagnostic-core.h"
@@ -27,6 +27,7 @@ along with GCC; see the file COPYING3. If not see
#include "config.h"
#include "system.h"
#include "coretypes.h"
+#include "memmodel.h"
#include "backend.h"
#include "target.h"
#include "tree.h"
@@ -25,6 +25,7 @@ along with GCC; see the file COPYING3. If not see
#include "tree.h"
#include "gimple.h"
#include "predict.h"
+#include "memmodel.h"
#include "tm_p.h"
#include "ssa.h"
#include "tree-pretty-print.h"
@@ -27,6 +27,7 @@ along with GCC; see the file COPYING3. If not see
#include "gimple.h"
#include "cfghooks.h"
#include "tree-pass.h"
+#include "memmodel.h"
#include "tm_p.h"
#include "ssa.h"
#include "tree-pretty-print.h"
@@ -75,6 +75,7 @@ along with GCC; see the file COPYING3. If not see
#include "gimple.h"
#include "cfghooks.h"
#include "tree-pass.h"
+#include "memmodel.h"
#include "tm_p.h"
#include "ssa.h"
#include "expmed.h"
@@ -24,6 +24,7 @@ along with GCC; see the file COPYING3. If not see
#include "tree.h"
#include "gimple.h"
#include "tree-pass.h"
+#include "memmodel.h"
#include "tm_p.h"
#include "fold-const.h"
#include "gimple-iterator.h"
@@ -29,6 +29,7 @@ along with GCC; see the file COPYING3. If not see
#include "cfghooks.h"
#include "alloc-pool.h"
#include "tree-pass.h"
+#include "memmodel.h"
#include "tm_p.h"
#include "ssa.h"
#include "optabs-tree.h"
@@ -29,6 +29,7 @@ along with GCC; see the file COPYING3. If not see
#include "ssa.h"
#include "expmed.h"
#include "insn-config.h"
+#include "memmodel.h"
#include "emit-rtl.h"
#include "cgraph.h"
#include "gimple-pretty-print.h"
@@ -28,6 +28,7 @@ along with GCC; see the file COPYING3. If not see
#include "tree.h"
#include "gimple.h"
#include "predict.h"
+#include "memmodel.h"
#include "tm_p.h"
#include "ssa.h"
#include "optabs-tree.h"
@@ -27,6 +27,7 @@ along with GCC; see the file COPYING3. If not see
#include "gimple.h"
#include "cfghooks.h"
#include "tree-pass.h"
+#include "memmodel.h"
#include "tm_p.h"
#include "ssa.h"
#include "cgraph.h"
@@ -27,6 +27,7 @@ along with GCC; see the file COPYING3. If not see
#include "df.h"
#include "valtrack.h"
#include "regs.h"
+#include "memmodel.h"
#include "emit-rtl.h"
/* gen_lowpart_no_emit hook implementation for DEBUG_INSNs. In DEBUG_INSNs,
@@ -95,6 +95,7 @@
#include "cfghooks.h"
#include "alloc-pool.h"
#include "tree-pass.h"
+#include "memmodel.h"
#include "tm_p.h"
#include "insn-config.h"
#include "regs.h"
@@ -33,6 +33,7 @@ along with GCC; see the file COPYING3. If not see
#include "rtl.h"
#include "tree.h"
#include "predict.h"
+#include "memmodel.h"
#include "tm_p.h"
#include "stringpool.h"
#include "regs.h"
@@ -23,6 +23,7 @@
#include "tconfig.h"
#include "coretypes.h"
+#include "memmodel.h"
#include "atomic.h"
#define bool unsigned char
@@ -24,6 +24,7 @@ see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
<http://www.gnu.org/licenses/>. */
#include "libgcov.h"
+#include "memmodel.h"
#if !defined(inhibit_libc)
/* Detect whether target can support atomic update of profilers. */