aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog86
-rw-r--r--gcc/asan.c1
-rw-r--r--gcc/bb-reorder.c1
-rw-r--r--gcc/builtins.c1
-rw-r--r--gcc/calls.c1
-rw-r--r--gcc/cfgexpand.c2
-rw-r--r--gcc/cilk-common.c1
-rw-r--r--gcc/combine.c2
-rw-r--r--gcc/config/aarch64/aarch64-builtins.c1
-rw-r--r--gcc/config/alpha/alpha.c1
-rw-r--r--gcc/config/arm/arm.c1
-rw-r--r--gcc/config/cris/cris.c1
-rw-r--r--gcc/config/epiphany/epiphany.c2
-rw-r--r--gcc/config/frv/frv.c1
-rw-r--r--gcc/config/h8300/h8300.c1
-rw-r--r--gcc/config/ia64/ia64.c1
-rw-r--r--gcc/config/iq2000/iq2000.c1
-rw-r--r--gcc/config/m32c/m32c.c1
-rw-r--r--gcc/config/mep/mep.c1
-rw-r--r--gcc/config/microblaze/microblaze.c1
-rw-r--r--gcc/config/mips/mips.c1
-rw-r--r--gcc/config/mn10300/mn10300.c1
-rw-r--r--gcc/config/moxie/moxie.c1
-rw-r--r--gcc/config/msp430/msp430.c1
-rw-r--r--gcc/config/nios2/nios2.c1
-rw-r--r--gcc/config/pa/pa.c1
-rw-r--r--gcc/config/rl78/rl78.c1
-rw-r--r--gcc/config/rs6000/rs6000.c1
-rw-r--r--gcc/config/rx/rx.c1
-rw-r--r--gcc/config/s390/s390.c1
-rw-r--r--gcc/config/sh/sh.c1
-rw-r--r--gcc/config/sh/sh_treg_combine.cc2
-rw-r--r--gcc/config/spu/spu.c1
-rw-r--r--gcc/config/stormy16/stormy16.c1
-rw-r--r--gcc/config/tilegx/mul-tables.c1
-rw-r--r--gcc/config/tilegx/tilegx.c1
-rw-r--r--gcc/config/tilepro/mul-tables.c1
-rw-r--r--gcc/config/tilepro/tilepro.c1
-rw-r--r--gcc/config/vax/vax.c1
-rw-r--r--gcc/dojump.c1
-rw-r--r--gcc/dse.c1
-rw-r--r--gcc/except.c2
-rw-r--r--gcc/explow.c1
-rw-r--r--gcc/expmed.c1
-rw-r--r--gcc/expr.c16
-rw-r--r--gcc/expr.h101
-rw-r--r--gcc/function.c1
-rw-r--r--gcc/genemit.c1
-rw-r--r--gcc/gengtype.c2
-rw-r--r--gcc/genopinit.c63
-rw-r--r--gcc/ifcvt.c1
-rw-r--r--gcc/internal-fn.c1
-rw-r--r--gcc/loop-unroll.c2
-rw-r--r--gcc/lra.c2
-rw-r--r--gcc/modulo-sched.c3
-rw-r--r--gcc/omp-low.c1
-rw-r--r--gcc/optabs.c16
-rw-r--r--gcc/optabs.h553
-rw-r--r--gcc/postreload.c1
-rw-r--r--gcc/ree.c2
-rw-r--r--gcc/reload.c1
-rw-r--r--gcc/reload1.c1
-rw-r--r--gcc/shrink-wrap.c1
-rw-r--r--gcc/simplify-rtx.c2
-rw-r--r--gcc/stmt.c1
-rw-r--r--gcc/target-globals.c1
-rw-r--r--gcc/targhooks.c2
-rw-r--r--gcc/toplev.c1
-rw-r--r--gcc/tree-if-conv.c1
-rw-r--r--gcc/tree-ssa-forwprop.c1
-rw-r--r--gcc/tree-ssa-loop-prefetch.c1
-rw-r--r--gcc/tree-ssa-math-opts.c1
-rw-r--r--gcc/tree-ssa-phiopt.c1
-rw-r--r--gcc/tree-ssa-reassoc.c1
-rw-r--r--gcc/tree-switch-conversion.c1
-rw-r--r--gcc/tree-vect-data-refs.c1
-rw-r--r--gcc/tree-vect-generic.c1
-rw-r--r--gcc/tree-vect-loop.c1
-rw-r--r--gcc/tree-vect-patterns.c1
-rw-r--r--gcc/tree-vect-slp.c1
-rw-r--r--gcc/tree-vect-stmts.c1
-rw-r--r--gcc/tree-vrp.c1
-rw-r--r--gcc/value-prof.c1
83 files changed, 542 insertions, 383 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index f1641af..68c15af 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,89 @@
+2014-11-01 Andrew MacLeod <amacleod@redhat,com>
+
+ * optabs.h: Flatten insn-codes.h to source files. Move some prototypes
+ and structs to genopinit.c. Adjust protyoptypes to match optabs.c.
+ * genopinit.c (main): Emit prototypes and structs into insn-opinit.h.
+ * optabs.c: (gen_move_insn): Move to expr.c.
+ * expr.h: Move protypes and enums to optabs.h.
+ * expr.c: (gen_move_insn): Relocate from optabs.c.
+ * genemit.c (main): Include insn-codes.h.
+ * gengtype.c (open_base_files): Include insn-codes.h.
+ * asan.c: Include insn-codes.h.
+ * bb-reorder.c: Ditto.
+ * builtins.c: Ditto.
+ * calls.c: Ditto.
+ * cfgexpand.c: Ditto.
+ * cilk-common.c: Ditto.
+ * combine.c: Ditto.
+ * dojump.c: Ditto.
+ * dse.c: Ditto.
+ * except.c: Ditto.
+ * explow.c: Ditto.
+ * expmed.c: Ditto.
+ * function.c: Ditto.
+ * ifcvt.c: Ditto.
+ * internal-fn.c: Ditto.
+ * loop-unroll.c: Ditto.
+ * lra.c: Ditto.
+ * modulo-sched.c: Ditto.
+ * omp-low.c: Ditto.
+ * postreload.c: Ditto.
+ * ree.c: Ditto.
+ * reload.c: Ditto.
+ * reload1.c: Ditto.
+ * shrink-wrap.c: Ditto.
+ * simplify-rtx.c: Ditto.
+ * stmt.c: Ditto.
+ * target-globals.c: Ditto.
+ * targhooks.c: Ditto.
+ * toplev.c: Ditto.
+ * tree-if-conv.c: Ditto.
+ * tree-ssa-forwprop.c: Ditto.
+ * tree-ssa-loop-prefetch.c: Ditto.
+ * tree-ssa-math-opts.c: Ditto.
+ * tree-ssa-phiopt.c: Ditto.
+ * tree-ssa-reassoc.c: Ditto.
+ * tree-switch-conversion.c: Ditto.
+ * tree-vect-data-refs.c: Ditto.
+ * tree-vect-generic.c: Ditto.
+ * tree-vect-loop.c: Ditto.
+ * tree-vect-patterns.c: Ditto.
+ * tree-vect-slp.c: Ditto.
+ * tree-vect-stmts.c: Ditto.
+ * tree-vrp.c: Ditto.
+ * value-prof.c: Ditto.
+ * config/aarch64/aarch64-builtins.c: Ditto.
+ * config/alpha/alpha.c: Ditto.
+ * config/arm/arm.c: Ditto.
+ * config/cris/cris.c: Ditto.
+ * config/epiphany/epiphany.c: Ditto.
+ * config/frv/frv.c: Ditto.
+ * config/h8300/h8300.c: Ditto.
+ * config/ia64/ia64.c: Ditto.
+ * config/iq2000/iq2000.c: Ditto.
+ * config/m32c/m32c.c: Ditto.
+ * config/mep/mep.c: Ditto.
+ * config/microblaze/microblaze.c: Ditto.
+ * config/mips/mips.c: Ditto.
+ * config/mn10300/mn10300.c: Ditto.
+ * config/moxie/moxie.c: Ditto.
+ * config/msp430/msp430.c: Ditto.
+ * config/nios2/nios2.c: Ditto.
+ * config/pa/pa.c: Ditto.
+ * config/rl78/rl78.c: Ditto.
+ * config/rs6000/rs6000.c: Ditto.
+ * config/rx/rx.c: Ditto.
+ * config/s390/s390.c: Ditto.
+ * config/sh/sh.c: Ditto.
+ * config/sh/sh_treg_combine.cc: Ditto.
+ * config/spu/spu.c: Ditto.
+ * config/stormy16/stormy16.c: Ditto.
+ * config/tilegx/mul-tables.c: Ditto.
+ * config/tilegx/tilegx.c: Ditto.
+ * config/tilepro/mul-tables.c: Ditto.
+ * config/tilepro/tilepro.c: Ditto.
+ * config/vax/vax.c: Ditto.
+
2014-11-01 James Greenhalgh <james.greenhalgh@arm.com>
* doc/tm.texi.in (MOVE_BY_PIECES_P): Remove.
diff --git a/gcc/asan.c b/gcc/asan.c
index b4b0822..8f146d2 100644
--- a/gcc/asan.c
+++ b/gcc/asan.c
@@ -60,6 +60,7 @@ along with GCC; see the file COPYING3. If not see
#include "gimple-pretty-print.h"
#include "target.h"
#include "expr.h"
+#include "insn-codes.h"
#include "optabs.h"
#include "output.h"
#include "tm_p.h"
diff --git a/gcc/bb-reorder.c b/gcc/bb-reorder.c
index b6985d4..84191e4 100644
--- a/gcc/bb-reorder.c
+++ b/gcc/bb-reorder.c
@@ -99,6 +99,7 @@
#include "tm_p.h"
#include "obstack.h"
#include "expr.h"
+#include "optabs.h"
#include "params.h"
#include "diagnostic-core.h"
#include "toplev.h" /* user_defined_section_attribute */
diff --git a/gcc/builtins.c b/gcc/builtins.c
index ad3a84e..161fe8c 100644
--- a/gcc/builtins.c
+++ b/gcc/builtins.c
@@ -49,6 +49,7 @@ along with GCC; see the file COPYING3. If not see
#include "except.h"
#include "insn-config.h"
#include "expr.h"
+#include "insn-codes.h"
#include "optabs.h"
#include "libfuncs.h"
#include "recog.h"
diff --git a/gcc/calls.c b/gcc/calls.c
index 861c615..c62dba0 100644
--- a/gcc/calls.c
+++ b/gcc/calls.c
@@ -43,6 +43,7 @@ along with GCC; see the file COPYING3. If not see
#include "gimple.h"
#include "flags.h"
#include "expr.h"
+#include "insn-codes.h"
#include "optabs.h"
#include "libfuncs.h"
#include "regs.h"
diff --git a/gcc/cfgexpand.c b/gcc/cfgexpand.c
index 0582769..d338a7c 100644
--- a/gcc/cfgexpand.c
+++ b/gcc/cfgexpand.c
@@ -44,6 +44,8 @@ along with GCC; see the file COPYING3. If not see
#include "cfgbuild.h"
#include "cfgcleanup.h"
#include "basic-block.h"
+#include "insn-codes.h"
+#include "optabs.h"
#include "expr.h"
#include "langhooks.h"
#include "bitmap.h"
diff --git a/gcc/cilk-common.c b/gcc/cilk-common.c
index 35c47e1..48c8aa6 100644
--- a/gcc/cilk-common.c
+++ b/gcc/cilk-common.c
@@ -28,6 +28,7 @@ along with GCC; see the file COPYING3. If not see
#include "stor-layout.h"
#include "langhooks.h"
#include "expr.h"
+#include "insn-codes.h"
#include "optabs.h"
#include "recog.h"
#include "tree-iterator.h"
diff --git a/gcc/combine.c b/gcc/combine.c
index 6d711eb..40f2875 100644
--- a/gcc/combine.c
+++ b/gcc/combine.c
@@ -105,8 +105,8 @@ along with GCC; see the file COPYING3. If not see
#include "recog.h"
#include "diagnostic-core.h"
#include "target.h"
-#include "optabs.h"
#include "insn-codes.h"
+#include "optabs.h"
#include "rtlhooks-def.h"
#include "params.h"
#include "tree-pass.h"
diff --git a/gcc/config/aarch64/aarch64-builtins.c b/gcc/config/aarch64/aarch64-builtins.c
index df65c85..527445c 100644
--- a/gcc/config/aarch64/aarch64-builtins.c
+++ b/gcc/config/aarch64/aarch64-builtins.c
@@ -32,6 +32,7 @@
#include "recog.h"
#include "langhooks.h"
#include "diagnostic-core.h"
+#include "insn-codes.h"
#include "optabs.h"
#include "hash-table.h"
#include "vec.h"
diff --git a/gcc/config/alpha/alpha.c b/gcc/config/alpha/alpha.c
index 0c71965..3fe8131 100644
--- a/gcc/config/alpha/alpha.c
+++ b/gcc/config/alpha/alpha.c
@@ -37,6 +37,7 @@ along with GCC; see the file COPYING3. If not see
#include "flags.h"
#include "recog.h"
#include "expr.h"
+#include "insn-codes.h"
#include "optabs.h"
#include "reload.h"
#include "obstack.h"
diff --git a/gcc/config/arm/arm.c b/gcc/config/arm/arm.c
index f4c4ebd..4f04707 100644
--- a/gcc/config/arm/arm.c
+++ b/gcc/config/arm/arm.c
@@ -47,6 +47,7 @@
#include "input.h"
#include "function.h"
#include "expr.h"
+#include "insn-codes.h"
#include "optabs.h"
#include "diagnostic-core.h"
#include "recog.h"
diff --git a/gcc/config/cris/cris.c b/gcc/config/cris/cris.c
index bb2578c..1983ae0 100644
--- a/gcc/config/cris/cris.c
+++ b/gcc/config/cris/cris.c
@@ -52,6 +52,7 @@ along with GCC; see the file COPYING3. If not see
#include "target.h"
#include "target-def.h"
#include "ggc.h"
+#include "insn-codes.h"
#include "optabs.h"
#include "dominance.h"
#include "cfg.h"
diff --git a/gcc/config/epiphany/epiphany.c b/gcc/config/epiphany/epiphany.c
index ec57797..3890149 100644
--- a/gcc/config/epiphany/epiphany.c
+++ b/gcc/config/epiphany/epiphany.c
@@ -42,6 +42,8 @@ along with GCC; see the file COPYING3. If not see
#include "machmode.h"
#include "input.h"
#include "function.h"
+#include "insn-codes.h"
+#include "optabs.h"
#include "expr.h"
#include "diagnostic-core.h"
#include "recog.h"
diff --git a/gcc/config/frv/frv.c b/gcc/config/frv/frv.c
index 41cc497..16e0bb5 100644
--- a/gcc/config/frv/frv.c
+++ b/gcc/config/frv/frv.c
@@ -45,6 +45,7 @@ along with GCC; see the file COPYING3. If not see
#include "machmode.h"
#include "input.h"
#include "function.h"
+#include "insn-codes.h"
#include "optabs.h"
#include "diagnostic-core.h"
#include "predict.h"
diff --git a/gcc/config/h8300/h8300.c b/gcc/config/h8300/h8300.c
index 7f5ef5b..c949426 100644
--- a/gcc/config/h8300/h8300.c
+++ b/gcc/config/h8300/h8300.c
@@ -44,6 +44,7 @@ along with GCC; see the file COPYING3. If not see
#include "machmode.h"
#include "input.h"
#include "function.h"
+#include "insn-codes.h"
#include "optabs.h"
#include "diagnostic-core.h"
#include "c-family/c-pragma.h" /* ??? */
diff --git a/gcc/config/ia64/ia64.c b/gcc/config/ia64/ia64.c
index beb9e60..f896e10 100644
--- a/gcc/config/ia64/ia64.c
+++ b/gcc/config/ia64/ia64.c
@@ -38,6 +38,7 @@ along with GCC; see the file COPYING3. If not see
#include "flags.h"
#include "recog.h"
#include "expr.h"
+#include "insn-codes.h"
#include "optabs.h"
#include "except.h"
#include "hashtab.h"
diff --git a/gcc/config/iq2000/iq2000.c b/gcc/config/iq2000/iq2000.c
index 9f45b1d..161eaf6 100644
--- a/gcc/config/iq2000/iq2000.c
+++ b/gcc/config/iq2000/iq2000.c
@@ -40,6 +40,7 @@ along with GCC; see the file COPYING3. If not see
#include "input.h"
#include "function.h"
#include "expr.h"
+#include "insn-codes.h"
#include "optabs.h"
#include "libfuncs.h"
#include "recog.h"
diff --git a/gcc/config/m32c/m32c.c b/gcc/config/m32c/m32c.c
index 132873f..6197b33 100644
--- a/gcc/config/m32c/m32c.c
+++ b/gcc/config/m32c/m32c.c
@@ -40,6 +40,7 @@
#include "varasm.h"
#include "calls.h"
#include "expr.h"
+#include "insn-codes.h"
#include "optabs.h"
#include "except.h"
#include "hashtab.h"
diff --git a/gcc/config/mep/mep.c b/gcc/config/mep/mep.c
index 46a451c..2a6b915 100644
--- a/gcc/config/mep/mep.c
+++ b/gcc/config/mep/mep.c
@@ -47,6 +47,7 @@ along with GCC; see the file COPYING3. If not see
#include "machmode.h"
#include "input.h"
#include "function.h"
+#include "insn-codes.h"
#include "optabs.h"
#include "reload.h"
#include "tm_p.h"
diff --git a/gcc/config/microblaze/microblaze.c b/gcc/config/microblaze/microblaze.c
index 48ebf86..7a44396 100644
--- a/gcc/config/microblaze/microblaze.c
+++ b/gcc/config/microblaze/microblaze.c
@@ -61,6 +61,7 @@
#include "predict.h"
#include "basic-block.h"
#include "df.h"
+#include "insn-codes.h"
#include "optabs.h"
#include "diagnostic-core.h"
#include "hash-map.h"
diff --git a/gcc/config/mips/mips.c b/gcc/config/mips/mips.c
index ac7746c..0498e4f 100644
--- a/gcc/config/mips/mips.c
+++ b/gcc/config/mips/mips.c
@@ -45,6 +45,7 @@ along with GCC; see the file COPYING3. If not see
#include "input.h"
#include "function.h"
#include "expr.h"
+#include "insn-codes.h"
#include "optabs.h"
#include "libfuncs.h"
#include "flags.h"
diff --git a/gcc/config/mn10300/mn10300.c b/gcc/config/mn10300/mn10300.c
index 3f9a7be..20330f0 100644
--- a/gcc/config/mn10300/mn10300.c
+++ b/gcc/config/mn10300/mn10300.c
@@ -37,6 +37,7 @@
#include "recog.h"
#include "reload.h"
#include "expr.h"
+#include "insn-codes.h"
#include "optabs.h"
#include "hashtab.h"
#include "hash-set.h"
diff --git a/gcc/config/moxie/moxie.c b/gcc/config/moxie/moxie.c
index ef1ed8f..d4688d9 100644
--- a/gcc/config/moxie/moxie.c
+++ b/gcc/config/moxie/moxie.c
@@ -40,6 +40,7 @@
#include "varasm.h"
#include "calls.h"
#include "expr.h"
+#include "insn-codes.h"
#include "optabs.h"
#include "except.h"
#include "hashtab.h"
diff --git a/gcc/config/msp430/msp430.c b/gcc/config/msp430/msp430.c
index 703bf9b..fe97f27 100644
--- a/gcc/config/msp430/msp430.c
+++ b/gcc/config/msp430/msp430.c
@@ -40,6 +40,7 @@
#include "input.h"
#include "function.h"
#include "expr.h"
+#include "insn-codes.h"
#include "optabs.h"
#include "libfuncs.h"
#include "recog.h"
diff --git a/gcc/config/nios2/nios2.c b/gcc/config/nios2/nios2.c
index 03451fe..982112e 100644
--- a/gcc/config/nios2/nios2.c
+++ b/gcc/config/nios2/nios2.c
@@ -35,6 +35,7 @@
#include "flags.h"
#include "recog.h"
#include "expr.h"
+#include "insn-codes.h"
#include "optabs.h"
#include "hashtab.h"
#include "hash-set.h"
diff --git a/gcc/config/pa/pa.c b/gcc/config/pa/pa.c
index 6e34d77..3549835 100644
--- a/gcc/config/pa/pa.c
+++ b/gcc/config/pa/pa.c
@@ -38,6 +38,7 @@ along with GCC; see the file COPYING3. If not see
#include "dbxout.h"
#include "except.h"
#include "expr.h"
+#include "insn-codes.h"
#include "optabs.h"
#include "reload.h"
#include "hashtab.h"
diff --git a/gcc/config/rl78/rl78.c b/gcc/config/rl78/rl78.c
index 9e7c628..7b85cf8 100644
--- a/gcc/config/rl78/rl78.c
+++ b/gcc/config/rl78/rl78.c
@@ -41,6 +41,7 @@
#include "input.h"
#include "function.h"
#include "expr.h"
+#include "insn-codes.h"
#include "optabs.h"
#include "libfuncs.h"
#include "recog.h"
diff --git a/gcc/config/rs6000/rs6000.c b/gcc/config/rs6000/rs6000.c
index 4adb168..05325c2 100644
--- a/gcc/config/rs6000/rs6000.c
+++ b/gcc/config/rs6000/rs6000.c
@@ -38,6 +38,7 @@
#include "print-tree.h"
#include "varasm.h"
#include "expr.h"
+#include "insn-codes.h"
#include "optabs.h"
#include "except.h"
#include "hashtab.h"
diff --git a/gcc/config/rx/rx.c b/gcc/config/rx/rx.c
index 0aeb611..f3e1129 100644
--- a/gcc/config/rx/rx.c
+++ b/gcc/config/rx/rx.c
@@ -45,6 +45,7 @@
#include "input.h"
#include "function.h"
#include "expr.h"
+#include "insn-codes.h"
#include "optabs.h"
#include "libfuncs.h"
#include "recog.h"
diff --git a/gcc/config/s390/s390.c b/gcc/config/s390/s390.c
index 51ae90c..3152762 100644
--- a/gcc/config/s390/s390.c
+++ b/gcc/config/s390/s390.c
@@ -64,6 +64,7 @@ along with GCC; see the file COPYING3. If not see
#include "target-def.h"
#include "debug.h"
#include "langhooks.h"
+#include "insn-codes.h"
#include "optabs.h"
#include "hash-table.h"
#include "tree-ssa-alias.h"
diff --git a/gcc/config/sh/sh.c b/gcc/config/sh/sh.c
index 3bbbd23..3a4f5e9 100644
--- a/gcc/config/sh/sh.c
+++ b/gcc/config/sh/sh.c
@@ -36,6 +36,7 @@ along with GCC; see the file COPYING3. If not see
#include "varasm.h"
#include "flags.h"
#include "expr.h"
+#include "insn-codes.h"
#include "optabs.h"
#include "reload.h"
#include "hashtab.h"
diff --git a/gcc/config/sh/sh_treg_combine.cc b/gcc/config/sh/sh_treg_combine.cc
index 72ec577..4615a28 100644
--- a/gcc/config/sh/sh_treg_combine.cc
+++ b/gcc/config/sh/sh_treg_combine.cc
@@ -46,6 +46,8 @@ along with GCC; see the file COPYING3. If not see
#include "recog.h"
#include "tree-pass.h"
#include "target.h"
+#include "tree-core.h"
+#include "optabs.h"
#include "expr.h"
#include <algorithm>
diff --git a/gcc/config/spu/spu.c b/gcc/config/spu/spu.c
index eef42f0..2009085 100644
--- a/gcc/config/spu/spu.c
+++ b/gcc/config/spu/spu.c
@@ -33,6 +33,7 @@
#include "calls.h"
#include "varasm.h"
#include "expr.h"
+#include "insn-codes.h"
#include "optabs.h"
#include "except.h"
#include "hashtab.h"
diff --git a/gcc/config/stormy16/stormy16.c b/gcc/config/stormy16/stormy16.c
index 52d0239..7be72b9 100644
--- a/gcc/config/stormy16/stormy16.c
+++ b/gcc/config/stormy16/stormy16.c
@@ -40,6 +40,7 @@
#include "varasm.h"
#include "calls.h"
#include "expr.h"
+#include "insn-codes.h"
#include "optabs.h"
#include "except.h"
#include "hashtab.h"
diff --git a/gcc/config/tilegx/mul-tables.c b/gcc/config/tilegx/mul-tables.c
index 4bcff30..a902299d 100644
--- a/gcc/config/tilegx/mul-tables.c
+++ b/gcc/config/tilegx/mul-tables.c
@@ -22,6 +22,7 @@
#include "system.h"
#include "coretypes.h"
#include "expr.h"
+#include "insn-codes.h"
#include "optabs.h"
#include "tilegx-multiply.h"
diff --git a/gcc/config/tilegx/tilegx.c b/gcc/config/tilegx/tilegx.c
index e807fff..0090d90 100644
--- a/gcc/config/tilegx/tilegx.c
+++ b/gcc/config/tilegx/tilegx.c
@@ -30,6 +30,7 @@
#include "recog.h"
#include "expr.h"
#include "langhooks.h"
+#include "insn-codes.h"
#include "optabs.h"
#include "dominance.h"
#include "cfg.h"
diff --git a/gcc/config/tilepro/mul-tables.c b/gcc/config/tilepro/mul-tables.c
index 4411b6e..c8eda94 100644
--- a/gcc/config/tilepro/mul-tables.c
+++ b/gcc/config/tilepro/mul-tables.c
@@ -22,6 +22,7 @@
#include "system.h"
#include "coretypes.h"
#include "expr.h"
+#include "insn-codes.h"
#include "optabs.h"
#include "tilepro-multiply.h"
diff --git a/gcc/config/tilepro/tilepro.c b/gcc/config/tilepro/tilepro.c
index 9fdfb42..4eef51a 100644
--- a/gcc/config/tilepro/tilepro.c
+++ b/gcc/config/tilepro/tilepro.c
@@ -30,6 +30,7 @@
#include "recog.h"
#include "expr.h"
#include "langhooks.h"
+#include "insn-codes.h"
#include "optabs.h"
#include "dominance.h"
#include "cfg.h"
diff --git a/gcc/config/vax/vax.c b/gcc/config/vax/vax.c
index bf12f89..949a2d2 100644
--- a/gcc/config/vax/vax.c
+++ b/gcc/config/vax/vax.c
@@ -49,6 +49,7 @@ along with GCC; see the file COPYING3. If not see
#include "insn-attr.h"
#include "recog.h"
#include "expr.h"
+#include "insn-codes.h"
#include "optabs.h"
#include "flags.h"
#include "debug.h"
diff --git a/gcc/dojump.c b/gcc/dojump.c
index 4040a6d..40b1bf4 100644
--- a/gcc/dojump.c
+++ b/gcc/dojump.c
@@ -36,6 +36,7 @@ along with GCC; see the file COPYING3. If not see
#include "insn-attr.h"
/* Include expr.h after insn-config.h so we get HAVE_conditional_move. */
#include "expr.h"
+#include "insn-codes.h"
#include "optabs.h"
#include "langhooks.h"
#include "ggc.h"
diff --git a/gcc/dse.c b/gcc/dse.c
index 9a8f3cf..2555bd1d 100644
--- a/gcc/dse.c
+++ b/gcc/dse.c
@@ -48,6 +48,7 @@ along with GCC; see the file COPYING3. If not see
#include "insn-config.h"
#include "expr.h"
#include "recog.h"
+#include "insn-codes.h"
#include "optabs.h"
#include "dbgcnt.h"
#include "target.h"
diff --git a/gcc/except.c b/gcc/except.c
index 39bede0..6288eb0 100644
--- a/gcc/except.c
+++ b/gcc/except.c
@@ -125,6 +125,8 @@ along with GCC; see the file COPYING3. If not see
#include "hard-reg-set.h"
#include "input.h"
#include "function.h"
+#include "insn-codes.h"
+#include "optabs.h"
#include "expr.h"
#include "libfuncs.h"
#include "insn-config.h"
diff --git a/gcc/explow.c b/gcc/explow.c
index 19024b5..44a1223 100644
--- a/gcc/explow.c
+++ b/gcc/explow.c
@@ -37,6 +37,7 @@ along with GCC; see the file COPYING3. If not see
#include "input.h"
#include "function.h"
#include "expr.h"
+#include "insn-codes.h"
#include "optabs.h"
#include "libfuncs.h"
#include "insn-config.h"
diff --git a/gcc/expmed.c b/gcc/expmed.c
index 7dabe75..af14b99 100644
--- a/gcc/expmed.c
+++ b/gcc/expmed.c
@@ -31,6 +31,7 @@ along with GCC; see the file COPYING3. If not see
#include "flags.h"
#include "insn-config.h"
#include "expr.h"
+#include "insn-codes.h"
#include "optabs.h"
#include "recog.h"
#include "langhooks.h"
diff --git a/gcc/expr.c b/gcc/expr.c
index af42b61..f4047c4 100644
--- a/gcc/expr.c
+++ b/gcc/expr.c
@@ -41,6 +41,7 @@ along with GCC; see the file COPYING3. If not see
#include "insn-attr.h"
/* Include expr.h after insn-config.h so we get HAVE_conditional_move. */
#include "expr.h"
+#include "insn-codes.h"
#include "optabs.h"
#include "libfuncs.h"
#include "recog.h"
@@ -3628,6 +3629,21 @@ emit_move_insn (rtx x, rtx y)
return last_insn;
}
+/* Generate the body of an instruction to copy Y into X.
+ It may be a list of insns, if one insn isn't enough. */
+
+rtx
+gen_move_insn (rtx x, rtx y)
+{
+ rtx_insn *seq;
+
+ start_sequence ();
+ emit_move_insn_1 (x, y);
+ seq = get_insns ();
+ end_sequence ();
+ return seq;
+}
+
/* If Y is representable exactly in a narrower mode, and the target can
perform the extension directly from constant or memory, then emit the
move as an extension. */
diff --git a/gcc/expr.h b/gcc/expr.h
index ba93693..5793560 100644
--- a/gcc/expr.h
+++ b/gcc/expr.h
@@ -37,6 +37,7 @@ along with GCC; see the file COPYING3. If not see
ssize_int, TREE_CODE, TYPE_SIZE, int_size_in_bytes, */
#include "tree-core.h"
/* For GET_MODE_BITSIZE, word_mode */
+#include "insn-config.h"
/* This is the 4th arg to `expand_expr'.
EXPAND_STACK_PARM means we are possibly expanding a call param onto
@@ -72,93 +73,6 @@ typedef struct separate_ops
tree op0, op1, op2;
} *sepops;
-/* Functions from optabs.c, commonly used, and without need for the optabs
- tables: */
-
-/* Passed to expand_simple_binop and expand_binop to say which options
- to try to use if the requested operation can't be open-coded on the
- requisite mode. Either OPTAB_LIB or OPTAB_LIB_WIDEN says try using
- a library call. Either OPTAB_WIDEN or OPTAB_LIB_WIDEN says try
- using a wider mode. OPTAB_MUST_WIDEN says try widening and don't
- try anything else. */
-
-enum optab_methods
-{
- OPTAB_DIRECT,
- OPTAB_LIB,
- OPTAB_WIDEN,
- OPTAB_LIB_WIDEN,
- OPTAB_MUST_WIDEN
-};
-
-/* Generate code for a simple binary or unary operation. "Simple" in
- this case means "can be unambiguously described by a (mode, code)
- pair and mapped to a single optab." */
-extern rtx expand_simple_binop (machine_mode, enum rtx_code, rtx,
- rtx, rtx, int, enum optab_methods);
-extern rtx expand_simple_unop (machine_mode, enum rtx_code, rtx, rtx,
- int);
-
-/* Report whether the machine description contains an insn which can
- perform the operation described by CODE and MODE. */
-extern int have_insn_for (enum rtx_code, machine_mode);
-
-/* Emit code to make a call to a constant function or a library call. */
-extern void emit_libcall_block (rtx, rtx, rtx, rtx);
-
-/* Create but don't emit one rtl instruction to perform certain operations.
- Modes must match; operands must meet the operation's predicates.
- Likewise for subtraction and for just copying. */
-extern rtx gen_add2_insn (rtx, rtx);
-extern rtx gen_add3_insn (rtx, rtx, rtx);
-extern rtx gen_addptr3_insn (rtx, rtx, rtx);
-extern rtx gen_sub2_insn (rtx, rtx);
-extern rtx gen_sub3_insn (rtx, rtx, rtx);
-extern rtx gen_move_insn (rtx, rtx);
-extern int have_add2_insn (rtx, rtx);
-extern int have_addptr3_insn (rtx, rtx, rtx);
-extern int have_sub2_insn (rtx, rtx);
-
-/* Emit a pair of rtl insns to compare two rtx's and to jump
- to a label if the comparison is true. */
-extern void emit_cmp_and_jump_insns (rtx, rtx, enum rtx_code, rtx,
- machine_mode, int, rtx, int prob=-1);
-
-/* Generate code to indirectly jump to a location given in the rtx LOC. */
-extern void emit_indirect_jump (rtx);
-
-/* Generate a conditional trap instruction. */
-extern rtx gen_cond_trap (enum rtx_code, rtx, rtx, rtx);
-
-#include "insn-config.h"
-
-#ifdef HAVE_conditional_move
-/* Emit a conditional move operation. */
-rtx emit_conditional_move (rtx, enum rtx_code, rtx, rtx, machine_mode,
- rtx, rtx, machine_mode, int);
-
-/* Return nonzero if the conditional move is supported. */
-int can_conditionally_move_p (machine_mode mode);
-
-#endif
-rtx emit_conditional_add (rtx, enum rtx_code, rtx, rtx, machine_mode,
- rtx, rtx, machine_mode, int);
-
-rtx expand_sync_operation (rtx, rtx, enum rtx_code);
-rtx expand_sync_fetch_operation (rtx, rtx, enum rtx_code, bool, rtx);
-rtx expand_sync_lock_test_and_set (rtx, rtx, rtx);
-
-rtx expand_atomic_exchange (rtx, rtx, rtx, enum memmodel);
-rtx expand_atomic_load (rtx, rtx, enum memmodel);
-rtx expand_atomic_store (rtx, rtx, enum memmodel, bool);
-rtx expand_atomic_fetch_op (rtx, rtx, rtx, enum rtx_code, enum memmodel,
- bool);
-rtx expand_atomic_test_and_set (rtx, rtx, enum memmodel);
-rtx expand_atomic_clear (rtx, enum memmodel);
-void expand_atomic_thread_fence (enum memmodel);
-void expand_atomic_signal_fence (enum memmodel);
-
-
/* Functions from expmed.c: */
/* Arguments MODE, RTX: return an rtx for the negation of that value.
@@ -334,6 +248,7 @@ extern rtx store_by_pieces (rtx, unsigned HOST_WIDE_INT,
/* Emit insns to set X from Y. */
extern rtx_insn *emit_move_insn (rtx, rtx);
+extern rtx gen_move_insn (rtx, rtx);
/* Emit insns to set X from Y, with no frills. */
extern rtx_insn *emit_move_insn_1 (rtx, rtx);
@@ -671,18 +586,6 @@ extern int safe_from_p (const_rtx, tree, int);
extern bool split_comparison (enum rtx_code, machine_mode,
enum rtx_code *, enum rtx_code *);
-/* Call this once to initialize the contents of the optabs
- appropriately for the current target machine. */
-extern void init_optabs (void);
-extern void init_all_optabs (struct target_optabs *);
-
-/* Call this to initialize an optab function entry. */
-extern rtx init_one_libfunc (const char *);
-extern rtx set_user_assembler_libfunc (const char *, const char *);
-
-/* Build a decl for a libfunc named NAME. */
-extern tree build_libfunc_function (const char *);
-
/* Get the personality libfunc for a function decl. */
rtx get_personality_function (tree);
diff --git a/gcc/function.c b/gcc/function.c
index 1ef43c4..6d09982 100644
--- a/gcc/function.c
+++ b/gcc/function.c
@@ -50,6 +50,7 @@ along with GCC; see the file COPYING3. If not see
#include "input.h"
#include "function.h"
#include "expr.h"
+#include "insn-codes.h"
#include "optabs.h"
#include "libfuncs.h"
#include "regs.h"
diff --git a/gcc/genemit.c b/gcc/genemit.c
index 9dc2d0b..5f30f42 100644
--- a/gcc/genemit.c
+++ b/gcc/genemit.c
@@ -809,6 +809,7 @@ from the machine description file `md'. */\n\n");
printf ("#include \"input.h\"\n");
printf ("#include \"function.h\"\n");
printf ("#include \"expr.h\"\n");
+ printf ("#include \"insn-codes.h\"\n");
printf ("#include \"optabs.h\"\n");
printf ("#include \"dfp.h\"\n");
printf ("#include \"flags.h\"\n");
diff --git a/gcc/gengtype.c b/gcc/gengtype.c
index d55d530..fac83ee 100644
--- a/gcc/gengtype.c
+++ b/gcc/gengtype.c
@@ -1826,7 +1826,7 @@ open_base_files (void)
{
/* The order of files here matters very much. */
static const char *const ifiles[] = {
- "config.h", "system.h", "coretypes.h", "tm.h",
+ "config.h", "system.h", "coretypes.h", "tm.h", "insn-codes.h",
"hashtab.h", "splay-tree.h", "obstack.h", "bitmap.h", "input.h",
"tree.h", "rtl.h", "wide-int.h", "hashtab.h", "hash-set.h", "vec.h",
"machmode.h", "tm.h", "hard-reg-set.h", "input.h", "predict.h",
diff --git a/gcc/genopinit.c b/gcc/genopinit.c
index b8a2827..2d14d12 100644
--- a/gcc/genopinit.c
+++ b/gcc/genopinit.c
@@ -398,6 +398,68 @@ main (int argc, char **argv)
fprintf (h_file, "#define NUM_OPTAB_PATTERNS %u\n",
(unsigned) patterns.length ());
+ fprintf (h_file,
+ "typedef enum optab_tag optab;\n"
+ "typedef enum optab_tag convert_optab;\n"
+ "typedef enum optab_tag direct_optab;\n"
+ "\n"
+ "struct optab_libcall_d\n"
+ "{\n"
+ " char libcall_suffix;\n"
+ " const char *libcall_basename;\n"
+ " void (*libcall_gen) (optab, const char *name,\n"
+ " char suffix, machine_mode);\n"
+ "};\n"
+ "\n"
+ "struct convert_optab_libcall_d\n"
+ "{\n"
+ " const char *libcall_basename;\n"
+ " void (*libcall_gen) (convert_optab, const char *name,\n"
+ " machine_mode, machine_mode);\n"
+ "};\n"
+ "\n"
+ "/* Given an enum insn_code, access the function to construct\n"
+ " the body of that kind of insn. */\n"
+ "#define GEN_FCN(CODE) (insn_data[CODE].genfun)\n"
+ "\n"
+ "/* Contains the optab used for each rtx code, and vice-versa. */\n"
+ "extern const optab code_to_optab_[NUM_RTX_CODE];\n"
+ "extern const enum rtx_code optab_to_code_[NUM_OPTABS];\n"
+ "\n"
+ "static inline optab\n"
+ "code_to_optab (enum rtx_code code)\n"
+ "{\n"
+ " return code_to_optab_[code];\n"
+ "}\n"
+ "\n"
+ "static inline enum rtx_code\n"
+ "optab_to_code (optab op)\n"
+ "{\n"
+ " return optab_to_code_[op];\n"
+ "}\n"
+ "\n"
+ "extern const struct convert_optab_libcall_d convlib_def[NUM_CONVLIB_OPTABS];\n"
+ "extern const struct optab_libcall_d normlib_def[NUM_NORMLIB_OPTABS];\n"
+ "\n"
+ "/* Returns the active icode for the given (encoded) optab. */\n"
+ "extern enum insn_code raw_optab_handler (unsigned);\n"
+ "extern bool swap_optab_enable (optab, machine_mode, bool);\n"
+ "\n"
+ "/* Target-dependent globals. */\n"
+ "struct target_optabs {\n"
+ " /* Patterns that are used by optabs that are enabled for this target. */\n"
+ " bool pat_enable[NUM_OPTAB_PATTERNS];\n"
+ "};\n"
+ "extern void init_all_optabs (struct target_optabs *);\n"
+ "\n"
+ "extern struct target_optabs default_target_optabs;\n"
+ "extern struct target_optabs *this_fn_optabs;\n"
+ "#if SWITCHABLE_TARGET\n"
+ "extern struct target_optabs *this_target_optabs;\n"
+ "#else\n"
+ "#define this_target_optabs (&default_target_optabs)\n"
+ "#endif\n");
+
fprintf (s_file,
"#include \"config.h\"\n"
"#include \"system.h\"\n"
@@ -413,6 +475,7 @@ main (int argc, char **argv)
"#include \"flags.h\"\n"
"#include \"insn-config.h\"\n"
"#include \"expr.h\"\n"
+ "#include \"insn-codes.h\"\n"
"#include \"optabs.h\"\n"
"\n"
"struct optab_pat {\n"
diff --git a/gcc/ifcvt.c b/gcc/ifcvt.c
index 8cf0a95..772b184 100644
--- a/gcc/ifcvt.c
+++ b/gcc/ifcvt.c
@@ -44,6 +44,7 @@
#include "basic-block.h"
#include "expr.h"
#include "output.h"
+#include "insn-codes.h"
#include "optabs.h"
#include "diagnostic-core.h"
#include "tm_p.h"
diff --git a/gcc/internal-fn.c b/gcc/internal-fn.c
index b32ce96..04f8b64 100644
--- a/gcc/internal-fn.c
+++ b/gcc/internal-fn.c
@@ -24,6 +24,7 @@ along with GCC; see the file COPYING3. If not see
#include "internal-fn.h"
#include "stor-layout.h"
#include "expr.h"
+#include "insn-codes.h"
#include "optabs.h"
#include "predict.h"
#include "vec.h"
diff --git a/gcc/loop-unroll.c b/gcc/loop-unroll.c
index ec33f749..c4c6b0d 100644
--- a/gcc/loop-unroll.c
+++ b/gcc/loop-unroll.c
@@ -39,6 +39,8 @@ along with GCC; see the file COPYING3. If not see
#include "basic-block.h"
#include "cfgloop.h"
#include "params.h"
+#include "insn-codes.h"
+#include "optabs.h"
#include "expr.h"
#include "hash-table.h"
#include "recog.h"
diff --git a/gcc/lra.c b/gcc/lra.c
index c2c0fc3..ee390db 100644
--- a/gcc/lra.c
+++ b/gcc/lra.c
@@ -112,6 +112,8 @@ along with GCC; see the file COPYING3. If not see
#include "machmode.h"
#include "input.h"
#include "function.h"
+#include "tree-core.h"
+#include "optabs.h"
#include "expr.h"
#include "predict.h"
#include "dominance.h"
diff --git a/gcc/modulo-sched.c b/gcc/modulo-sched.c
index eba9102..8abb8ee 100644
--- a/gcc/modulo-sched.c
+++ b/gcc/modulo-sched.c
@@ -48,6 +48,9 @@ along with GCC; see the file COPYING3. If not see
#include "sched-int.h"
#include "target.h"
#include "cfgloop.h"
+#include "tree-core.h"
+#include "insn-codes.h"
+#include "optabs.h"
#include "expr.h"
#include "params.h"
#include "gcov-io.h"
diff --git a/gcc/omp-low.c b/gcc/omp-low.c
index 91f8e8f..b59d069 100644
--- a/gcc/omp-low.c
+++ b/gcc/omp-low.c
@@ -73,6 +73,7 @@ along with GCC; see the file COPYING3. If not see
#include "tree-pass.h"
#include "except.h"
#include "splay-tree.h"
+#include "insn-codes.h"
#include "optabs.h"
#include "cfgloop.h"
#include "target.h"
diff --git a/gcc/optabs.c b/gcc/optabs.c
index a9a546e..7e64eac 100644
--- a/gcc/optabs.c
+++ b/gcc/optabs.c
@@ -44,6 +44,7 @@ along with GCC; see the file COPYING3. If not see
#include "function.h"
#include "except.h"
#include "expr.h"
+#include "insn-codes.h"
#include "optabs.h"
#include "libfuncs.h"
#include "recog.h"
@@ -4894,21 +4895,6 @@ have_sub2_insn (rtx x, rtx y)
return 1;
}
-
-/* Generate the body of an instruction to copy Y into X.
- It may be a list of insns, if one insn isn't enough. */
-
-rtx
-gen_move_insn (rtx x, rtx y)
-{
- rtx_insn *seq;
-
- start_sequence ();
- emit_move_insn_1 (x, y);
- seq = get_insns ();
- end_sequence ();
- return seq;
-}
/* Return the insn code used to extend FROM_MODE to TO_MODE.
UNSIGNEDP specifies zero-extension instead of sign-extension. If
diff --git a/gcc/optabs.h b/gcc/optabs.h
index 1ed7957..91e36d6 100644
--- a/gcc/optabs.h
+++ b/gcc/optabs.h
@@ -20,244 +20,11 @@ along with GCC; see the file COPYING3. If not see
#ifndef GCC_OPTABS_H
#define GCC_OPTABS_H
-#include "insn-codes.h"
#include "insn-opinit.h"
-typedef enum optab_tag optab;
-typedef enum optab_tag convert_optab;
-typedef enum optab_tag direct_optab;
-
-struct optab_libcall_d
-{
- char libcall_suffix;
- const char *libcall_basename;
- void (*libcall_gen) (optab, const char *name,
- char suffix, machine_mode);
-};
-
-struct convert_optab_libcall_d
-{
- const char *libcall_basename;
- void (*libcall_gen) (convert_optab, const char *name,
- machine_mode, machine_mode);
-};
-
-/* Given an enum insn_code, access the function to construct
- the body of that kind of insn. */
-#define GEN_FCN(CODE) (insn_data[CODE].genfun)
-
-/* Contains the optab used for each rtx code, and vice-versa. */
-extern const optab code_to_optab_[NUM_RTX_CODE];
-extern const enum rtx_code optab_to_code_[NUM_OPTABS];
-
-static inline optab
-code_to_optab (enum rtx_code code)
-{
- return code_to_optab_[code];
-}
-
-static inline enum rtx_code
-optab_to_code (optab op)
-{
- return optab_to_code_[op];
-}
-
-extern const struct convert_optab_libcall_d convlib_def[NUM_CONVLIB_OPTABS];
-extern const struct optab_libcall_d normlib_def[NUM_NORMLIB_OPTABS];
-
-/* Returns the active icode for the given (encoded) optab. */
-extern enum insn_code raw_optab_handler (unsigned);
-extern bool swap_optab_enable (optab, machine_mode, bool);
-
-/* Target-dependent globals. */
-struct target_optabs {
- /* Patterns that are used by optabs that are enabled for this target. */
- bool pat_enable[NUM_OPTAB_PATTERNS];
-};
-
-extern struct target_optabs default_target_optabs;
-extern struct target_optabs *this_fn_optabs;
-#if SWITCHABLE_TARGET
-extern struct target_optabs *this_target_optabs;
-#else
-#define this_target_optabs (&default_target_optabs)
-#endif
-
-/* Define functions given in optabs.c. */
-
-extern rtx expand_widen_pattern_expr (sepops ops, rtx op0, rtx op1, rtx wide_op,
- rtx target, int unsignedp);
-
-extern rtx expand_ternary_op (machine_mode mode, optab ternary_optab,
- rtx op0, rtx op1, rtx op2, rtx target,
- int unsignedp);
-
-/* Expand a binary operation given optab and rtx operands. */
-extern rtx expand_binop (machine_mode, optab, rtx, rtx, rtx, int,
- enum optab_methods);
-
-extern rtx simplify_expand_binop (machine_mode mode, optab binoptab,
- rtx op0, rtx op1, rtx target, int unsignedp,
- enum optab_methods methods);
-
-extern bool force_expand_binop (machine_mode, optab, rtx, rtx, rtx, int,
- enum optab_methods);
-
-/* Expand a binary operation with both signed and unsigned forms. */
-extern rtx sign_expand_binop (machine_mode, optab, optab, rtx, rtx,
- rtx, int, enum optab_methods);
-
-/* Generate code to perform an operation on one operand with two results. */
-extern int expand_twoval_unop (optab, rtx, rtx, rtx, int);
-
-/* Generate code to perform an operation on two operands with two results. */
-extern int expand_twoval_binop (optab, rtx, rtx, rtx, rtx, int);
-
-/* Generate code to perform an operation on two operands with two
- results, using a library function. */
-extern bool expand_twoval_binop_libfunc (optab, rtx, rtx, rtx, rtx,
- enum rtx_code);
-
-/* Expand a unary arithmetic operation given optab rtx operand. */
-extern rtx expand_unop (machine_mode, optab, rtx, rtx, int);
-
-/* Expand the absolute value operation. */
-extern rtx expand_abs_nojump (machine_mode, rtx, rtx, int);
-extern rtx expand_abs (machine_mode, rtx, rtx, int, int);
-
-/* Expand the one's complement absolute value operation. */
-extern rtx expand_one_cmpl_abs_nojump (machine_mode, rtx, rtx);
-
-/* Expand the copysign operation. */
-extern rtx expand_copysign (rtx, rtx, rtx);
-
-/* Generate an instruction with a given INSN_CODE with an output and
- an input. */
-extern void emit_unop_insn (enum insn_code, rtx, rtx, enum rtx_code);
-extern bool maybe_emit_unop_insn (enum insn_code, rtx, rtx, enum rtx_code);
-
-/* Find a widening optab even if it doesn't widen as much as we want. */
-#define find_widening_optab_handler(A,B,C,D) \
- find_widening_optab_handler_and_mode (A, B, C, D, NULL)
-extern enum insn_code find_widening_optab_handler_and_mode (optab,
- machine_mode,
- machine_mode,
- int,
- machine_mode *);
-extern enum insn_code widening_optab_handler (optab, machine_mode,
- machine_mode);
-
-/* An extra flag to control optab_for_tree_code's behavior. This is needed to
- distinguish between machines with a vector shift that takes a scalar for the
- shift amount vs. machines that take a vector for the shift amount. */
-enum optab_subtype
-{
- optab_default,
- optab_scalar,
- optab_vector
-};
-
-/* Return the optab used for computing the given operation on the type given by
- the second argument. The third argument distinguishes between the types of
- vector shifts and rotates */
-extern optab optab_for_tree_code (enum tree_code, const_tree, enum optab_subtype);
-
-/* Given an optab that reduces a vector to a scalar, find instead the old
- optab that produces a vector with the reduction result in one element,
- for a tree with the specified type. */
-extern optab scalar_reduc_to_vector (optab, const_tree type);
-
-/* The various uses that a comparison can have; used by can_compare_p:
- jumps, conditional moves, store flag operations. */
-enum can_compare_purpose
-{
- ccp_jump,
- ccp_cmov,
- ccp_store_flag
-};
-
-/* Nonzero if a compare of mode MODE can be done straightforwardly
- (without splitting it into pieces). */
-extern int can_compare_p (enum rtx_code, machine_mode,
- enum can_compare_purpose);
-
-/* Return the INSN_CODE to use for an extend operation. */
-extern enum insn_code can_extend_p (machine_mode, machine_mode, int);
-
-/* Generate the body of an insn to extend Y (with mode MFROM)
- into X (with mode MTO). Do zero-extension if UNSIGNEDP is nonzero. */
-extern rtx gen_extend_insn (rtx, rtx, machine_mode,
- machine_mode, int);
-
-/* Call this to reset the function entry for one optab. */
-extern void set_optab_libfunc (optab, machine_mode, const char *);
-extern void set_conv_libfunc (convert_optab, machine_mode,
- machine_mode, const char *);
-
-/* Call this to install all of the __sync libcalls up to size MAX. */
-extern void init_sync_libfuncs (int max);
-
-/* Generate code for a FIXED_CONVERT_EXPR. */
-extern void expand_fixed_convert (rtx, rtx, int, int);
-
-/* Generate code for a FLOAT_EXPR. */
-extern void expand_float (rtx, rtx, int);
-
-/* Return the insn_code for a FLOAT_EXPR. */
-enum insn_code can_float_p (machine_mode, machine_mode, int);
-
-/* Return true if there is an inline compare and swap pattern. */
-extern bool can_compare_and_swap_p (machine_mode, bool);
-
-/* Return true if there is an inline atomic exchange pattern. */
-extern bool can_atomic_exchange_p (machine_mode, bool);
-
-/* Generate code for a compare and swap. */
-extern bool expand_atomic_compare_and_swap (rtx *, rtx *, rtx, rtx, rtx, bool,
- enum memmodel, enum memmodel);
-
-/* Generate memory barriers. */
-extern void expand_mem_thread_fence (enum memmodel);
-extern void expand_mem_signal_fence (enum memmodel);
-
-/* Check whether an operation represented by the code CODE is a
- convert operation that is supported by the target platform in
- vector form */
-bool supportable_convert_operation (enum tree_code, tree, tree, tree *,
- enum tree_code *);
-
-/* Generate code for a FIX_EXPR. */
-extern void expand_fix (rtx, rtx, int);
-
-/* Generate code for float to integral conversion. */
-extern bool expand_sfix_optab (rtx, rtx, convert_optab);
-
/* Generate code for a widening multiply. */
extern rtx expand_widening_mult (machine_mode, rtx, rtx, rtx, int, optab);
-/* Return tree if target supports vector operations for COND_EXPR. */
-bool expand_vec_cond_expr_p (tree, tree);
-
-/* Generate code for VEC_COND_EXPR. */
-extern rtx expand_vec_cond_expr (tree, tree, tree, tree, rtx);
-/* Generate code for VEC_RSHIFT_EXPR. */
-extern rtx expand_vec_shift_expr (sepops, rtx);
-
-/* Return true if target supports vector operations for VEC_PERM_EXPR. */
-extern bool can_vec_perm_p (machine_mode, bool, const unsigned char *);
-
-/* Generate code for VEC_PERM_EXPR. */
-extern rtx expand_vec_perm (machine_mode, rtx, rtx, rtx, rtx);
-
-/* Return non-zero if target supports a given highpart multiplication. */
-extern int can_mult_highpart_p (machine_mode, bool);
-
-/* Generate code for MULT_HIGHPART_EXPR. */
-extern rtx expand_mult_highpart (machine_mode, rtx, rtx, rtx, bool);
-
-/* Return true if target supports vector masked load/store for mode. */
-extern bool can_vec_mask_load_store_p (machine_mode, bool);
-
/* Return the insn used to implement mode MODE of OP, or CODE_FOR_nothing
if the target does not have such an insn. */
@@ -310,9 +77,7 @@ trapv_binoptab_p (optab binoptab)
|| binoptab == smulv_optab);
}
-extern rtx optab_libfunc (optab optab, machine_mode mode);
-extern rtx convert_optab_libfunc (convert_optab optab, machine_mode mode1,
- machine_mode mode2);
+
/* Describes an instruction that inserts or extracts a bitfield. */
struct extraction_insn
@@ -333,21 +98,8 @@ struct extraction_insn
machine_mode pos_mode;
};
-/* Enumerates the possible extraction_insn operations. */
-enum extraction_pattern { EP_insv, EP_extv, EP_extzv };
-
-extern bool get_best_reg_extraction_insn (extraction_insn *,
- enum extraction_pattern,
- unsigned HOST_WIDE_INT,
- machine_mode);
-extern bool get_best_mem_extraction_insn (extraction_insn *,
- enum extraction_pattern,
- HOST_WIDE_INT, HOST_WIDE_INT,
- machine_mode);
-extern bool insn_operand_matches (enum insn_code icode, unsigned int opno,
- rtx operand);
/* Describes the type of an expand_operand. Each value is associated
with a create_*_operand function; see the comments above those
@@ -452,8 +204,6 @@ create_convert_operand_from (struct expand_operand *op, rtx value,
create_expand_operand (op, EXPAND_CONVERT_FROM, value, mode, unsigned_p);
}
-extern void create_convert_operand_from_type (struct expand_operand *op,
- rtx value, tree type);
/* Make OP describe an input Pmode address operand. VALUE is the value
of the address, but it may need to be converted to Pmode first. */
@@ -476,24 +226,202 @@ create_integer_operand (struct expand_operand *op, HOST_WIDE_INT intval)
create_expand_operand (op, EXPAND_INTEGER, GEN_INT (intval), VOIDmode, false);
}
-extern bool valid_multiword_target_p (rtx);
-extern bool maybe_legitimize_operands (enum insn_code icode,
- unsigned int opno, unsigned int nops,
- struct expand_operand *ops);
-extern rtx maybe_gen_insn (enum insn_code icode, unsigned int nops,
- struct expand_operand *ops);
-extern bool maybe_expand_insn (enum insn_code icode, unsigned int nops,
- struct expand_operand *ops);
-extern bool maybe_expand_jump_insn (enum insn_code icode, unsigned int nops,
- struct expand_operand *ops);
-extern void expand_insn (enum insn_code icode, unsigned int nops,
- struct expand_operand *ops);
-extern void expand_jump_insn (enum insn_code icode, unsigned int nops,
- struct expand_operand *ops);
+extern rtx convert_optab_libfunc (convert_optab optab, machine_mode mode1,
+ machine_mode mode2);
+extern rtx optab_libfunc (optab optab, machine_mode mode);
+extern enum insn_code widening_optab_handler (optab, machine_mode,
+ machine_mode);
+/* Find a widening optab even if it doesn't widen as much as we want. */
+#define find_widening_optab_handler(A,B,C,D) \
+ find_widening_optab_handler_and_mode (A, B, C, D, NULL)
+extern enum insn_code find_widening_optab_handler_and_mode (optab,
+ machine_mode,
+ machine_mode,
+ int,
+ machine_mode *);
+
+/* An extra flag to control optab_for_tree_code's behavior. This is needed to
+ distinguish between machines with a vector shift that takes a scalar for the
+ shift amount vs. machines that take a vector for the shift amount. */
+enum optab_subtype
+{
+ optab_default,
+ optab_scalar,
+ optab_vector
+};
+
+/* Passed to expand_simple_binop and expand_binop to say which options
+ to try to use if the requested operation can't be open-coded on the
+ requisite mode. Either OPTAB_LIB or OPTAB_LIB_WIDEN says try using
+ a library call. Either OPTAB_WIDEN or OPTAB_LIB_WIDEN says try
+ using a wider mode. OPTAB_MUST_WIDEN says try widening and don't
+ try anything else. */
+
+enum optab_methods
+{
+ OPTAB_DIRECT,
+ OPTAB_LIB,
+ OPTAB_WIDEN,
+ OPTAB_LIB_WIDEN,
+ OPTAB_MUST_WIDEN
+};
+
+/* Return the optab used for computing the given operation on the type given by
+ the second argument. The third argument distinguishes between the types of
+ vector shifts and rotates */
+extern optab optab_for_tree_code (enum tree_code, const_tree, enum optab_subtype);
+
+/* Given an optab that reduces a vector to a scalar, find instead the old
+ optab that produces a vector with the reduction result in one element,
+ for a tree with the specified type. */
+extern optab scalar_reduc_to_vector (optab, const_tree type);
+
+extern rtx expand_widen_pattern_expr (struct separate_ops *, rtx , rtx , rtx,
+ rtx, int);
+extern rtx expand_ternary_op (machine_mode mode, optab ternary_optab,
+ rtx op0, rtx op1, rtx op2, rtx target,
+ int unsignedp);
+extern rtx simplify_expand_binop (machine_mode mode, optab binoptab,
+ rtx op0, rtx op1, rtx target, int unsignedp,
+ enum optab_methods methods);
+extern bool force_expand_binop (machine_mode, optab, rtx, rtx, rtx, int,
+ enum optab_methods);
+/* Generate code for VEC_RSHIFT_EXPR. */
+extern rtx expand_vec_shift_expr (struct separate_ops *, rtx);
+
+/* Generate code for a simple binary or unary operation. "Simple" in
+ this case means "can be unambiguously described by a (mode, code)
+ pair and mapped to a single optab." */
+extern rtx expand_simple_binop (machine_mode, enum rtx_code, rtx,
+ rtx, rtx, int, enum optab_methods);
+
+/* Expand a binary operation given optab and rtx operands. */
+extern rtx expand_binop (machine_mode, optab, rtx, rtx, rtx, int,
+ enum optab_methods);
+/* Expand a binary operation with both signed and unsigned forms. */
+extern rtx sign_expand_binop (machine_mode, optab, optab, rtx, rtx,
+ rtx, int, enum optab_methods);
+
+/* Generate code to perform an operation on one operand with two results. */
+extern int expand_twoval_unop (optab, rtx, rtx, rtx, int);
+
+/* Generate code to perform an operation on two operands with two results. */
+extern int expand_twoval_binop (optab, rtx, rtx, rtx, rtx, int);
+
+/* Generate code to perform an operation on two operands with two
+ results, using a library function. */
+extern bool expand_twoval_binop_libfunc (optab, rtx, rtx, rtx, rtx,
+ enum rtx_code);
+extern rtx expand_simple_unop (machine_mode, enum rtx_code, rtx, rtx,
+ int);
+
+/* Expand a unary arithmetic operation given optab rtx operand. */
+extern rtx expand_unop (machine_mode, optab, rtx, rtx, int);
+
+/* Expand the absolute value operation. */
+extern rtx expand_abs_nojump (machine_mode, rtx, rtx, int);
+extern rtx expand_abs (machine_mode, rtx, rtx, int, int);
+
+/* Expand the one's complement absolute value operation. */
+extern rtx expand_one_cmpl_abs_nojump (machine_mode, rtx, rtx);
+
+/* Expand the copysign operation. */
+extern rtx expand_copysign (rtx, rtx, rtx);
+/* Generate an instruction with a given INSN_CODE with an output and
+ an input. */
+extern bool maybe_emit_unop_insn (enum insn_code, rtx, rtx, enum rtx_code);
+extern void emit_unop_insn (enum insn_code, rtx, rtx, enum rtx_code);
+
+/* Emit code to make a call to a constant function or a library call. */
+extern void emit_libcall_block (rtx, rtx, rtx, rtx);
+
+/* The various uses that a comparison can have; used by can_compare_p:
+ jumps, conditional moves, store flag operations. */
+enum can_compare_purpose
+{
+ ccp_jump,
+ ccp_cmov,
+ ccp_store_flag
+};
+
+/* Nonzero if a compare of mode MODE can be done straightforwardly
+ (without splitting it into pieces). */
+extern int can_compare_p (enum rtx_code, machine_mode,
+ enum can_compare_purpose);
extern rtx prepare_operand (enum insn_code, rtx, int, machine_mode,
machine_mode, int);
+/* Emit a pair of rtl insns to compare two rtx's and to jump
+ to a label if the comparison is true. */
+extern void emit_cmp_and_jump_insns (rtx, rtx, enum rtx_code, rtx,
+ machine_mode, int, rtx, int prob=-1);
+
+/* Generate code to indirectly jump to a location given in the rtx LOC. */
+extern void emit_indirect_jump (rtx);
+
+#include "insn-config.h"
+
+#ifndef GCC_INSN_CONFIG_H
+#error "insn-config.h must be included before optabs.h"
+#endif
+
+#ifdef HAVE_conditional_move
+/* Emit a conditional move operation. */
+rtx emit_conditional_move (rtx, enum rtx_code, rtx, rtx, machine_mode,
+ rtx, rtx, machine_mode, int);
+
+/* Return nonzero if the conditional move is supported. */
+int can_conditionally_move_p (machine_mode mode);
+
+#endif
+rtx emit_conditional_add (rtx, enum rtx_code, rtx, rtx, machine_mode,
+ rtx, rtx, machine_mode, int);
+
+/* Create but don't emit one rtl instruction to perform certain operations.
+ Modes must match; operands must meet the operation's predicates.
+ Likewise for subtraction and for just copying. */
+extern rtx gen_add2_insn (rtx, rtx);
+extern rtx gen_add3_insn (rtx, rtx, rtx);
+extern int have_add2_insn (rtx, rtx);
+extern rtx gen_addptr3_insn (rtx, rtx, rtx);
+extern int have_addptr3_insn (rtx, rtx, rtx);
+extern rtx gen_sub2_insn (rtx, rtx);
+extern rtx gen_sub3_insn (rtx, rtx, rtx);
+extern int have_sub2_insn (rtx, rtx);
+
+/* Return the INSN_CODE to use for an extend operation. */
+extern enum insn_code can_extend_p (machine_mode, machine_mode, int);
+
+/* Generate the body of an insn to extend Y (with mode MFROM)
+ into X (with mode MTO). Do zero-extension if UNSIGNEDP is nonzero. */
+extern rtx gen_extend_insn (rtx, rtx, machine_mode,
+ machine_mode, int);
+
+/* Return the insn_code for a FLOAT_EXPR. */
+enum insn_code can_float_p (machine_mode, machine_mode, int);
+
+/* Check whether an operation represented by the code CODE is a
+ convert operation that is supported by the target platform in
+ vector form */
+bool supportable_convert_operation (enum tree_code, tree, tree, tree *,
+ enum tree_code *);
+
+/* Generate code for a FLOAT_EXPR. */
+extern void expand_float (rtx, rtx, int);
+
+/* Generate code for a FIX_EXPR. */
+extern void expand_fix (rtx, rtx, int);
+
+/* Generate code for a FIXED_CONVERT_EXPR. */
+extern void expand_fixed_convert (rtx, rtx, int, int);
+
+/* Generate code for float to integral conversion. */
+extern bool expand_sfix_optab (rtx, rtx, convert_optab);
+
+/* Report whether the machine description contains an insn which can
+ perform the operation described by CODE and MODE. */
+extern int have_insn_for (enum rtx_code, machine_mode);
extern void gen_int_libfunc (optab, const char *, char, machine_mode);
extern void gen_fp_libfunc (optab, const char *, char, machine_mode);
@@ -542,7 +470,102 @@ extern void gen_satfract_conv_libfunc (convert_optab, const char *,
extern void gen_satfractuns_conv_libfunc (convert_optab, const char *,
machine_mode,
machine_mode);
+
+/* Build a decl for a libfunc named NAME. */
+extern tree build_libfunc_function (const char *);
+
+/* Call this to initialize an optab function entry. */
+extern rtx init_one_libfunc (const char *);
+extern rtx set_user_assembler_libfunc (const char *, const char *);
+
+/* Call this to reset the function entry for one optab. */
+extern void set_optab_libfunc (optab, machine_mode, const char *);
+extern void set_conv_libfunc (convert_optab, machine_mode,
+ machine_mode, const char *);
+
+/* Call this once to initialize the contents of the optabs
+ appropriately for the current target machine. */
+extern void init_optabs (void);
extern void init_tree_optimization_optabs (tree);
+
+/* Call this to install all of the __sync libcalls up to size MAX. */
+extern void init_sync_libfuncs (int max);
+
+/* Generate a conditional trap instruction. */
+extern rtx gen_cond_trap (enum rtx_code, rtx, rtx, rtx);
+
+/* Return true if target supports vector operations for VEC_PERM_EXPR. */
+extern bool can_vec_perm_p (machine_mode, bool, const unsigned char *);
+
+/* Generate code for VEC_PERM_EXPR. */
+extern rtx expand_vec_perm (machine_mode, rtx, rtx, rtx, rtx);
+
+/* Return tree if target supports vector operations for COND_EXPR. */
+bool expand_vec_cond_expr_p (tree, tree);
+
+/* Generate code for VEC_COND_EXPR. */
+extern rtx expand_vec_cond_expr (tree, tree, tree, tree, rtx);
+
+/* Return non-zero if target supports a given highpart multiplication. */
+extern int can_mult_highpart_p (machine_mode, bool);
+
+/* Generate code for MULT_HIGHPART_EXPR. */
+extern rtx expand_mult_highpart (machine_mode, rtx, rtx, rtx, bool);
+
+/* Return true if target supports vector masked load/store for mode. */
+extern bool can_vec_mask_load_store_p (machine_mode, bool);
+
+/* Return true if there is an inline compare and swap pattern. */
+extern bool can_compare_and_swap_p (machine_mode, bool);
+
+/* Return true if there is an inline atomic exchange pattern. */
+extern bool can_atomic_exchange_p (machine_mode, bool);
+
+extern rtx expand_sync_lock_test_and_set (rtx, rtx, rtx);
+extern rtx expand_atomic_test_and_set (rtx, rtx, enum memmodel);
+extern rtx expand_atomic_exchange (rtx, rtx, rtx, enum memmodel);
+extern bool expand_atomic_compare_and_swap (rtx *, rtx *, rtx, rtx, rtx, bool,
+ enum memmodel, enum memmodel);
+/* Generate memory barriers. */
+extern void expand_mem_thread_fence (enum memmodel);
+extern void expand_mem_signal_fence (enum memmodel);
+
+rtx expand_atomic_load (rtx, rtx, enum memmodel);
+rtx expand_atomic_store (rtx, rtx, enum memmodel, bool);
+rtx expand_atomic_fetch_op (rtx, rtx, rtx, enum rtx_code, enum memmodel,
+ bool);
+
+extern bool insn_operand_matches (enum insn_code icode, unsigned int opno,
+ rtx operand);
+extern bool valid_multiword_target_p (rtx);
+extern void create_convert_operand_from_type (struct expand_operand *op,
+ rtx value, tree type);
+extern bool maybe_legitimize_operands (enum insn_code icode,
+ unsigned int opno, unsigned int nops,
+ struct expand_operand *ops);
+extern rtx maybe_gen_insn (enum insn_code icode, unsigned int nops,
+ struct expand_operand *ops);
+extern bool maybe_expand_insn (enum insn_code icode, unsigned int nops,
+ struct expand_operand *ops);
+extern bool maybe_expand_jump_insn (enum insn_code icode, unsigned int nops,
+ struct expand_operand *ops);
+extern void expand_insn (enum insn_code icode, unsigned int nops,
+ struct expand_operand *ops);
+extern void expand_jump_insn (enum insn_code icode, unsigned int nops,
+ struct expand_operand *ops);
+
+/* Enumerates the possible extraction_insn operations. */
+enum extraction_pattern { EP_insv, EP_extv, EP_extzv };
+
+extern bool get_best_reg_extraction_insn (extraction_insn *,
+ enum extraction_pattern,
+ unsigned HOST_WIDE_INT,
+ machine_mode);
+extern bool get_best_mem_extraction_insn (extraction_insn *,
+ enum extraction_pattern,
+ HOST_WIDE_INT, HOST_WIDE_INT,
+ machine_mode);
+
extern bool lshift_cheap_p (bool);
#endif /* GCC_OPTABS_H */
diff --git a/gcc/postreload.c b/gcc/postreload.c
index 2e44b0d..43d4681 100644
--- a/gcc/postreload.c
+++ b/gcc/postreload.c
@@ -35,6 +35,7 @@ along with GCC; see the file COPYING3. If not see
#include "input.h"
#include "function.h"
#include "expr.h"
+#include "insn-codes.h"
#include "optabs.h"
#include "regs.h"
#include "predict.h"
diff --git a/gcc/ree.c b/gcc/ree.c
index 2b44ccc..3376901 100644
--- a/gcc/ree.c
+++ b/gcc/ree.c
@@ -242,8 +242,8 @@ along with GCC; see the file COPYING3. If not see
#include "recog.h"
#include "diagnostic-core.h"
#include "target.h"
-#include "optabs.h"
#include "insn-codes.h"
+#include "optabs.h"
#include "rtlhooks-def.h"
#include "params.h"
#include "tree-pass.h"
diff --git a/gcc/reload.c b/gcc/reload.c
index 70f346a..9ef2c89 100644
--- a/gcc/reload.c
+++ b/gcc/reload.c
@@ -96,6 +96,7 @@ a register with any other reload. */
#include "tm_p.h"
#include "insn-config.h"
#include "expr.h"
+#include "insn-codes.h"
#include "optabs.h"
#include "recog.h"
#include "dominance.h"
diff --git a/gcc/reload1.c b/gcc/reload1.c
index 77d90426..dab8a75 100644
--- a/gcc/reload1.c
+++ b/gcc/reload1.c
@@ -36,6 +36,7 @@ along with GCC; see the file COPYING3. If not see
#include "input.h"
#include "function.h"
#include "expr.h"
+#include "insn-codes.h"
#include "optabs.h"
#include "regs.h"
#include "addresses.h"
diff --git a/gcc/shrink-wrap.c b/gcc/shrink-wrap.c
index cfdcf86..aae6643 100644
--- a/gcc/shrink-wrap.c
+++ b/gcc/shrink-wrap.c
@@ -38,6 +38,7 @@ along with GCC; see the file COPYING3. If not see
#include "input.h"
#include "function.h"
#include "expr.h"
+#include "insn-codes.h"
#include "optabs.h"
#include "libfuncs.h"
#include "regs.h"
diff --git a/gcc/simplify-rtx.c b/gcc/simplify-rtx.c
index be16324..1e4ba23 100644
--- a/gcc/simplify-rtx.c
+++ b/gcc/simplify-rtx.c
@@ -37,6 +37,8 @@ along with GCC; see the file COPYING3. If not see
#include "machmode.h"
#include "input.h"
#include "function.h"
+#include "insn-codes.h"
+#include "optabs.h"
#include "expr.h"
#include "diagnostic-core.h"
#include "ggc.h"
diff --git a/gcc/stmt.c b/gcc/stmt.c
index 0430367..1dc11ac 100644
--- a/gcc/stmt.c
+++ b/gcc/stmt.c
@@ -49,6 +49,7 @@ along with GCC; see the file COPYING3. If not see
#include "output.h"
#include "langhooks.h"
#include "predict.h"
+#include "insn-codes.h"
#include "optabs.h"
#include "target.h"
#include "cfganal.h"
diff --git a/gcc/target-globals.c b/gcc/target-globals.c
index 9122d67..2e03c5c 100644
--- a/gcc/target-globals.c
+++ b/gcc/target-globals.c
@@ -34,6 +34,7 @@ along with GCC; see the file COPYING3. If not see
#include "reload.h"
#include "expmed.h"
#include "expr.h"
+#include "insn-codes.h"
#include "optabs.h"
#include "libfuncs.h"
#include "cfgloop.h"
diff --git a/gcc/targhooks.c b/gcc/targhooks.c
index eef3d45..d1d3119 100644
--- a/gcc/targhooks.c
+++ b/gcc/targhooks.c
@@ -69,6 +69,7 @@ along with GCC; see the file COPYING3. If not see
#include "target-def.h"
#include "regs.h"
#include "reload.h"
+#include "insn-codes.h"
#include "optabs.h"
#include "recog.h"
#include "intl.h"
@@ -78,7 +79,6 @@ along with GCC; see the file COPYING3. If not see
#include "gimplify.h"
#include "stringpool.h"
#include "tree-ssanames.h"
-#include "insn-codes.h"
bool
diff --git a/gcc/toplev.c b/gcc/toplev.c
index 2c570d4..eb37bfe 100644
--- a/gcc/toplev.c
+++ b/gcc/toplev.c
@@ -95,6 +95,7 @@ along with GCC; see the file COPYING3. If not see
#include "ipa-reference.h"
#include "ipa-prop.h"
#include "gcse.h"
+#include "insn-codes.h"
#include "optabs.h"
#if defined(DBX_DEBUGGING_INFO) || defined(XCOFF_DEBUGGING_INFO)
diff --git a/gcc/tree-if-conv.c b/gcc/tree-if-conv.c
index 595c05b..d7e9b07 100644
--- a/gcc/tree-if-conv.c
+++ b/gcc/tree-if-conv.c
@@ -125,6 +125,7 @@ along with GCC; see the file COPYING3. If not see
#include "tree-pass.h"
#include "dbgcnt.h"
#include "expr.h"
+#include "insn-codes.h"
#include "optabs.h"
/* List of basic blocks in if-conversion-suitable order. */
diff --git a/gcc/tree-ssa-forwprop.c b/gcc/tree-ssa-forwprop.c
index 3267bb9..21f089c 100644
--- a/gcc/tree-ssa-forwprop.c
+++ b/gcc/tree-ssa-forwprop.c
@@ -60,6 +60,7 @@ along with GCC; see the file COPYING3. If not see
#include "diagnostic.h"
#include "expr.h"
#include "cfgloop.h"
+#include "insn-codes.h"
#include "optabs.h"
#include "tree-ssa-propagate.h"
#include "tree-ssa-dom.h"
diff --git a/gcc/tree-ssa-loop-prefetch.c b/gcc/tree-ssa-loop-prefetch.c
index 0d6805b..2efa2dd 100644
--- a/gcc/tree-ssa-loop-prefetch.c
+++ b/gcc/tree-ssa-loop-prefetch.c
@@ -65,6 +65,7 @@ along with GCC; see the file COPYING3. If not see
/* FIXME: Needed for optabs, but this should all be moved to a TBD interface
between the GIMPLE and RTL worlds. */
#include "expr.h"
+#include "insn-codes.h"
#include "optabs.h"
#include "recog.h"
diff --git a/gcc/tree-ssa-math-opts.c b/gcc/tree-ssa-math-opts.c
index 295e2b5..12fa4e8 100644
--- a/gcc/tree-ssa-math-opts.c
+++ b/gcc/tree-ssa-math-opts.c
@@ -129,6 +129,7 @@ along with GCC; see the file COPYING3. If not see
/* FIXME: RTL headers have to be included here for optabs. */
#include "rtl.h" /* Because optabs.h wants enum rtx_code. */
#include "expr.h" /* Because optabs.h wants sepops. */
+#include "insn-codes.h"
#include "optabs.h"
/* This structure represents one basic block that either computes a
diff --git a/gcc/tree-ssa-phiopt.c b/gcc/tree-ssa-phiopt.c
index 94c7f40..c7c839d 100644
--- a/gcc/tree-ssa-phiopt.c
+++ b/gcc/tree-ssa-phiopt.c
@@ -62,6 +62,7 @@ along with GCC; see the file COPYING3. If not see
#include "gimple-pretty-print.h"
#include "insn-config.h"
#include "expr.h"
+#include "insn-codes.h"
#include "optabs.h"
#include "tree-scalar-evolution.h"
#include "tree-inline.h"
diff --git a/gcc/tree-ssa-reassoc.c b/gcc/tree-ssa-reassoc.c
index b95acfe..748249d 100644
--- a/gcc/tree-ssa-reassoc.c
+++ b/gcc/tree-ssa-reassoc.c
@@ -73,6 +73,7 @@ along with GCC; see the file COPYING3. If not see
#include "diagnostic-core.h"
#include "builtins.h"
#include "gimplify.h"
+#include "insn-codes.h"
#include "optabs.h"
/* This is a simple global reassociation pass. It is, in part, based
diff --git a/gcc/tree-switch-conversion.c b/gcc/tree-switch-conversion.c
index 32f0a11..13a5410 100644
--- a/gcc/tree-switch-conversion.c
+++ b/gcc/tree-switch-conversion.c
@@ -71,6 +71,7 @@ Software Foundation, 51 Franklin Street, Fifth Floor, Boston, MA
/* Need to include expr.h and optabs.h for lshift_cheap_p. */
#include "expr.h"
+#include "insn-codes.h"
#include "optabs.h"
/* Maximum number of case bit tests.
diff --git a/gcc/tree-vect-data-refs.c b/gcc/tree-vect-data-refs.c
index f32bb3d..0bc0356 100644
--- a/gcc/tree-vect-data-refs.c
+++ b/gcc/tree-vect-data-refs.c
@@ -69,6 +69,7 @@ along with GCC; see the file COPYING3. If not see
#include "cgraph.h"
/* Need to include rtl.h, expr.h, etc. for optabs. */
#include "expr.h"
+#include "insn-codes.h"
#include "optabs.h"
#include "builtins.h"
#include "varasm.h"
diff --git a/gcc/tree-vect-generic.c b/gcc/tree-vect-generic.c
index d9445a4..a0c1363 100644
--- a/gcc/tree-vect-generic.c
+++ b/gcc/tree-vect-generic.c
@@ -55,6 +55,7 @@ along with GCC; see the file COPYING3. If not see
/* Need to include rtl.h, expr.h, etc. for optabs. */
#include "expr.h"
+#include "insn-codes.h"
#include "optabs.h"
diff --git a/gcc/tree-vect-loop.c b/gcc/tree-vect-loop.c
index 6855f84..f3f02fa 100644
--- a/gcc/tree-vect-loop.c
+++ b/gcc/tree-vect-loop.c
@@ -59,6 +59,7 @@ along with GCC; see the file COPYING3. If not see
#include "cfgloop.h"
#include "expr.h"
#include "recog.h"
+#include "insn-codes.h"
#include "optabs.h"
#include "params.h"
#include "diagnostic-core.h"
diff --git a/gcc/tree-vect-patterns.c b/gcc/tree-vect-patterns.c
index 8478dfc..24ebba23 100644
--- a/gcc/tree-vect-patterns.c
+++ b/gcc/tree-vect-patterns.c
@@ -51,6 +51,7 @@ along with GCC; see the file COPYING3. If not see
#include "tree-ssanames.h"
#include "cfgloop.h"
#include "expr.h"
+#include "insn-codes.h"
#include "optabs.h"
#include "params.h"
#include "tree-data-ref.h"
diff --git a/gcc/tree-vect-slp.c b/gcc/tree-vect-slp.c
index de2e601..de62c6d 100644
--- a/gcc/tree-vect-slp.c
+++ b/gcc/tree-vect-slp.c
@@ -52,6 +52,7 @@ along with GCC; see the file COPYING3. If not see
#include "cfgloop.h"
#include "expr.h"
#include "recog.h" /* FIXME: for insn_data */
+#include "insn-codes.h"
#include "optabs.h"
#include "tree-vectorizer.h"
#include "langhooks.h"
diff --git a/gcc/tree-vect-stmts.c b/gcc/tree-vect-stmts.c
index 0255948..2a5f23c 100644
--- a/gcc/tree-vect-stmts.c
+++ b/gcc/tree-vect-stmts.c
@@ -60,6 +60,7 @@ along with GCC; see the file COPYING3. If not see
#include "tree-scalar-evolution.h"
#include "expr.h"
#include "recog.h" /* FIXME: for insn_data */
+#include "insn-codes.h"
#include "optabs.h"
#include "diagnostic-core.h"
#include "tree-vectorizer.h"
diff --git a/gcc/tree-vrp.c b/gcc/tree-vrp.c
index 2264242..4e4ebe0 100644
--- a/gcc/tree-vrp.c
+++ b/gcc/tree-vrp.c
@@ -69,6 +69,7 @@ along with GCC; see the file COPYING3. If not see
#include "tree-chrec.h"
#include "tree-ssa-threadupdate.h"
#include "expr.h"
+#include "insn-codes.h"
#include "optabs.h"
#include "tree-ssa-threadedge.h"
#include "wide-int.h"
diff --git a/gcc/value-prof.c b/gcc/value-prof.c
index a65ccb8..0e4ec8a 100644
--- a/gcc/value-prof.c
+++ b/gcc/value-prof.c
@@ -41,6 +41,7 @@ along with GCC; see the file COPYING3. If not see
#include "flags.h"
#include "insn-config.h"
#include "recog.h"
+#include "insn-codes.h"
#include "optabs.h"
#include "regs.h"
#include "tree-ssa-alias.h"