expr.h: Split out optab- and libfunc-related code to...
authorZack Weinberg <zackw@panix.com>
Mon, 13 Aug 2001 15:56:51 +0000 (15:56 +0000)
committerZack Weinberg <zack@gcc.gnu.org>
Mon, 13 Aug 2001 15:56:51 +0000 (15:56 +0000)
* expr.h: Split out optab- and libfunc-related code to...
* optabs.h, libfuncs.h: ... these new headers.

* Makefile.in (CONFIG_H, EXPR_H): Take out insn-codes.h.
(OPTABS_H): New.
(various .o rules): Add $(OPTABS_H) and/or libfuncs.h to
dependencies.
* mkconfig.sh: Don't include insn-codes.h from config.h.

* reload.h: Use #ifdef GCC_INSN_CODES_H to decide whether
enum insn_code is available.  Move reload_in_optab and
reload_out_optab array declarations to optabs.h.
* regmove.c (gen_add3_insn): Move to optabs.c, export from
there, prototype in expr.h.
* gencodes.c: Cleanup: zap global variables, don't use
printf where puts will do, don't bother defining MAX_INSN_CODE
which nothing uses, let CODE_FOR_nothing get its value implicitly.

* genemit.c, genopinit.c: Include optabs.h in generated file.
* genoutput.c: Include insn-codes.h in generated file.
* builtins.c, caller-save.c, combine.c, doloop.c, explow.c,
expmed.c, expr.c, function.c, ifcvt.c, loop.c, optabs.c, profile.c,
reload1.c, simplify-rtx.c, stmt.c, unroll.c, config/alpha/alpha.c,
config/arm/arm.c, config/c4x/c4x.c, config/clipper/clipper.c,
config/i386/i386.c, config/ia64/ia64.c, config/mn10300/mn10300.c,
config/pj/pj.c, config/sh/sh.c, config/sparc/sparc.c:
Include optabs.h.
* builtins.c, calls.c, dwarf2out.c, except.c, expr.c, function.c,
optabs.c, stmt.c, config/c4x/c4x.c, config/clipper/clipper.c,
config/m88k/m88k.c, config/sparc/sparc.c:
Include libfuncs.h.
* reload.c: Include expr.h and optabs.h before reload.h.
* config/alpha/alpha.c: Include tree.h before reload.h.
* config/pa/pa.c: Include expr.h, optabs.h, libfuncs.h,
and reload.h in that order.
* config/sparc/sparc.c: Include debug.h.
* recog.c: Include insn-codes.h.

cp:
* Make-lang.in (cp/except.o): Add libfuncs.h to dependencies.
* except.c: Include libfuncs.h.
java:
* Make-lang.in (java/decl.o): Update dependencies.
* decl.c: Include libfuncs.h, don't include toplev.h.

From-SVN: r44858

51 files changed:
gcc/ChangeLog
gcc/Makefile.in
gcc/builtins.c
gcc/caller-save.c
gcc/calls.c
gcc/combine.c
gcc/config/alpha/alpha.c
gcc/config/arm/arm.c
gcc/config/c4x/c4x.c
gcc/config/clipper/clipper.c
gcc/config/i386/i386.c
gcc/config/ia64/ia64.c
gcc/config/m88k/m88k.c
gcc/config/mn10300/mn10300.c
gcc/config/pa/pa.c
gcc/config/pj/pj.c
gcc/config/sh/sh.c
gcc/config/sparc/sparc.c
gcc/cp/ChangeLog
gcc/cp/Make-lang.in
gcc/cp/except.c
gcc/doloop.c
gcc/dwarf2out.c
gcc/except.c
gcc/explow.c
gcc/expmed.c
gcc/expr.c
gcc/expr.h
gcc/function.c
gcc/gencodes.c
gcc/genemit.c
gcc/genopinit.c
gcc/genoutput.c
gcc/ifcvt.c
gcc/java/ChangeLog
gcc/java/Make-lang.in
gcc/java/decl.c
gcc/libfuncs.h [new file with mode: 0644]
gcc/loop.c
gcc/mkconfig.sh
gcc/optabs.c
gcc/optabs.h [new file with mode: 0644]
gcc/profile.c
gcc/recog.c
gcc/regmove.c
gcc/reload.c
gcc/reload.h
gcc/reload1.c
gcc/simplify-rtx.c
gcc/stmt.c
gcc/unroll.c

index 61ef47e1e63191b63c7e54658b86d7c2d75a7604..e5bc41615aa448aa9f889f816c340e4fed8d5c0a 100644 (file)
@@ -1,3 +1,43 @@
+2001-08-13  Zack Weinberg  <zackw@panix.com>
+
+       * expr.h: Split out optab- and libfunc-related code to...
+       * optabs.h, libfuncs.h: ... these new headers.
+
+       * Makefile.in (CONFIG_H, EXPR_H): Take out insn-codes.h.
+       (OPTABS_H): New.
+       (various .o rules): Add $(OPTABS_H) and/or libfuncs.h to
+       dependencies.
+       * mkconfig.sh: Don't include insn-codes.h from config.h.
+
+       * reload.h: Use #ifdef GCC_INSN_CODES_H to decide whether
+       enum insn_code is available.  Move reload_in_optab and
+       reload_out_optab array declarations to optabs.h.
+       * regmove.c (gen_add3_insn): Move to optabs.c, export from
+       there, prototype in expr.h.
+       * gencodes.c: Cleanup: zap global variables, don't use
+       printf where puts will do, don't bother defining MAX_INSN_CODE
+       which nothing uses, let CODE_FOR_nothing get its value implicitly.
+
+       * genemit.c, genopinit.c: Include optabs.h in generated file.
+       * genoutput.c: Include insn-codes.h in generated file.
+       * builtins.c, caller-save.c, combine.c, doloop.c, explow.c,
+       expmed.c, expr.c, function.c, ifcvt.c, loop.c, optabs.c, profile.c, 
+       reload1.c, simplify-rtx.c, stmt.c, unroll.c, config/alpha/alpha.c, 
+       config/arm/arm.c, config/c4x/c4x.c, config/clipper/clipper.c,
+       config/i386/i386.c, config/ia64/ia64.c, config/mn10300/mn10300.c,
+       config/pj/pj.c, config/sh/sh.c, config/sparc/sparc.c:
+       Include optabs.h.
+       * builtins.c, calls.c, dwarf2out.c, except.c, expr.c, function.c, 
+       optabs.c, stmt.c, config/c4x/c4x.c, config/clipper/clipper.c,
+       config/m88k/m88k.c, config/sparc/sparc.c:
+       Include libfuncs.h.
+       * reload.c: Include expr.h and optabs.h before reload.h.
+       * config/alpha/alpha.c: Include tree.h before reload.h.
+       * config/pa/pa.c: Include expr.h, optabs.h, libfuncs.h,
+       and reload.h in that order.
+       * config/sparc/sparc.c: Include debug.h.
+       * recog.c: Include insn-codes.h.
+
 2001-08-13  Andreas Jaeger  <aj@suse.de>
 
        * config.gcc: Use t-slibgcc-elf to build shared libgcc_s on
index 8ff0dd34f21f42aeee2ccedb97a496efa74843a8..ba8ca46c0f02b9bb7a02ebd482fee1d460bab504 100644 (file)
@@ -547,7 +547,7 @@ all: all.indirect
 # several files generated by those generators.
 GCONFIG_H = config.h $(host_xm_file_list)
 HCONFIG_H = hconfig.h $(build_xm_file_list)
-CONFIG_H = $(GCONFIG_H) insn-constants.h insn-codes.h insn-flags.h
+CONFIG_H = $(GCONFIG_H) insn-constants.h insn-flags.h
 TCONFIG_H = tconfig.h $(xm_file_list)
 TARGET_H = target.h
 TARGET_DEF_H = target-def.h
@@ -561,7 +561,8 @@ TREE_H = tree.h real.h tree.def $(MACHMODE_H) tree-check.h version.h builtins.de
 BASIC_BLOCK_H = basic-block.h bitmap.h sbitmap.h varray.h
 DEMANGLE_H = $(srcdir)/../include/demangle.h
 RECOG_H = recog.h
-EXPR_H = expr.h insn-codes.h
+EXPR_H = expr.h
+OPTABS_H = optabs.h insn-codes.h
 REGS_H = regs.h varray.h $(MACHMODE_H)
 INTEGRATE_H = integrate.h varray.h
 LOOP_H = loop.h varray.h bitmap.h
@@ -1376,33 +1377,33 @@ varasm.o : varasm.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) $(RTL_H) flags.h \
    output.h c-pragma.h toplev.h xcoffout.h debug.h $(GGC_H) $(TM_P_H) \
    $(HASHTAB_H) $(TARGET_H)
 function.o : function.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) $(TREE_H) flags.h \
-   function.h $(EXPR_H) $(REGS_H) hard-reg-set.h \
+   function.h $(EXPR_H) $(OPTABS_H) libfuncs.h $(REGS_H) hard-reg-set.h \
    insn-config.h $(RECOG_H) output.h toplev.h except.h hash.h $(GGC_H) $(TM_P_H)
 stmt.o : stmt.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) $(TREE_H) flags.h function.h  \
-   insn-config.h hard-reg-set.h $(EXPR_H) except.h \
+   insn-config.h hard-reg-set.h $(EXPR_H) $(OPTABS_H) libfuncs.h except.h \
    $(LOOP_H) $(RECOG_H) toplev.h output.h varray.h $(GGC_H) $(TM_P_H)
 except.o : except.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) $(TREE_H) flags.h \
-   except.h function.h $(EXPR_H) integrate.h \
+   except.h function.h $(EXPR_H) libfuncs.h integrate.h \
    insn-config.h hard-reg-set.h $(BASIC_BLOCK_H) output.h \
    dwarf2asm.h dwarf2out.h toplev.h $(HASHTAB_H) intl.h $(GGC_H)
 expr.o : expr.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) $(TREE_H) flags.h function.h \
-   $(REGS_H) $(EXPR_H) insn-config.h $(RECOG_H) \
+   $(REGS_H) $(EXPR_H) $(OPTABS_H) libfuncs.h insn-config.h $(RECOG_H) \
    output.h typeclass.h hard-reg-set.h toplev.h hard-reg-set.h except.h \
    reload.h $(GGC_H) intl.h $(TM_P_H)
 builtins.o : builtins.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) $(TREE_H) flags.h \
-   $(TARGET_H) function.h $(REGS_H) $(EXPR_H) insn-config.h \
+   $(TARGET_H) function.h $(REGS_H) $(EXPR_H) $(OPTABS_H) insn-config.h \
    $(RECOG_H) output.h typeclass.h hard-reg-set.h toplev.h hard-reg-set.h \
-   except.h $(TM_P_H) $(PREDICT_H)
+   except.h $(TM_P_H) $(PREDICT_H) libfuncs.h
 calls.o : calls.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) $(TREE_H) flags.h $(EXPR_H) \
-   $(REGS_H) toplev.h output.h function.h $(TIMEVAR_H) $(TM_P_H)
+   libfuncs.h $(REGS_H) toplev.h output.h function.h $(TIMEVAR_H) $(TM_P_H)
 expmed.o : expmed.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) $(TREE_H) flags.h  \
-   insn-config.h $(EXPR_H) $(RECOG_H) real.h \
+   insn-config.h $(EXPR_H) $(OPTABS_H) $(RECOG_H) real.h \
    toplev.h $(TM_P_H)
 explow.o : explow.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) $(TREE_H) flags.h \
-   hard-reg-set.h insn-config.h $(EXPR_H) $(RECOG_H) \
+   hard-reg-set.h insn-config.h $(EXPR_H) $(OPTABS_H) $(RECOG_H) \
    toplev.h function.h $(TM_P_H)
 optabs.o : optabs.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) $(TREE_H) flags.h  \
-   insn-config.h $(EXPR_H) $(RECOG_H) reload.h \
+   insn-config.h $(EXPR_H) $(OPTABS_H) libfuncs.h $(RECOG_H) reload.h \
    toplev.h $(GGC_H) real.h $(TM_P_H) except.h
 dbxout.o : dbxout.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) $(RTL_H) flags.h \
     $(REGS_H) debug.h $(TM_P_H) $(TARGET_H) \
@@ -1417,7 +1418,7 @@ dwarfout.o : dwarfout.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) $(RTL_H) dwarf.h \
    debug.h
 dwarf2out.o : dwarf2out.c $(CONFIG_H) $(SYSTEM_H) $(TREE_H) $(RTL_H) dwarf2.h \
    debug.h flags.h insn-config.h reload.h output.h diagnostic.h \
-   hard-reg-set.h $(REGS_H) $(EXPR_H) toplev.h dwarf2out.h varray.h \
+   hard-reg-set.h $(REGS_H) $(EXPR_H) libfuncs.h toplev.h dwarf2out.h varray.h \
    $(GGC_H) except.h dwarf2asm.h $(TM_P_H)
 dwarf2asm.o : dwarf2asm.c $(CONFIG_H) $(SYSTEM_H) flags.h $(RTL_H) $(TREE_H) \
    output.h dwarf2asm.h $(TM_P_H)
@@ -1438,7 +1439,7 @@ jump.o : jump.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) flags.h hard-reg-set.h $(REGS_H
 
 simplify-rtx.o : simplify-rtx.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) $(REGS_H) \
    hard-reg-set.h flags.h real.h insn-config.h $(RECOG_H) $(EXPR_H) toplev.h \
-   output.h function.h $(GGC_H) $(OBSTACK_H) $(TM_P_H)
+   $(OPTABS_H) output.h function.h $(GGC_H) $(OBSTACK_H) $(TM_P_H)
 cselib.o : cselib.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) $(REGS_H) \
    hard-reg-set.h flags.h real.h insn-config.h $(RECOG_H) $(EXPR_H) toplev.h \
    output.h function.h cselib.h $(GGC_H) $(OBSTACK_H) $(TM_P_H)
@@ -1469,23 +1470,24 @@ df.o : df.c $(CONFIG_H) system.h $(RTL_H) insn-config.h $(RECOG_H) \
 conflict.o : conflict.c $(CONFIG_H) $(SYSTEM_H) $(OBSTACK_H) $(HASHTAB_H) \
    $(RTL_H) hard-reg-set.h $(BASIC_BLOCK_H)
 profile.o : profile.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) $(TREE_H) flags.h \
-   insn-config.h output.h $(REGS_H) $(EXPR_H) function.h \
+   insn-config.h output.h $(REGS_H) $(EXPR_H) $(OPTABS_H) function.h \
    gcov-io.h toplev.h $(GGC_H) hard-reg-set.h $(BASIC_BLOCK_H) $(TARGET_H)
-loop.o : loop.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) flags.h $(LOOP_H) insn-config.h \
-   $(REGS_H) hard-reg-set.h $(RECOG_H) $(EXPR_H) real.h $(PREDICT_H) \
-   $(BASIC_BLOCK_H) function.h toplev.h varray.h except.h cselib.h $(TM_P_H)
+loop.o : loop.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) flags.h $(LOOP_H) \
+   insn-config.h $(REGS_H) hard-reg-set.h $(RECOG_H) $(EXPR_H) \
+   $(OPTABS_H) real.h $(PREDICT_H) $(BASIC_BLOCK_H) function.h \
+   toplev.h varray.h except.h cselib.h $(TM_P_H)
 doloop.o : doloop.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) flags.h $(LOOP_H) \
-   $(EXPR_H) hard-reg-set.h $(BASIC_BLOCK_H) $(TM_P_H) toplev.h
+   $(EXPR_H) $(OPTABS_H) hard-reg-set.h $(BASIC_BLOCK_H) $(TM_P_H) toplev.h
 unroll.o : unroll.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) insn-config.h function.h \
    $(INTEGRATE_H) $(REGS_H) $(RECOG_H) flags.h $(EXPR_H) $(LOOP_H) toplev.h \
-   hard-reg-set.h varray.h $(BASIC_BLOCK_H) $(TM_P_H) $(PREDICT_H)
+   hard-reg-set.h varray.h $(BASIC_BLOCK_H) $(TM_P_H) $(PREDICT_H) $(OPTABS_H)
 flow.o : flow.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) $(TREE_H) flags.h insn-config.h \
    $(BASIC_BLOCK_H) $(REGS_H) hard-reg-set.h output.h toplev.h $(RECOG_H) \
    function.h except.h $(EXPR_H) ssa.h $(GGC_H) $(TM_P_H)
 dominance.o : dominance.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) hard-reg-set.h \
    $(BASIC_BLOCK_H)
 combine.o : combine.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) flags.h function.h \
-   insn-config.h $(INSN_ATTR_H) $(REGS_H) $(EXPR_H) \
+   insn-config.h $(INSN_ATTR_H) $(OPTABS_H) $(REGS_H) $(EXPR_H) \
    $(BASIC_BLOCK_H) $(RECOG_H) real.h hard-reg-set.h toplev.h $(TM_P_H)
 regclass.o : regclass.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) hard-reg-set.h flags.h \
    $(BASIC_BLOCK_H) $(REGS_H) insn-config.h $(RECOG_H) reload.h real.h \
@@ -1501,16 +1503,16 @@ global.o : global.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) flags.h reload.h function.h
    $(TM_P_H)
 varray.o : varray.c $(CONFIG_H) $(SYSTEM_H) varray.h $(RTL_H) $(TREE_H) bitmap.h \
    errors.h
-reload.o : reload.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) flags.h output.h $(EXPR_H) \
-   reload.h $(RECOG_H) hard-reg-set.h insn-config.h $(REGS_H) \
-   function.h real.h toplev.h $(TM_P_H)
-reload1.o : reload1.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) real.h flags.h $(EXPR_H) \
-   reload.h $(REGS_H) hard-reg-set.h insn-config.h \
+reload.o : reload.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) flags.h output.h \
+   $(EXPR_H) $(OPTABS_H) reload.h $(RECOG_H) hard-reg-set.h insn-config.h \
+   $(REGS_H) function.h real.h toplev.h $(TM_P_H)
+reload1.o : reload1.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) real.h flags.h \
+   $(EXPR_H) $(OPTABS_H) reload.h $(REGS_H) hard-reg-set.h insn-config.h \
    $(BASIC_BLOCK_H) $(RECOG_H) output.h function.h toplev.h cselib.h $(TM_P_H) \
    except.h
 caller-save.o : caller-save.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) flags.h \
    $(REGS_H) hard-reg-set.h insn-config.h $(BASIC_BLOCK_H) function.h \
-   $(RECOG_H) reload.h $(EXPR_H) toplev.h $(TM_P_H)
+   $(RECOG_H) reload.h $(EXPR_H) $(OPTABS_H) toplev.h $(TM_P_H)
 reorg.o : reorg.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) conditions.h hard-reg-set.h \
    $(BASIC_BLOCK_H) $(REGS_H) insn-config.h $(INSN_ATTR_H) \
    $(RECOG_H) function.h flags.h output.h $(EXPR_H) toplev.h $(PARAMS_H) $(TM_P_H)
@@ -1540,7 +1542,7 @@ final.o : final.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) $(TREE_H) flags.h intl.h \
    toplev.h reload.h dwarf2out.h $(BASIC_BLOCK_H) $(TM_P_H) $(TARGET_H)
 recog.o : recog.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) function.h $(BASIC_BLOCK_H) \
    $(REGS_H) $(RECOG_H) $(EXPR_H) hard-reg-set.h flags.h insn-config.h \
-   $(INSN_ATTR_H) real.h toplev.h output.h reload.h $(TM_P_H)
+   $(INSN_ATTR_H) insn-codes.h real.h toplev.h output.h reload.h $(TM_P_H)
 reg-stack.o : reg-stack.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) $(TREE_H) $(RECOG_H) \
    $(REGS_H) hard-reg-set.h flags.h insn-config.h toplev.h reload.h \
    varray.h function.h $(TM_P_H)
@@ -1557,15 +1559,15 @@ regrename.o : regrename.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) insn-config.h \
    resource.h $(OBSTACK_H) flags.h $(TM_P_H)
 ifcvt.o : ifcvt.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) $(REGS_H) toplev.h \
    flags.h insn-config.h function.h $(RECOG_H) $(BASIC_BLOCK_H) $(EXPR_H) \
-   output.h $(TM_P_H)
+   $(OPTABS_H) output.h $(TM_P_H)
 dependence.o : dependence.c $(CONFIG_H) $(SYSTEM_H) $(RTL_H) $(TREE_H) \
    $(C_COMMON_H) flags.h varray.h $(EXPR_H)
 params.o : params.c $(CONFIG_H) $(SYSTEM_H) $(PARAMS_H) toplev.h
 
 $(out_object_file): $(out_file) $(CONFIG_H) $(TREE_H) $(GGC_H) \
    $(RTL_H) $(REGS_H) hard-reg-set.h real.h insn-config.h conditions.h \
-   output.h $(INSN_ATTR_H) $(SYSTEM_H) toplev.h $(TARGET_H) \
-   $(TARGET_DEF_H) function.h sched-int.h $(TM_P_H)
+   output.h $(INSN_ATTR_H) $(SYSTEM_H) toplev.h $(TARGET_H) libfuncs.h \
+   $(TARGET_DEF_H) function.h sched-int.h $(TM_P_H) $(EXPR_H) $(OPTABS_H)
        $(CC) -c $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) \
                $(out_file) $(OUTPUT_OPTION)
 
@@ -1635,7 +1637,7 @@ s-constants : $(md_file) genconstants$(build_exeext) $(srcdir)/move-if-change
        $(STAMP) s-constants
 
 insn-emit.o : insn-emit.c $(CONFIG_H) $(RTL_H) $(EXPR_H) real.h output.h \
-  insn-config.h $(SYSTEM_H) reload.h $(RECOG_H) toplev.h \
+  insn-config.h $(OPTABS_H) $(SYSTEM_H) reload.h $(RECOG_H) toplev.h \
   function.h flags.h hard-reg-set.h resource.h $(TM_P_H)
        $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -c insn-emit.c
 
@@ -1657,7 +1659,7 @@ s-recog : $(md_file) genrecog$(build_exeext) $(srcdir)/move-if-change
        $(STAMP) s-recog
 
 insn-opinit.o : insn-opinit.c $(CONFIG_H) $(RTL_H) \
-  insn-config.h flags.h $(RECOG_H) $(EXPR_H) reload.h $(SYSTEM_H)
+  insn-config.h flags.h $(RECOG_H) $(EXPR_H) $(OPTABS_H) reload.h $(SYSTEM_H)
        $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) $(INCLUDES) -c insn-opinit.c
 
 insn-opinit.c: s-opinit ; @true
index 08d2bb75e46b6635acb7539b523fd2956612bc45..c427f57fa2d545d302a3e0014831df93aeec529f 100644 (file)
@@ -32,6 +32,8 @@ Boston, MA 02111-1307, USA.  */
 #include "function.h"
 #include "insn-config.h"
 #include "expr.h"
+#include "optabs.h"
+#include "libfuncs.h"
 #include "recog.h"
 #include "output.h"
 #include "typeclass.h"
index 0d36f30c31a1af7134a8c09e1068ec7ea06cd4cc..48153d07594f2d70e7ae7ab840092153335bd195 100644 (file)
@@ -31,6 +31,7 @@ Boston, MA 02111-1307, USA.  */
 #include "reload.h"
 #include "function.h"
 #include "expr.h"
+#include "optabs.h"
 #include "toplev.h"
 #include "tm_p.h"
 
index 60178d7250658b8ef13e2eeb20456d0d8722346f..8a2033316f48f60f6d01dbfcdab8a8fd956152d0 100644 (file)
@@ -25,6 +25,7 @@ Boston, MA 02111-1307, USA.  */
 #include "tree.h"
 #include "flags.h"
 #include "expr.h"
+#include "libfuncs.h"
 #include "function.h"
 #include "regs.h"
 #include "toplev.h"
index a1ae2d035809137d3f0a15accfb05b01fae6a629..b6ea18b0abd693fbd4fb67cba30614322378ed96 100644 (file)
@@ -86,6 +86,7 @@ Boston, MA 02111-1307, USA.  */
 #include "function.h"
 /* Include expr.h after insn-config.h so we get HAVE_conditional_move.  */
 #include "expr.h"
+#include "optabs.h"
 #include "insn-attr.h"
 #include "recog.h"
 #include "real.h"
index ef65d72b6debfe50189d31199996810cae72defa..aa2f979a1b3a3ec87eaa840a646e91417608bff9 100644 (file)
@@ -24,6 +24,7 @@ Boston, MA 02111-1307, USA.  */
 #include "config.h"
 #include "system.h"
 #include "rtl.h"
+#include "tree.h"
 #include "regs.h"
 #include "hard-reg-set.h"
 #include "real.h"
@@ -33,9 +34,9 @@ Boston, MA 02111-1307, USA.  */
 #include "insn-attr.h"
 #include "flags.h"
 #include "recog.h"
-#include "reload.h"
-#include "tree.h"
 #include "expr.h"
+#include "optabs.h"
+#include "reload.h"
 #include "obstack.h"
 #include "except.h"
 #include "function.h"
index b79a92bae9051a0e0f3d3fdb1f3b6cbdeabe6178..265a79b034a40931132e8220bbf1c11b3eb65672 100644 (file)
@@ -38,6 +38,7 @@ Boston, MA 02111-1307, USA.  */
 #include "reload.h"
 #include "function.h"
 #include "expr.h"
+#include "optabs.h"
 #include "toplev.h"
 #include "recog.h"
 #include "ggc.h"
index add05c7f2ca4b9e8fecf9c4e15a75f7620a5fc25..f6c987b36b5e761a0a266b8c1ac713c085477450 100644 (file)
@@ -37,6 +37,8 @@ Boston, MA 02111-1307, USA.  */
 #include "output.h"
 #include "function.h"
 #include "expr.h"
+#include "optabs.h"
+#include "libfuncs.h"
 #include "flags.h"
 #include "loop.h"
 #include "recog.h"
index d92030d6524ac829d51031a6b1e2a026b1a0b6cf..8104b859fceb795eb09dfd30c19b213d0b807774 100644 (file)
@@ -32,6 +32,8 @@ Boston, MA 02111-1307, USA.  */
 #include "insn-attr.h"
 #include "tree.h"
 #include "expr.h"
+#include "optabs.h"
+#include "libfuncs.h"
 #include "c-tree.h"
 #include "function.h"
 #include "flags.h"
index a557d05def8d528caadabf27d5683d1886e70410..b182de41f805e14959e51a51aacd6d33d775a4ec 100644 (file)
@@ -36,6 +36,7 @@ Boston, MA 02111-1307, USA.  */
 #include "function.h"
 #include "recog.h"
 #include "expr.h"
+#include "optabs.h"
 #include "toplev.h"
 #include "basic-block.h"
 #include "ggc.h"
index ce17c91dc3f0c12db094f2fc38a946e2f1d67054..d7474acffb07c0e41008c08a4e78e2945942a882 100644 (file)
@@ -35,6 +35,7 @@ Boston, MA 02111-1307, USA.  */
 #include "flags.h"
 #include "recog.h"
 #include "expr.h"
+#include "optabs.h"
 #include "obstack.h"
 #include "except.h"
 #include "function.h"
index b10eab003dcb05f9320d3dde78df236966c12786..c1b9a6b7c3499dd3b9609daf4fc46015240270fb 100644 (file)
@@ -34,6 +34,7 @@ Boston, MA 02111-1307, USA.  */
 #include "tree.h"
 #include "function.h"
 #include "expr.h"
+#include "libfuncs.h"
 #include "c-tree.h"
 #include "flags.h"
 #include "recog.h"
index 7ea66d8a9b373ef3d21ab5adbae5928ae852a943..66c8e8d3c8a89dce5c891565e3f8cdfcd4f71000 100644 (file)
@@ -34,6 +34,7 @@ Boston, MA 02111-1307, USA.  */
 #include "flags.h"
 #include "recog.h"
 #include "expr.h"
+#include "optabs.h"
 #include "function.h"
 #include "obstack.h"
 #include "toplev.h"
index 8d9a89124ced5fbba72f42d0fda439d0e8be371c..d4fe968008e2cd78a9cbb854bec5052fc76b3501 100644 (file)
@@ -32,8 +32,10 @@ Boston, MA 02111-1307, USA.  */
 #include "insn-attr.h"
 #include "flags.h"
 #include "tree.h"
-#include "reload.h"
 #include "expr.h"
+#include "optabs.h"
+#include "libfuncs.h"
+#include "reload.h"
 #include "c-tree.h"
 #include "integrate.h"
 #include "function.h"
index b867179a3fe3c6da7cd84280c0b4c9ad816541f2..870960b0f9b2296828e1637834a6d0d2843094e5 100644 (file)
@@ -95,6 +95,7 @@ Boston, MA 02111-1307, USA.  */
 #include "function.h"
 #include "recog.h"
 #include "expr.h"
+#include "optabs.h"
 #include "toplev.h"
 #include "basic-block.h"
 #include "ggc.h"
index c67ce819f0380ce2133855b7e8775113acc6ce20..d643d9288b61bc82e0568e767df2943d67503949 100644 (file)
@@ -28,6 +28,7 @@ Boston, MA 02111-1307, USA.  */
 #include "tree.h"
 #include "flags.h"
 #include "expr.h"
+#include "optabs.h"
 #include "function.h"
 #include "regs.h"
 #include "hard-reg-set.h"
index 2693f73cacbb2f165338c8bb3ccda80c27ba5b1c..d47b985227ae044852bdb386fc2d36effca7a160 100644 (file)
@@ -36,10 +36,13 @@ Boston, MA 02111-1307, USA.  */
 #include "flags.h"
 #include "function.h"
 #include "expr.h"
+#include "optabs.h"
+#include "libfuncs.h"
 #include "recog.h"
 #include "toplev.h"
 #include "ggc.h"
 #include "tm_p.h"
+#include "debug.h"
 #include "target.h"
 #include "target-def.h"
 
index e8d045f5ef2846d2b00235f22e6e5e59ad47f8b6..b5f90a07ec7ecc4960066b64d109b0870e21501b 100644 (file)
@@ -1,3 +1,8 @@
+2001-08-13  Zack Weinberg  <zackw@panix.com>
+
+       * Make-lang.in (cp/except.o): Add libfuncs.h to dependencies.
+       * except.c: Include libfuncs.h.
+
 2001-08-11  Gabriel Dos Reis  <gdr@merlin.codesourcery.com>
 
        * decl.c (grokdeclarator): Clarify diagnostic message.
index 50190d3ac061b5bf828b0bf30828b63b25de1a4b..b4794145df081a3dc6e5e7ddbbc76b1d968d1466 100644 (file)
@@ -264,7 +264,7 @@ cp/tree.o: cp/tree.c $(CXX_TREE_H) flags.h toplev.h $(GGC_H) $(RTL_H) \
 cp/ptree.o: cp/ptree.c $(CXX_TREE_H) $(SYSTEM_H)
 cp/rtti.o: cp/rtti.c $(CXX_TREE_H) flags.h toplev.h
 cp/except.o: cp/except.c $(CXX_TREE_H) flags.h $(RTL_H) except.h toplev.h \
-  cp/cfns.h $(EXPR_H) cp/decl.h $(OBSTACK_H)
+  cp/cfns.h $(EXPR_H) libfuncs.h cp/decl.h $(OBSTACK_H)
 cp/expr.o: cp/expr.c $(CXX_TREE_H) $(RTL_H) flags.h $(EXPR_H) toplev.h \
   except.h $(TM_P_H)
 cp/xref.o: cp/xref.c $(CXX_TREE_H) input.h toplev.h
index fef5b53ec62f3dc2cd768b045c2764687d39a4af..003c3e6e595679e011dcbecb25879d0cffcce967 100644 (file)
@@ -28,6 +28,7 @@ Boston, MA 02111-1307, USA.  */
 #include "tree.h"
 #include "rtl.h"
 #include "expr.h"
+#include "libfuncs.h"
 #include "cp-tree.h"
 #include "flags.h"
 #include "obstack.h"
index 1cd619762a61344e13b22d7960be2eabf9b67bb9..6ccc53941a9dbe7635b2ece4734344a17afcb64c 100644 (file)
@@ -24,6 +24,7 @@ Boston, MA 02111-1307, USA.  */
 #include "rtl.h"
 #include "flags.h"
 #include "expr.h"
+#include "optabs.h"
 #include "loop.h"
 #include "hard-reg-set.h"
 #include "basic-block.h"
index 740df260ca8562ed3ca041de903c3b425ae07314..711b1e3f018b4084170b19a4ee431c50d8af28b6 100644 (file)
@@ -47,6 +47,7 @@ Boston, MA 02111-1307, USA.  */
 #include "function.h"
 #include "output.h"
 #include "expr.h"
+#include "libfuncs.h"
 #include "except.h"
 #include "dwarf2.h"
 #include "dwarf2out.h"
index 3058e10f8f11fbdec7d592a07341449188ba95ab..b480f5f076d23c8ae1b5994b2318ea909e757614 100644 (file)
@@ -54,6 +54,7 @@ Boston, MA 02111-1307, USA.  */
 #include "flags.h"
 #include "function.h"
 #include "expr.h"
+#include "libfuncs.h"
 #include "insn-config.h"
 #include "except.h"
 #include "integrate.h"
index cf1faf86fa6ee034be7a44011ab63a3cdbeda123..0900a3f61dd563190528d784423be5905ba64c27 100644 (file)
@@ -29,6 +29,7 @@ Boston, MA 02111-1307, USA.  */
 #include "flags.h"
 #include "function.h"
 #include "expr.h"
+#include "optabs.h"
 #include "hard-reg-set.h"
 #include "insn-config.h"
 #include "recog.h"
index 68efa79a85141d76a7a17ad5443014595ceef91f..830ef9e3ac3316117e536da8b3937eead9f37c1a 100644 (file)
@@ -30,6 +30,7 @@ Boston, MA 02111-1307, USA.  */
 #include "flags.h"
 #include "insn-config.h"
 #include "expr.h"
+#include "optabs.h"
 #include "real.h"
 #include "recog.h"
 
index 5920852df14473f8b939bc8cdfcd8ff973f4c8ed..27ad3f62953012cdce326ca026d76665e9250469 100644 (file)
@@ -33,6 +33,8 @@ Boston, MA 02111-1307, USA.  */
 #include "insn-config.h"
 /* Include expr.h after insn-config.h so we get HAVE_conditional_move.  */
 #include "expr.h"
+#include "optabs.h"
+#include "libfuncs.h"
 #include "recog.h"
 #include "reload.h"
 #include "output.h"
index 07b1a81101721bf6b91e9979ea8ddab44c5a1604..3a651b0eefb238dd84eec8aa68fe95b435e2d267 100644 (file)
@@ -253,549 +253,22 @@ enum direction {none, upward, downward};  /* Value has this type.  */
 #define STACK_CHECK_MAX_VAR_SIZE (STACK_CHECK_MAX_FRAME_SIZE / 100)
 #endif
 \f
-/* Optabs are tables saying how to generate insn bodies
-   for various machine modes and numbers of operands.
-   Each optab applies to one operation.
-   For example, add_optab applies to addition.
-
-   The insn_code slot is the enum insn_code that says how to
-   generate an insn for this operation on a particular machine mode.
-   It is CODE_FOR_nothing if there is no such insn on the target machine.
-
-   The `lib_call' slot is the name of the library function that
-   can be used to perform the operation.
-
-   A few optabs, such as move_optab and cmp_optab, are used
-   by special code.  */
-
-typedef struct optab
-{
-  enum rtx_code code;
-  struct {
-    enum insn_code insn_code;
-    rtx libfunc;
-  } handlers [NUM_MACHINE_MODES];
-} * optab;
-
-/* Given an enum insn_code, access the function to construct
-   the body of that kind of insn.  */
-#define GEN_FCN(CODE) (*insn_data[(int) (CODE)].genfun)
-
-/* Enumeration of valid indexes into optab_table.  */
-enum optab_index
-{
-  OTI_add,
-  OTI_addv,
-  OTI_sub,
-  OTI_subv,
-
-  /* Signed and fp multiply */
-  OTI_smul,
-  OTI_smulv,
-  /* Signed multiply, return high word */
-  OTI_smul_highpart,
-  OTI_umul_highpart,
-  /* Signed multiply with result one machine mode wider than args */
-  OTI_smul_widen,
-  OTI_umul_widen,
-
-  /* Signed divide */
-  OTI_sdiv,
-  OTI_sdivv,
-  /* Signed divide-and-remainder in one */
-  OTI_sdivmod,
-  OTI_udiv,
-  OTI_udivmod,
-  /* Signed remainder */
-  OTI_smod,
-  OTI_umod,
-  /* Optab for floating divide. */
-  OTI_flodiv,
-  /* Convert float to integer in float fmt */
-  OTI_ftrunc,
-
-  /* Logical and */
-  OTI_and,
-  /* Logical or */
-  OTI_ior,
-  /* Logical xor */
-  OTI_xor,
-
-  /* Arithmetic shift left */
-  OTI_ashl,
-  /* Logical shift right */
-  OTI_lshr,  
-  /* Arithmetic shift right */
-  OTI_ashr,
-  /* Rotate left */
-  OTI_rotl,
-  /* Rotate right */
-  OTI_rotr,
-  /* Signed and floating-point minimum value */
-  OTI_smin,
-  /* Signed and floating-point maximum value */
-  OTI_smax,
-  /* Unsigned minimum value */
-  OTI_umin,
-  /* Unsigned maximum value */
-  OTI_umax,
-
-  /* Move instruction.  */
-  OTI_mov,
-  /* Move, preserving high part of register.  */
-  OTI_movstrict,
-
-  /* Unary operations */
-  /* Negation */
-  OTI_neg,
-  OTI_negv,
-  /* Abs value */
-  OTI_abs,
-  OTI_absv,
-  /* Bitwise not */
-  OTI_one_cmpl,
-  /* Find first bit set */
-  OTI_ffs,
-  /* Square root */
-  OTI_sqrt,
-  /* Sine */
-  OTI_sin,
-  /* Cosine */
-  OTI_cos,
-
-  /* Compare insn; two operands.  */
-  OTI_cmp,
-  /* Used only for libcalls for unsigned comparisons.  */
-  OTI_ucmp,
-  /* tst insn; compare one operand against 0 */
-  OTI_tst,
-
-  /* String length */
-  OTI_strlen,
-
-  /* Combined compare & jump/store flags/move operations.  */
-  OTI_cbranch,
-  OTI_cmov,
-  OTI_cstore,
-    
-  /* Push instruction.  */
-  OTI_push,
-
-  OTI_MAX
-};
-
-extern optab optab_table[OTI_MAX];
-
-#define add_optab (optab_table[OTI_add])
-#define sub_optab (optab_table[OTI_sub])
-#define smul_optab (optab_table[OTI_smul])
-#define addv_optab (optab_table[OTI_addv])
-#define subv_optab (optab_table[OTI_subv])
-#define smul_highpart_optab (optab_table[OTI_smul_highpart])
-#define umul_highpart_optab (optab_table[OTI_umul_highpart])
-#define smul_widen_optab (optab_table[OTI_smul_widen])
-#define umul_widen_optab (optab_table[OTI_umul_widen])
-#define sdiv_optab (optab_table[OTI_sdiv])
-#define smulv_optab (optab_table[OTI_smulv])
-#define sdivv_optab (optab_table[OTI_sdivv])
-#define sdivmod_optab (optab_table[OTI_sdivmod])
-#define udiv_optab (optab_table[OTI_udiv])
-#define udivmod_optab (optab_table[OTI_udivmod])
-#define smod_optab (optab_table[OTI_smod])
-#define umod_optab (optab_table[OTI_umod])
-#define flodiv_optab (optab_table[OTI_flodiv])
-#define ftrunc_optab (optab_table[OTI_ftrunc])
-#define and_optab (optab_table[OTI_and])
-#define ior_optab (optab_table[OTI_ior])
-#define xor_optab (optab_table[OTI_xor])
-#define ashl_optab (optab_table[OTI_ashl])
-#define lshr_optab (optab_table[OTI_lshr])
-#define ashr_optab (optab_table[OTI_ashr])
-#define rotl_optab (optab_table[OTI_rotl])
-#define rotr_optab (optab_table[OTI_rotr])
-#define smin_optab (optab_table[OTI_smin])
-#define smax_optab (optab_table[OTI_smax])
-#define umin_optab (optab_table[OTI_umin])
-#define umax_optab (optab_table[OTI_umax])
-
-#define mov_optab (optab_table[OTI_mov])
-#define movstrict_optab (optab_table[OTI_movstrict])
-
-#define neg_optab (optab_table[OTI_neg])
-#define negv_optab (optab_table[OTI_negv])
-#define abs_optab (optab_table[OTI_abs])
-#define absv_optab (optab_table[OTI_absv])
-#define one_cmpl_optab (optab_table[OTI_one_cmpl])
-#define ffs_optab (optab_table[OTI_ffs])
-#define sqrt_optab (optab_table[OTI_sqrt])
-#define sin_optab (optab_table[OTI_sin])
-#define cos_optab (optab_table[OTI_cos])
-
-#define cmp_optab (optab_table[OTI_cmp])
-#define ucmp_optab (optab_table[OTI_ucmp])
-#define tst_optab (optab_table[OTI_tst])
-
-#define strlen_optab (optab_table[OTI_strlen])
-
-#define cbranch_optab (optab_table[OTI_cbranch])
-#define cmov_optab (optab_table[OTI_cmov])
-#define cstore_optab (optab_table[OTI_cstore])
-#define push_optab (optab_table[OTI_push])
-
-/* Tables of patterns for extending one integer mode to another.  */
-extern enum insn_code extendtab[MAX_MACHINE_MODE][MAX_MACHINE_MODE][2];
-
-/* Tables of patterns for converting between fixed and floating point. */
-extern enum insn_code fixtab[NUM_MACHINE_MODES][NUM_MACHINE_MODES][2];
-extern enum insn_code fixtrunctab[NUM_MACHINE_MODES][NUM_MACHINE_MODES][2];
-extern enum insn_code floattab[NUM_MACHINE_MODES][NUM_MACHINE_MODES][2];
-
-/* Contains the optab used for each rtx code.  */
-extern optab code_to_optab[NUM_RTX_CODE + 1];
-
-/* Passed to expand_binop and expand_unop 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
-};
-
-/* Enumeration of indexes into libfunc_table.  */
-enum libfunc_index
-{
-  LTI_extendsfdf2,
-  LTI_extendsfxf2,
-  LTI_extendsftf2,
-  LTI_extenddfxf2,
-  LTI_extenddftf2,
-
-  LTI_truncdfsf2,
-  LTI_truncxfsf2,
-  LTI_trunctfsf2,
-  LTI_truncxfdf2,
-  LTI_trunctfdf2,
-
-  LTI_memcpy,
-  LTI_memmove,
-  LTI_bcopy,
-  LTI_memcmp,
-  LTI_bcmp,
-  LTI_memset,
-  LTI_bzero,
-
-  LTI_unwind_resume,
-  LTI_eh_personality,
-  LTI_setjmp,
-  LTI_longjmp,
-  LTI_unwind_sjlj_register,
-  LTI_unwind_sjlj_unregister,
-
-  LTI_eqhf2,
-  LTI_nehf2,
-  LTI_gthf2,
-  LTI_gehf2,
-  LTI_lthf2,
-  LTI_lehf2,
-  LTI_unordhf2,
-
-  LTI_eqsf2,
-  LTI_nesf2,
-  LTI_gtsf2,
-  LTI_gesf2,
-  LTI_ltsf2,
-  LTI_lesf2,
-  LTI_unordsf2,
-
-  LTI_eqdf2,
-  LTI_nedf2,
-  LTI_gtdf2,
-  LTI_gedf2,
-  LTI_ltdf2,
-  LTI_ledf2,
-  LTI_unorddf2,
-
-  LTI_eqxf2,
-  LTI_nexf2,
-  LTI_gtxf2,
-  LTI_gexf2,
-  LTI_ltxf2,
-  LTI_lexf2,
-  LTI_unordxf2,
-
-  LTI_eqtf2,
-  LTI_netf2,
-  LTI_gttf2,
-  LTI_getf2,
-  LTI_lttf2,
-  LTI_letf2,
-  LTI_unordtf2,
-
-  LTI_floatsisf,
-  LTI_floatdisf,
-  LTI_floattisf,
-
-  LTI_floatsidf,
-  LTI_floatdidf,
-  LTI_floattidf,
-
-  LTI_floatsixf,
-  LTI_floatdixf,
-  LTI_floattixf,
-
-  LTI_floatsitf,
-  LTI_floatditf,
-  LTI_floattitf,
-
-  LTI_fixsfsi,
-  LTI_fixsfdi,
-  LTI_fixsfti,
-
-  LTI_fixdfsi,
-  LTI_fixdfdi,
-  LTI_fixdfti,
-
-  LTI_fixxfsi,
-  LTI_fixxfdi,
-  LTI_fixxfti,
-
-  LTI_fixtfsi,
-  LTI_fixtfdi,
-  LTI_fixtfti,
-
-  LTI_fixunssfsi,
-  LTI_fixunssfdi,
-  LTI_fixunssfti,
-
-  LTI_fixunsdfsi,
-  LTI_fixunsdfdi,
-  LTI_fixunsdfti,
-
-  LTI_fixunsxfsi,
-  LTI_fixunsxfdi,
-  LTI_fixunsxfti,
-
-  LTI_fixunstfsi,
-  LTI_fixunstfdi,
-  LTI_fixunstfti,
-
-  LTI_chkr_check_addr,
-  LTI_chkr_set_right,
-  LTI_chkr_copy_bitmap,
-  LTI_chkr_check_exec,
-  LTI_chkr_check_str,
-
-  LTI_profile_function_entry,
-  LTI_profile_function_exit,
-
-  LTI_MAX
-};
-
-/* SYMBOL_REF rtx's for the library functions that are called
-   implicitly and not via optabs.  */
-extern rtx libfunc_table[LTI_MAX];
-
-/* Accessor macros for libfunc_table.  */
-#define extendsfdf2_libfunc    (libfunc_table[LTI_extendsfdf2])
-#define extendsfxf2_libfunc    (libfunc_table[LTI_extendsfxf2])
-#define extendsftf2_libfunc    (libfunc_table[LTI_extendsftf2])
-#define extenddfxf2_libfunc    (libfunc_table[LTI_extenddfxf2])
-#define extenddftf2_libfunc    (libfunc_table[LTI_extenddftf2])
-
-#define truncdfsf2_libfunc     (libfunc_table[LTI_truncdfsf2])
-#define truncxfsf2_libfunc     (libfunc_table[LTI_truncxfsf2])
-#define trunctfsf2_libfunc     (libfunc_table[LTI_trunctfsf2])
-#define truncxfdf2_libfunc     (libfunc_table[LTI_truncxfdf2])
-#define trunctfdf2_libfunc     (libfunc_table[LTI_trunctfdf2])
-
-#define memcpy_libfunc (libfunc_table[LTI_memcpy])
-#define memmove_libfunc        (libfunc_table[LTI_memmove])
-#define bcopy_libfunc  (libfunc_table[LTI_bcopy])
-#define memcmp_libfunc (libfunc_table[LTI_memcmp])
-#define bcmp_libfunc   (libfunc_table[LTI_bcmp])
-#define memset_libfunc (libfunc_table[LTI_memset])
-#define bzero_libfunc  (libfunc_table[LTI_bzero])
-
-#define unwind_resume_libfunc  (libfunc_table[LTI_unwind_resume])
-#define eh_personality_libfunc (libfunc_table[LTI_eh_personality])
-#define setjmp_libfunc (libfunc_table[LTI_setjmp])
-#define longjmp_libfunc        (libfunc_table[LTI_longjmp])
-#define unwind_sjlj_register_libfunc (libfunc_table[LTI_unwind_sjlj_register])
-#define unwind_sjlj_unregister_libfunc \
-  (libfunc_table[LTI_unwind_sjlj_unregister])
-
-#define eqhf2_libfunc  (libfunc_table[LTI_eqhf2])
-#define nehf2_libfunc  (libfunc_table[LTI_nehf2])
-#define gthf2_libfunc  (libfunc_table[LTI_gthf2])
-#define gehf2_libfunc  (libfunc_table[LTI_gehf2])
-#define lthf2_libfunc  (libfunc_table[LTI_lthf2])
-#define lehf2_libfunc  (libfunc_table[LTI_lehf2])
-#define unordhf2_libfunc       (libfunc_table[LTI_unordhf2])
-
-#define eqsf2_libfunc  (libfunc_table[LTI_eqsf2])
-#define nesf2_libfunc  (libfunc_table[LTI_nesf2])
-#define gtsf2_libfunc  (libfunc_table[LTI_gtsf2])
-#define gesf2_libfunc  (libfunc_table[LTI_gesf2])
-#define ltsf2_libfunc  (libfunc_table[LTI_ltsf2])
-#define lesf2_libfunc  (libfunc_table[LTI_lesf2])
-#define unordsf2_libfunc       (libfunc_table[LTI_unordsf2])
-
-#define eqdf2_libfunc  (libfunc_table[LTI_eqdf2])
-#define nedf2_libfunc  (libfunc_table[LTI_nedf2])
-#define gtdf2_libfunc  (libfunc_table[LTI_gtdf2])
-#define gedf2_libfunc  (libfunc_table[LTI_gedf2])
-#define ltdf2_libfunc  (libfunc_table[LTI_ltdf2])
-#define ledf2_libfunc  (libfunc_table[LTI_ledf2])
-#define unorddf2_libfunc       (libfunc_table[LTI_unorddf2])
-
-#define eqxf2_libfunc  (libfunc_table[LTI_eqxf2])
-#define nexf2_libfunc  (libfunc_table[LTI_nexf2])
-#define gtxf2_libfunc  (libfunc_table[LTI_gtxf2])
-#define gexf2_libfunc  (libfunc_table[LTI_gexf2])
-#define ltxf2_libfunc  (libfunc_table[LTI_ltxf2])
-#define lexf2_libfunc  (libfunc_table[LTI_lexf2])
-#define unordxf2_libfunc       (libfunc_table[LTI_unordxf2])
-
-#define eqtf2_libfunc  (libfunc_table[LTI_eqtf2])
-#define netf2_libfunc  (libfunc_table[LTI_netf2])
-#define gttf2_libfunc  (libfunc_table[LTI_gttf2])
-#define getf2_libfunc  (libfunc_table[LTI_getf2])
-#define lttf2_libfunc  (libfunc_table[LTI_lttf2])
-#define letf2_libfunc  (libfunc_table[LTI_letf2])
-#define unordtf2_libfunc       (libfunc_table[LTI_unordtf2])
-
-#define floatsisf_libfunc      (libfunc_table[LTI_floatsisf])
-#define floatdisf_libfunc      (libfunc_table[LTI_floatdisf])
-#define floattisf_libfunc      (libfunc_table[LTI_floattisf])
-
-#define floatsidf_libfunc      (libfunc_table[LTI_floatsidf])
-#define floatdidf_libfunc      (libfunc_table[LTI_floatdidf])
-#define floattidf_libfunc      (libfunc_table[LTI_floattidf])
-
-#define floatsixf_libfunc      (libfunc_table[LTI_floatsixf])
-#define floatdixf_libfunc      (libfunc_table[LTI_floatdixf])
-#define floattixf_libfunc      (libfunc_table[LTI_floattixf])
-
-#define floatsitf_libfunc      (libfunc_table[LTI_floatsitf])
-#define floatditf_libfunc      (libfunc_table[LTI_floatditf])
-#define floattitf_libfunc      (libfunc_table[LTI_floattitf])
-
-#define fixsfsi_libfunc        (libfunc_table[LTI_fixsfsi])
-#define fixsfdi_libfunc        (libfunc_table[LTI_fixsfdi])
-#define fixsfti_libfunc        (libfunc_table[LTI_fixsfti])
-
-#define fixdfsi_libfunc        (libfunc_table[LTI_fixdfsi])
-#define fixdfdi_libfunc        (libfunc_table[LTI_fixdfdi])
-#define fixdfti_libfunc        (libfunc_table[LTI_fixdfti])
-
-#define fixxfsi_libfunc        (libfunc_table[LTI_fixxfsi])
-#define fixxfdi_libfunc        (libfunc_table[LTI_fixxfdi])
-#define fixxfti_libfunc        (libfunc_table[LTI_fixxfti])
-
-#define fixtfsi_libfunc        (libfunc_table[LTI_fixtfsi])
-#define fixtfdi_libfunc        (libfunc_table[LTI_fixtfdi])
-#define fixtfti_libfunc        (libfunc_table[LTI_fixtfti])
-
-#define fixunssfsi_libfunc     (libfunc_table[LTI_fixunssfsi])
-#define fixunssfdi_libfunc     (libfunc_table[LTI_fixunssfdi])
-#define fixunssfti_libfunc     (libfunc_table[LTI_fixunssfti])
-
-#define fixunsdfsi_libfunc     (libfunc_table[LTI_fixunsdfsi])
-#define fixunsdfdi_libfunc     (libfunc_table[LTI_fixunsdfdi])
-#define fixunsdfti_libfunc     (libfunc_table[LTI_fixunsdfti])
-
-#define fixunsxfsi_libfunc     (libfunc_table[LTI_fixunsxfsi])
-#define fixunsxfdi_libfunc     (libfunc_table[LTI_fixunsxfdi])
-#define fixunsxfti_libfunc     (libfunc_table[LTI_fixunsxfti])
-
-#define fixunstfsi_libfunc     (libfunc_table[LTI_fixunstfsi])
-#define fixunstfdi_libfunc     (libfunc_table[LTI_fixunstfdi])
-#define fixunstfti_libfunc     (libfunc_table[LTI_fixunstfti])
-
-#define chkr_check_addr_libfunc        (libfunc_table[LTI_chkr_check_addr])
-#define chkr_set_right_libfunc (libfunc_table[LTI_chkr_set_right])
-#define chkr_copy_bitmap_libfunc       (libfunc_table[LTI_chkr_copy_bitmap])
-#define chkr_check_exec_libfunc        (libfunc_table[LTI_chkr_check_exec])
-#define chkr_check_str_libfunc (libfunc_table[LTI_chkr_check_str])
-
-#define profile_function_entry_libfunc (libfunc_table[LTI_profile_function_entry])
-#define profile_function_exit_libfunc  (libfunc_table[LTI_profile_function_exit])
-\f
-typedef rtx (*rtxfun) PARAMS ((rtx));
-
-/* Indexed by the rtx-code for a conditional (eg. EQ, LT,...)
-   gives the gen_function to make a branch to test that condition.  */
-
-extern rtxfun bcc_gen_fctn[NUM_RTX_CODE];
-
-/* Indexed by the rtx-code for a conditional (eg. EQ, LT,...)
-   gives the insn code to make a store-condition insn
-   to test that condition.  */
-
-extern enum insn_code setcc_gen_code[NUM_RTX_CODE];
-
-#ifdef HAVE_conditional_move
-/* Indexed by the machine mode, gives the insn code to make a conditional
-   move insn.  */
-
-extern enum insn_code movcc_gen_code[NUM_MACHINE_MODES];
-#endif
-
-/* This array records the insn_code of insns to perform block moves.  */
-extern enum insn_code movstr_optab[NUM_MACHINE_MODES];
-
-/* This array records the insn_code of insns to perform block clears.  */
-extern enum insn_code clrstr_optab[NUM_MACHINE_MODES];
-
-/* Define functions given in optabs.c.  */
-
-/* Expand a binary operation given optab and rtx operands.  */
-extern rtx expand_binop PARAMS ((enum 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 PARAMS ((enum machine_mode, optab, optab, rtx,
-                                     rtx, rtx, int, enum optab_methods));
-
-/* Generate code to perform an operation on two operands with two results.  */
-extern int expand_twoval_binop PARAMS ((optab, rtx, rtx, rtx, rtx, int));
-
-/* Expand a unary arithmetic operation given optab rtx operand.  */
-extern rtx expand_unop PARAMS ((enum machine_mode, optab, rtx, rtx, int));
-
-/* Expand the absolute value operation.  */
-extern rtx expand_abs PARAMS ((enum machine_mode, rtx, rtx, int, int));
-
-/* Expand the complex absolute value operation.  */
-extern rtx expand_complex_abs PARAMS ((enum machine_mode, rtx, rtx, int));
-
-/* Generate an instruction with a given INSN_CODE with an output and
-   an input.  */
-extern void emit_unop_insn PARAMS ((int, rtx, rtx, enum rtx_code));
-
-/* Emit code to perform a series of operations on a multi-word quantity, one
-   word at a time.  */
-extern rtx emit_no_conflict_block PARAMS ((rtx, rtx, rtx, rtx, rtx));
+/* Functions from optabs.c, commonly used, and without need for the optabs
+   tables:  */
 
 /* Emit code to make a call to a constant function or a library call. */
 extern void emit_libcall_block PARAMS ((rtx, rtx, rtx, rtx));
 
-/* Emit one rtl instruction to store zero in specified rtx.  */
-extern void emit_clr_insn PARAMS ((rtx));
-
-/* Emit one rtl insn to store 1 in specified rtx assuming it contains 0.  */
-extern void emit_0_to_1_insn PARAMS ((rtx));
-
-/* Emit one rtl insn to compare two rtx's.  */
-extern void emit_cmp_insn PARAMS ((rtx, rtx, enum rtx_code, rtx,
-                                  enum machine_mode, int, unsigned 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.
+   These do not call protect_from_queue; caller must do so.  */
+extern rtx gen_add2_insn PARAMS ((rtx, rtx));
+extern rtx gen_add3_insn PARAMS ((rtx, rtx, rtx));
+extern rtx gen_sub2_insn PARAMS ((rtx, rtx));
+extern rtx gen_move_insn PARAMS ((rtx, rtx));
+extern int have_add2_insn PARAMS ((rtx, rtx));
+extern int have_sub2_insn PARAMS ((rtx, rtx));
 
 /* Emit a pair of rtl insns to compare two rtx's and to jump 
    to a label if the comparison is true.  */
@@ -803,27 +276,6 @@ extern void emit_cmp_and_jump_insns PARAMS ((rtx, rtx, enum rtx_code, rtx,
                                             enum machine_mode, int,
                                             unsigned int, 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 PARAMS ((enum rtx_code, enum machine_mode,
-                                 enum can_compare_purpose));
-
-extern void prepare_cmp_insn PARAMS ((rtx *, rtx *, enum rtx_code *, rtx,
-                                     enum machine_mode *, int *, int,
-                                     enum can_compare_purpose));
-
-extern rtx prepare_operand PARAMS ((int, rtx, int, enum machine_mode,
-                                   enum machine_mode, int));
-
 /* Generate code to indirectly jump to a location given in the rtx LOC.  */
 extern void emit_indirect_jump PARAMS ((rtx));
 
@@ -838,42 +290,6 @@ int can_conditionally_move_p PARAMS ((enum machine_mode mode));
 
 #endif
 
-/* Create but don't emit one rtl instruction to add one rtx into another.
-   Modes must match; operands must meet the operation's predicates.
-   Likewise for subtraction and for just copying.
-   These do not call protect_from_queue; caller must do so.  */
-extern rtx gen_add2_insn PARAMS ((rtx, rtx));
-extern rtx gen_sub2_insn PARAMS ((rtx, rtx));
-extern rtx gen_move_insn PARAMS ((rtx, rtx));
-extern int have_add2_insn PARAMS ((rtx, rtx));
-extern int have_sub2_insn PARAMS ((rtx, rtx));
-
-/* Return the INSN_CODE to use for an extend operation.  */
-extern enum insn_code can_extend_p PARAMS ((enum machine_mode,
-                                           enum 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 PARAMS ((rtx, rtx, enum machine_mode,
-                                   enum machine_mode, int));
-
-/* Initialize the tables that control conversion between fixed and
-   floating values.  */
-extern void init_fixtab PARAMS ((void));
-extern void init_floattab PARAMS ((void));
-
-/* Generate code for a FLOAT_EXPR.  */
-extern void expand_float PARAMS ((rtx, rtx, int));
-
-/* Generate code for a FIX_EXPR.  */
-extern void expand_fix PARAMS ((rtx, rtx, int));
-
-/* Call this to initialize an optab function entry.  */
-extern rtx init_one_libfunc PARAMS ((const char *));
-
-/* Call this once to initialize the contents of the optabs
-   appropriately for the current target machine.  */
-extern void init_optabs        PARAMS ((void));
 \f
 /* Functions from expmed.c:  */
 
@@ -1304,7 +720,14 @@ extern int safe_from_p PARAMS ((rtx, tree, int));
 extern int (*lang_safe_from_p) PARAMS ((rtx, tree));
 #endif
 
+/* Call this once to initialize the contents of the optabs
+   appropriately for the current target machine.  */
+extern void init_optabs                                PARAMS ((void));
 extern void init_all_optabs                    PARAMS ((void));
+
+/* Call this to initialize an optab function entry.  */
+extern rtx init_one_libfunc                    PARAMS ((const char *));
+
 extern void do_jump_by_parts_equality_rtx      PARAMS ((rtx, rtx, rtx));
 extern void do_jump_by_parts_greater_rtx       PARAMS ((enum machine_mode,
                                                         int, rtx, rtx, rtx,
index 7a03d9cd73e52a60631a8e2a4f23db67cfa8570d..450c400a4c5bc868edeef12ed7d470ab9ce8f554 100644 (file)
@@ -46,6 +46,8 @@ Boston, MA 02111-1307, USA.  */
 #include "except.h"
 #include "function.h"
 #include "expr.h"
+#include "optabs.h"
+#include "libfuncs.h"
 #include "regs.h"
 #include "hard-reg-set.h"
 #include "insn-config.h"
index 2610a12325f0e43292faa8ce602cea1f51041136..ffcd18762157c0f10b174cd5ef5c950e559fd208 100644 (file)
@@ -28,20 +28,18 @@ Boston, MA 02111-1307, USA.  */
 #include "errors.h"
 #include "gensupport.h"
 
-static int insn_code_number;
-
-static void gen_insn PARAMS ((rtx));
+static void gen_insn PARAMS ((const char *, int));
 
 static void
-gen_insn (insn)
-     rtx insn;
+gen_insn (name, code)
+     const char *name;
+     int code;
 {
   /* Don't mention instructions whose names are the null string
      or begin with '*'.  They are in the machine description just
      to be recognized.  */
-  if (XSTR (insn, 0)[0] != 0 && XSTR (insn, 0)[0] != '*')
-    printf ("  CODE_FOR_%s = %d,\n", XSTR (insn, 0),
-           insn_code_number);
+  if (name[0] != 0 && name[0] != '*')
+    printf ("  CODE_FOR_%s = %d,\n", name, code);
 }
 
 extern int main PARAMS ((int, char **));
@@ -61,33 +59,34 @@ main (argc, argv)
   if (init_md_reader (argv[1]) != SUCCESS_EXIT_CODE)
     return (FATAL_EXIT_CODE);
 
-  puts ("/* Generated automatically by the program `gencodes'");
-  puts ("   from the machine description file `md'.  */\n");
-  puts ("#ifndef GCC_INSN_CODES_H");
-  puts ("#define GCC_INSN_CODES_H\n");
+  puts ("\
+/* Generated automatically by the program `gencodes'\n\
+   from the machine description file `md'.  */\n\
+\n\
+#ifndef GCC_INSN_CODES_H\n\
+#define GCC_INSN_CODES_H\n\
+\n\
+enum insn_code {");
 
   /* Read the machine description.  */
 
-  insn_code_number = 0;
-  printf ("enum insn_code {\n");
-
   while (1)
     {
       int line_no;
+      int insn_code_number;
 
       desc = read_md_rtx (&line_no, &insn_code_number);
       if (desc == NULL)
        break;
 
       if (GET_CODE (desc) == DEFINE_INSN || GET_CODE (desc) == DEFINE_EXPAND)
-       gen_insn (desc);
+       gen_insn (XSTR (desc, 0), insn_code_number);
     }
 
-  printf ("  CODE_FOR_nothing = %d };\n", insn_code_number + 1);
-
-  printf ("\n#define MAX_INSN_CODE ((int) CODE_FOR_nothing)\n\n");
-
-  puts("\n#endif /* GCC_INSN_CODES_H */");
+  puts ("CODE_FOR_nothing\n\
+};\n\
+\n\
+#endif /* GCC_INSN_CODES_H */");
 
   if (ferror (stdout) || fflush (stdout) || fclose (stdout))
     return FATAL_EXIT_CODE;
index b7985ba08837675e63fe520babca09d2d6b53e58..45a102ebf229dba08b84403c455c2f32354f8922 100644 (file)
@@ -809,6 +809,7 @@ from the machine description file `md'.  */\n\n");
   printf ("#include \"tm_p.h\"\n");
   printf ("#include \"function.h\"\n");
   printf ("#include \"expr.h\"\n");
+  printf ("#include \"optabs.h\"\n");
   printf ("#include \"real.h\"\n");
   printf ("#include \"flags.h\"\n");
   printf ("#include \"output.h\"\n");
index 8e00718e2f1312a93b0d2659953ad2c2bba14a9c..ee4dbf2fad91b59970f4aba84118a28dbcc8f345 100644 (file)
@@ -330,6 +330,7 @@ from the machine description file `md'.  */\n\n");
   printf ("#include \"insn-config.h\"\n");
   printf ("#include \"recog.h\"\n");
   printf ("#include \"expr.h\"\n");
+  printf ("#include \"optabs.h\"\n");
   printf ("#include \"reload.h\"\n\n");
 
   printf ("void\ninit_all_optabs ()\n{\n");
index bca9a6232592a502146b81af11b5ae25ca061337..f44360514ed69cea83158eeac160757e5daaa1ed 100644 (file)
@@ -223,6 +223,7 @@ output_prologue ()
   printf ("#include \"ggc.h\"\n");
   printf ("#include \"rtl.h\"\n");
   printf ("#include \"expr.h\"\n");
+  printf ("#include \"insn-codes.h\"\n");
   printf ("#include \"tm_p.h\"\n");
   printf ("#include \"function.h\"\n");
   printf ("#include \"regs.h\"\n");
index ce13599d29eed5366bcda0b8910fee3227d8cdd5..77d585c28a4933f30e58ccb004814907e07f6c1c 100644 (file)
@@ -30,6 +30,7 @@
 #include "hard-reg-set.h"
 #include "basic-block.h"
 #include "expr.h"
+#include "optabs.h"
 #include "real.h"
 #include "output.h"
 #include "toplev.h"
index 4dd5132af9617f2a25e0a8ee873fdb652a0500fc..c4589c3c26f5cb71a83f5441d245dfd272419bf1 100644 (file)
@@ -1,3 +1,8 @@
+2001-08-13  Zack Weinberg  <zackw@panix.com>
+
+       * Make-lang.in (java/decl.o): Update dependencies.
+       * decl.c: Include libfuncs.h, don't include toplev.h.
+
 2001-08-12  David Edelsohn  <edelsohn@gnu.org>
 
        Revert:
index d0ae26c051697f12517bfc30340dd2bd7ebaf530..67ae036b163914a20f9eeb13fe35998bf33314f0 100644 (file)
@@ -248,11 +248,12 @@ java/class.o: java/class.c $(CONFIG_H) $(JAVA_TREE_H) $(RTL_H) java/jcf.h \
   java/parse.h toplev.h $(SYSTEM_H) output.h $(GGC_H) $(TARGET_H) function.h
 java/constants.o: java/constants.c $(CONFIG_H) $(JAVA_TREE_H) java/jcf.h \
   toplev.h $(SYSTEM_H) $(GGC_H)
-java/decl.o: java/decl.c $(CONFIG_H) $(JAVA_TREE_H) java/jcf.h \
-  toplev.h $(SYSTEM_H) function.h gcc.h
+java/decl.o: java/decl.c $(CONFIG_H) $(JAVA_TREE_H) $(RTL_H) java/jcf.h \
+  toplev.h flags.h $(SYSTEM_H) function.h expr.h libfuncs.h except.h \
+  java/java-except.h $(GGC_H)
 java/except.o: java/except.c $(CONFIG_H) $(JAVA_TREE_H) java/jcf.h real.h \
   $(RTL_H) java/javaop.h java/java-opcodes.h except.h java/java-except.h \
-  toplev.h $(SYSTEM_H) function.h
+  toplev.h $(SYSTEM_H) function.h 
 java/expr.o: java/expr.c $(CONFIG_H) $(JAVA_TREE_H) java/jcf.h real.h \
   $(RTL_H) $(EXPR_H) java/javaop.h java/java-opcodes.h except.h \
   java/java-except.h java/java-except.h java/parse.h toplev.h \
index 4eb073933a995c5fa2dab3711626eb2113e3e7c6..abb49fa5acf4917680e7753c37d66ad3494512bf 100644 (file)
@@ -34,9 +34,9 @@ The Free Software Foundation is independent of Sun Microsystems, Inc.  */
 #include "flags.h"
 #include "java-tree.h"
 #include "jcf.h"
-#include "toplev.h"
 #include "function.h"
 #include "expr.h"
+#include "libfuncs.h"
 #include "except.h"
 #include "java-except.h"
 #include "ggc.h"
diff --git a/gcc/libfuncs.h b/gcc/libfuncs.h
new file mode 100644 (file)
index 0000000..c1e7eb1
--- /dev/null
@@ -0,0 +1,284 @@
+/* Definitions for code generation pass of GNU compiler.
+   Copyright (C) 2001 Free Software Foundation, Inc.
+
+This file is part of GNU CC.
+
+GNU CC is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU CC is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU CC; see the file COPYING.  If not, write to
+the Free Software Foundation, 59 Temple Place - Suite 330,
+Boston, MA 02111-1307, USA.  */
+
+#ifndef GCC_LIBFUNCS_H
+#define GCC_LIBFUNCS_H
+
+/* Enumeration of indexes into libfunc_table.  */
+enum libfunc_index
+{
+  LTI_extendsfdf2,
+  LTI_extendsfxf2,
+  LTI_extendsftf2,
+  LTI_extenddfxf2,
+  LTI_extenddftf2,
+
+  LTI_truncdfsf2,
+  LTI_truncxfsf2,
+  LTI_trunctfsf2,
+  LTI_truncxfdf2,
+  LTI_trunctfdf2,
+
+  LTI_memcpy,
+  LTI_memmove,
+  LTI_bcopy,
+  LTI_memcmp,
+  LTI_bcmp,
+  LTI_memset,
+  LTI_bzero,
+
+  LTI_unwind_resume,
+  LTI_eh_personality,
+  LTI_setjmp,
+  LTI_longjmp,
+  LTI_unwind_sjlj_register,
+  LTI_unwind_sjlj_unregister,
+
+  LTI_eqhf2,
+  LTI_nehf2,
+  LTI_gthf2,
+  LTI_gehf2,
+  LTI_lthf2,
+  LTI_lehf2,
+  LTI_unordhf2,
+
+  LTI_eqsf2,
+  LTI_nesf2,
+  LTI_gtsf2,
+  LTI_gesf2,
+  LTI_ltsf2,
+  LTI_lesf2,
+  LTI_unordsf2,
+
+  LTI_eqdf2,
+  LTI_nedf2,
+  LTI_gtdf2,
+  LTI_gedf2,
+  LTI_ltdf2,
+  LTI_ledf2,
+  LTI_unorddf2,
+
+  LTI_eqxf2,
+  LTI_nexf2,
+  LTI_gtxf2,
+  LTI_gexf2,
+  LTI_ltxf2,
+  LTI_lexf2,
+  LTI_unordxf2,
+
+  LTI_eqtf2,
+  LTI_netf2,
+  LTI_gttf2,
+  LTI_getf2,
+  LTI_lttf2,
+  LTI_letf2,
+  LTI_unordtf2,
+
+  LTI_floatsisf,
+  LTI_floatdisf,
+  LTI_floattisf,
+
+  LTI_floatsidf,
+  LTI_floatdidf,
+  LTI_floattidf,
+
+  LTI_floatsixf,
+  LTI_floatdixf,
+  LTI_floattixf,
+
+  LTI_floatsitf,
+  LTI_floatditf,
+  LTI_floattitf,
+
+  LTI_fixsfsi,
+  LTI_fixsfdi,
+  LTI_fixsfti,
+
+  LTI_fixdfsi,
+  LTI_fixdfdi,
+  LTI_fixdfti,
+
+  LTI_fixxfsi,
+  LTI_fixxfdi,
+  LTI_fixxfti,
+
+  LTI_fixtfsi,
+  LTI_fixtfdi,
+  LTI_fixtfti,
+
+  LTI_fixunssfsi,
+  LTI_fixunssfdi,
+  LTI_fixunssfti,
+
+  LTI_fixunsdfsi,
+  LTI_fixunsdfdi,
+  LTI_fixunsdfti,
+
+  LTI_fixunsxfsi,
+  LTI_fixunsxfdi,
+  LTI_fixunsxfti,
+
+  LTI_fixunstfsi,
+  LTI_fixunstfdi,
+  LTI_fixunstfti,
+
+  LTI_chkr_check_addr,
+  LTI_chkr_set_right,
+  LTI_chkr_copy_bitmap,
+  LTI_chkr_check_exec,
+  LTI_chkr_check_str,
+
+  LTI_profile_function_entry,
+  LTI_profile_function_exit,
+
+  LTI_MAX
+};
+
+/* SYMBOL_REF rtx's for the library functions that are called
+   implicitly and not via optabs.  */
+extern rtx libfunc_table[LTI_MAX];
+
+/* Accessor macros for libfunc_table.  */
+#define extendsfdf2_libfunc    (libfunc_table[LTI_extendsfdf2])
+#define extendsfxf2_libfunc    (libfunc_table[LTI_extendsfxf2])
+#define extendsftf2_libfunc    (libfunc_table[LTI_extendsftf2])
+#define extenddfxf2_libfunc    (libfunc_table[LTI_extenddfxf2])
+#define extenddftf2_libfunc    (libfunc_table[LTI_extenddftf2])
+
+#define truncdfsf2_libfunc     (libfunc_table[LTI_truncdfsf2])
+#define truncxfsf2_libfunc     (libfunc_table[LTI_truncxfsf2])
+#define trunctfsf2_libfunc     (libfunc_table[LTI_trunctfsf2])
+#define truncxfdf2_libfunc     (libfunc_table[LTI_truncxfdf2])
+#define trunctfdf2_libfunc     (libfunc_table[LTI_trunctfdf2])
+
+#define memcpy_libfunc (libfunc_table[LTI_memcpy])
+#define memmove_libfunc        (libfunc_table[LTI_memmove])
+#define bcopy_libfunc  (libfunc_table[LTI_bcopy])
+#define memcmp_libfunc (libfunc_table[LTI_memcmp])
+#define bcmp_libfunc   (libfunc_table[LTI_bcmp])
+#define memset_libfunc (libfunc_table[LTI_memset])
+#define bzero_libfunc  (libfunc_table[LTI_bzero])
+
+#define unwind_resume_libfunc  (libfunc_table[LTI_unwind_resume])
+#define eh_personality_libfunc (libfunc_table[LTI_eh_personality])
+#define setjmp_libfunc (libfunc_table[LTI_setjmp])
+#define longjmp_libfunc        (libfunc_table[LTI_longjmp])
+#define unwind_sjlj_register_libfunc (libfunc_table[LTI_unwind_sjlj_register])
+#define unwind_sjlj_unregister_libfunc \
+  (libfunc_table[LTI_unwind_sjlj_unregister])
+
+#define eqhf2_libfunc  (libfunc_table[LTI_eqhf2])
+#define nehf2_libfunc  (libfunc_table[LTI_nehf2])
+#define gthf2_libfunc  (libfunc_table[LTI_gthf2])
+#define gehf2_libfunc  (libfunc_table[LTI_gehf2])
+#define lthf2_libfunc  (libfunc_table[LTI_lthf2])
+#define lehf2_libfunc  (libfunc_table[LTI_lehf2])
+#define unordhf2_libfunc       (libfunc_table[LTI_unordhf2])
+
+#define eqsf2_libfunc  (libfunc_table[LTI_eqsf2])
+#define nesf2_libfunc  (libfunc_table[LTI_nesf2])
+#define gtsf2_libfunc  (libfunc_table[LTI_gtsf2])
+#define gesf2_libfunc  (libfunc_table[LTI_gesf2])
+#define ltsf2_libfunc  (libfunc_table[LTI_ltsf2])
+#define lesf2_libfunc  (libfunc_table[LTI_lesf2])
+#define unordsf2_libfunc       (libfunc_table[LTI_unordsf2])
+
+#define eqdf2_libfunc  (libfunc_table[LTI_eqdf2])
+#define nedf2_libfunc  (libfunc_table[LTI_nedf2])
+#define gtdf2_libfunc  (libfunc_table[LTI_gtdf2])
+#define gedf2_libfunc  (libfunc_table[LTI_gedf2])
+#define ltdf2_libfunc  (libfunc_table[LTI_ltdf2])
+#define ledf2_libfunc  (libfunc_table[LTI_ledf2])
+#define unorddf2_libfunc       (libfunc_table[LTI_unorddf2])
+
+#define eqxf2_libfunc  (libfunc_table[LTI_eqxf2])
+#define nexf2_libfunc  (libfunc_table[LTI_nexf2])
+#define gtxf2_libfunc  (libfunc_table[LTI_gtxf2])
+#define gexf2_libfunc  (libfunc_table[LTI_gexf2])
+#define ltxf2_libfunc  (libfunc_table[LTI_ltxf2])
+#define lexf2_libfunc  (libfunc_table[LTI_lexf2])
+#define unordxf2_libfunc       (libfunc_table[LTI_unordxf2])
+
+#define eqtf2_libfunc  (libfunc_table[LTI_eqtf2])
+#define netf2_libfunc  (libfunc_table[LTI_netf2])
+#define gttf2_libfunc  (libfunc_table[LTI_gttf2])
+#define getf2_libfunc  (libfunc_table[LTI_getf2])
+#define lttf2_libfunc  (libfunc_table[LTI_lttf2])
+#define letf2_libfunc  (libfunc_table[LTI_letf2])
+#define unordtf2_libfunc       (libfunc_table[LTI_unordtf2])
+
+#define floatsisf_libfunc      (libfunc_table[LTI_floatsisf])
+#define floatdisf_libfunc      (libfunc_table[LTI_floatdisf])
+#define floattisf_libfunc      (libfunc_table[LTI_floattisf])
+
+#define floatsidf_libfunc      (libfunc_table[LTI_floatsidf])
+#define floatdidf_libfunc      (libfunc_table[LTI_floatdidf])
+#define floattidf_libfunc      (libfunc_table[LTI_floattidf])
+
+#define floatsixf_libfunc      (libfunc_table[LTI_floatsixf])
+#define floatdixf_libfunc      (libfunc_table[LTI_floatdixf])
+#define floattixf_libfunc      (libfunc_table[LTI_floattixf])
+
+#define floatsitf_libfunc      (libfunc_table[LTI_floatsitf])
+#define floatditf_libfunc      (libfunc_table[LTI_floatditf])
+#define floattitf_libfunc      (libfunc_table[LTI_floattitf])
+
+#define fixsfsi_libfunc        (libfunc_table[LTI_fixsfsi])
+#define fixsfdi_libfunc        (libfunc_table[LTI_fixsfdi])
+#define fixsfti_libfunc        (libfunc_table[LTI_fixsfti])
+
+#define fixdfsi_libfunc        (libfunc_table[LTI_fixdfsi])
+#define fixdfdi_libfunc        (libfunc_table[LTI_fixdfdi])
+#define fixdfti_libfunc        (libfunc_table[LTI_fixdfti])
+
+#define fixxfsi_libfunc        (libfunc_table[LTI_fixxfsi])
+#define fixxfdi_libfunc        (libfunc_table[LTI_fixxfdi])
+#define fixxfti_libfunc        (libfunc_table[LTI_fixxfti])
+
+#define fixtfsi_libfunc        (libfunc_table[LTI_fixtfsi])
+#define fixtfdi_libfunc        (libfunc_table[LTI_fixtfdi])
+#define fixtfti_libfunc        (libfunc_table[LTI_fixtfti])
+
+#define fixunssfsi_libfunc     (libfunc_table[LTI_fixunssfsi])
+#define fixunssfdi_libfunc     (libfunc_table[LTI_fixunssfdi])
+#define fixunssfti_libfunc     (libfunc_table[LTI_fixunssfti])
+
+#define fixunsdfsi_libfunc     (libfunc_table[LTI_fixunsdfsi])
+#define fixunsdfdi_libfunc     (libfunc_table[LTI_fixunsdfdi])
+#define fixunsdfti_libfunc     (libfunc_table[LTI_fixunsdfti])
+
+#define fixunsxfsi_libfunc     (libfunc_table[LTI_fixunsxfsi])
+#define fixunsxfdi_libfunc     (libfunc_table[LTI_fixunsxfdi])
+#define fixunsxfti_libfunc     (libfunc_table[LTI_fixunsxfti])
+
+#define fixunstfsi_libfunc     (libfunc_table[LTI_fixunstfsi])
+#define fixunstfdi_libfunc     (libfunc_table[LTI_fixunstfdi])
+#define fixunstfti_libfunc     (libfunc_table[LTI_fixunstfti])
+
+#define chkr_check_addr_libfunc        (libfunc_table[LTI_chkr_check_addr])
+#define chkr_set_right_libfunc (libfunc_table[LTI_chkr_set_right])
+#define chkr_copy_bitmap_libfunc       (libfunc_table[LTI_chkr_copy_bitmap])
+#define chkr_check_exec_libfunc        (libfunc_table[LTI_chkr_check_exec])
+#define chkr_check_str_libfunc (libfunc_table[LTI_chkr_check_str])
+
+#define profile_function_entry_libfunc (libfunc_table[LTI_profile_function_entry])
+#define profile_function_exit_libfunc  (libfunc_table[LTI_profile_function_exit])
+
+#endif /* GCC_LIBFUNCS_H */
index 5e5fa13277406e5f22975b520f558b61016b41d0..55fa91217629abcdc4ec11427e8bb26cb8ded846 100644 (file)
@@ -41,6 +41,7 @@ Boston, MA 02111-1307, USA.  */
 #include "obstack.h"
 #include "function.h"
 #include "expr.h"
+#include "optabs.h"
 #include "hard-reg-set.h"
 #include "basic-block.h"
 #include "insn-config.h"
index d43bc983d273fcec222a0668a86efca805dc6eae..7de903cbc5fb2944401a82934407e9c9e412921a 100644 (file)
@@ -51,9 +51,8 @@ done
 
 # If this is tm_p.h, include tm-preds.h unconditionally.
 # If this is tconfig.h or hconfig.h, include no more files.
-# Otherwise, include insn-constants.h, insn-flags.h, and insn-codes.h,
-# but only if GENERATOR_FILE is not defined. (The last of those is
-# slated to be removed.)
+# Otherwise, include insn-constants.h and insn-flags.h,
+# but only if GENERATOR_FILE is not defined.
 case $output in
     *tm_p.h)
        echo "#include \"tm-preds.h\""
@@ -63,7 +62,6 @@ case $output in
     *)
        echo "#ifndef GENERATOR_FILE"
        echo "# include \"insn-constants.h\""
-       echo "# include \"insn-codes.h\""
        echo "# include \"insn-flags.h\""
        echo "#endif"
     ;;
index fd75ba118a3e2d20de5af370a72a1de5276d389e..285555392d9ceb094cafbb6265cace3f3ef5b2e8 100644 (file)
@@ -34,6 +34,8 @@ Boston, MA 02111-1307, USA.  */
 #include "function.h"
 #include "except.h"
 #include "expr.h"
+#include "optabs.h"
+#include "libfuncs.h"
 #include "recog.h"
 #include "reload.h"
 #include "ggc.h"
@@ -3738,7 +3740,7 @@ can_conditionally_move_p (mode)
 
 #endif /* HAVE_conditional_move */
 \f
-/* These three functions generate an insn body and return it
+/* These functions generate an insn body and return it
    rather than emitting the insn.
 
    They do not protect from queued increments,
@@ -3764,6 +3766,26 @@ gen_add2_insn (x, y)
   return (GEN_FCN (icode) (x, x, y));
 }
 
+/* Generate and return an insn body to add r1 and c,
+   storing the result in r0.  */
+rtx
+gen_add3_insn (r0, r1, c)
+     rtx r0, r1, c;
+{
+  int icode = (int) add_optab->handlers[(int) GET_MODE (r0)].insn_code;
+
+    if (icode == CODE_FOR_nothing
+      || ! ((*insn_data[icode].operand[0].predicate)
+           (r0, insn_data[icode].operand[0].mode))
+      || ! ((*insn_data[icode].operand[1].predicate)
+           (r1, insn_data[icode].operand[1].mode))
+      || ! ((*insn_data[icode].operand[2].predicate)
+           (c, insn_data[icode].operand[2].mode)))
+    return NULL_RTX;
+
+  return (GEN_FCN (icode) (r0, r1, c));
+}
+
 int
 have_add2_insn (x, y)
      rtx x, y;
diff --git a/gcc/optabs.h b/gcc/optabs.h
new file mode 100644 (file)
index 0000000..2f249c1
--- /dev/null
@@ -0,0 +1,355 @@
+/* Definitions for code generation pass of GNU compiler.
+   Copyright (C) 2001 Free Software Foundation, Inc.
+
+This file is part of GNU CC.
+
+GNU CC is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2, or (at your option)
+any later version.
+
+GNU CC is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with GNU CC; see the file COPYING.  If not, write to
+the Free Software Foundation, 59 Temple Place - Suite 330,
+Boston, MA 02111-1307, USA.  */
+
+#ifndef GCC_OPTABS_H
+#define GCC_OPTABS_H
+
+#include "insn-codes.h"
+
+/* Optabs are tables saying how to generate insn bodies
+   for various machine modes and numbers of operands.
+   Each optab applies to one operation.
+   For example, add_optab applies to addition.
+
+   The insn_code slot is the enum insn_code that says how to
+   generate an insn for this operation on a particular machine mode.
+   It is CODE_FOR_nothing if there is no such insn on the target machine.
+
+   The `lib_call' slot is the name of the library function that
+   can be used to perform the operation.
+
+   A few optabs, such as move_optab and cmp_optab, are used
+   by special code.  */
+
+typedef struct optab
+{
+  enum rtx_code code;
+  struct {
+    enum insn_code insn_code;
+    rtx libfunc;
+  } handlers [NUM_MACHINE_MODES];
+} * optab;
+
+/* Given an enum insn_code, access the function to construct
+   the body of that kind of insn.  */
+#define GEN_FCN(CODE) (*insn_data[(int) (CODE)].genfun)
+
+/* Enumeration of valid indexes into optab_table.  */
+enum optab_index
+{
+  OTI_add,
+  OTI_addv,
+  OTI_sub,
+  OTI_subv,
+
+  /* Signed and fp multiply */
+  OTI_smul,
+  OTI_smulv,
+  /* Signed multiply, return high word */
+  OTI_smul_highpart,
+  OTI_umul_highpart,
+  /* Signed multiply with result one machine mode wider than args */
+  OTI_smul_widen,
+  OTI_umul_widen,
+
+  /* Signed divide */
+  OTI_sdiv,
+  OTI_sdivv,
+  /* Signed divide-and-remainder in one */
+  OTI_sdivmod,
+  OTI_udiv,
+  OTI_udivmod,
+  /* Signed remainder */
+  OTI_smod,
+  OTI_umod,
+  /* Optab for floating divide. */
+  OTI_flodiv,
+  /* Convert float to integer in float fmt */
+  OTI_ftrunc,
+
+  /* Logical and */
+  OTI_and,
+  /* Logical or */
+  OTI_ior,
+  /* Logical xor */
+  OTI_xor,
+
+  /* Arithmetic shift left */
+  OTI_ashl,
+  /* Logical shift right */
+  OTI_lshr,  
+  /* Arithmetic shift right */
+  OTI_ashr,
+  /* Rotate left */
+  OTI_rotl,
+  /* Rotate right */
+  OTI_rotr,
+  /* Signed and floating-point minimum value */
+  OTI_smin,
+  /* Signed and floating-point maximum value */
+  OTI_smax,
+  /* Unsigned minimum value */
+  OTI_umin,
+  /* Unsigned maximum value */
+  OTI_umax,
+
+  /* Move instruction.  */
+  OTI_mov,
+  /* Move, preserving high part of register.  */
+  OTI_movstrict,
+
+  /* Unary operations */
+  /* Negation */
+  OTI_neg,
+  OTI_negv,
+  /* Abs value */
+  OTI_abs,
+  OTI_absv,
+  /* Bitwise not */
+  OTI_one_cmpl,
+  /* Find first bit set */
+  OTI_ffs,
+  /* Square root */
+  OTI_sqrt,
+  /* Sine */
+  OTI_sin,
+  /* Cosine */
+  OTI_cos,
+
+  /* Compare insn; two operands.  */
+  OTI_cmp,
+  /* Used only for libcalls for unsigned comparisons.  */
+  OTI_ucmp,
+  /* tst insn; compare one operand against 0 */
+  OTI_tst,
+
+  /* String length */
+  OTI_strlen,
+
+  /* Combined compare & jump/store flags/move operations.  */
+  OTI_cbranch,
+  OTI_cmov,
+  OTI_cstore,
+    
+  /* Push instruction.  */
+  OTI_push,
+
+  OTI_MAX
+};
+
+extern optab optab_table[OTI_MAX];
+
+#define add_optab (optab_table[OTI_add])
+#define sub_optab (optab_table[OTI_sub])
+#define smul_optab (optab_table[OTI_smul])
+#define addv_optab (optab_table[OTI_addv])
+#define subv_optab (optab_table[OTI_subv])
+#define smul_highpart_optab (optab_table[OTI_smul_highpart])
+#define umul_highpart_optab (optab_table[OTI_umul_highpart])
+#define smul_widen_optab (optab_table[OTI_smul_widen])
+#define umul_widen_optab (optab_table[OTI_umul_widen])
+#define sdiv_optab (optab_table[OTI_sdiv])
+#define smulv_optab (optab_table[OTI_smulv])
+#define sdivv_optab (optab_table[OTI_sdivv])
+#define sdivmod_optab (optab_table[OTI_sdivmod])
+#define udiv_optab (optab_table[OTI_udiv])
+#define udivmod_optab (optab_table[OTI_udivmod])
+#define smod_optab (optab_table[OTI_smod])
+#define umod_optab (optab_table[OTI_umod])
+#define flodiv_optab (optab_table[OTI_flodiv])
+#define ftrunc_optab (optab_table[OTI_ftrunc])
+#define and_optab (optab_table[OTI_and])
+#define ior_optab (optab_table[OTI_ior])
+#define xor_optab (optab_table[OTI_xor])
+#define ashl_optab (optab_table[OTI_ashl])
+#define lshr_optab (optab_table[OTI_lshr])
+#define ashr_optab (optab_table[OTI_ashr])
+#define rotl_optab (optab_table[OTI_rotl])
+#define rotr_optab (optab_table[OTI_rotr])
+#define smin_optab (optab_table[OTI_smin])
+#define smax_optab (optab_table[OTI_smax])
+#define umin_optab (optab_table[OTI_umin])
+#define umax_optab (optab_table[OTI_umax])
+
+#define mov_optab (optab_table[OTI_mov])
+#define movstrict_optab (optab_table[OTI_movstrict])
+
+#define neg_optab (optab_table[OTI_neg])
+#define negv_optab (optab_table[OTI_negv])
+#define abs_optab (optab_table[OTI_abs])
+#define absv_optab (optab_table[OTI_absv])
+#define one_cmpl_optab (optab_table[OTI_one_cmpl])
+#define ffs_optab (optab_table[OTI_ffs])
+#define sqrt_optab (optab_table[OTI_sqrt])
+#define sin_optab (optab_table[OTI_sin])
+#define cos_optab (optab_table[OTI_cos])
+
+#define cmp_optab (optab_table[OTI_cmp])
+#define ucmp_optab (optab_table[OTI_ucmp])
+#define tst_optab (optab_table[OTI_tst])
+
+#define strlen_optab (optab_table[OTI_strlen])
+
+#define cbranch_optab (optab_table[OTI_cbranch])
+#define cmov_optab (optab_table[OTI_cmov])
+#define cstore_optab (optab_table[OTI_cstore])
+#define push_optab (optab_table[OTI_push])
+
+/* Tables of patterns for extending one integer mode to another.  */
+extern enum insn_code extendtab[MAX_MACHINE_MODE][MAX_MACHINE_MODE][2];
+
+/* Tables of patterns for converting between fixed and floating point. */
+extern enum insn_code fixtab[NUM_MACHINE_MODES][NUM_MACHINE_MODES][2];
+extern enum insn_code fixtrunctab[NUM_MACHINE_MODES][NUM_MACHINE_MODES][2];
+extern enum insn_code floattab[NUM_MACHINE_MODES][NUM_MACHINE_MODES][2];
+
+/* These arrays record the insn_code of insns that may be needed to
+   perform input and output reloads of special objects.  They provide a
+   place to pass a scratch register.  */
+extern enum insn_code reload_in_optab[NUM_MACHINE_MODES];
+extern enum insn_code reload_out_optab[NUM_MACHINE_MODES];
+
+/* Contains the optab used for each rtx code.  */
+extern optab code_to_optab[NUM_RTX_CODE + 1];
+
+/* Passed to expand_binop and expand_unop 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
+};
+
+\f
+typedef rtx (*rtxfun) PARAMS ((rtx));
+
+/* Indexed by the rtx-code for a conditional (eg. EQ, LT,...)
+   gives the gen_function to make a branch to test that condition.  */
+
+extern rtxfun bcc_gen_fctn[NUM_RTX_CODE];
+
+/* Indexed by the rtx-code for a conditional (eg. EQ, LT,...)
+   gives the insn code to make a store-condition insn
+   to test that condition.  */
+
+extern enum insn_code setcc_gen_code[NUM_RTX_CODE];
+
+#ifdef HAVE_conditional_move
+/* Indexed by the machine mode, gives the insn code to make a conditional
+   move insn.  */
+
+extern enum insn_code movcc_gen_code[NUM_MACHINE_MODES];
+#endif
+
+/* This array records the insn_code of insns to perform block moves.  */
+extern enum insn_code movstr_optab[NUM_MACHINE_MODES];
+
+/* This array records the insn_code of insns to perform block clears.  */
+extern enum insn_code clrstr_optab[NUM_MACHINE_MODES];
+
+/* Define functions given in optabs.c.  */
+
+/* Expand a binary operation given optab and rtx operands.  */
+extern rtx expand_binop PARAMS ((enum 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 PARAMS ((enum machine_mode, optab, optab, rtx,
+                                     rtx, rtx, int, enum optab_methods));
+
+/* Generate code to perform an operation on two operands with two results.  */
+extern int expand_twoval_binop PARAMS ((optab, rtx, rtx, rtx, rtx, int));
+
+/* Expand a unary arithmetic operation given optab rtx operand.  */
+extern rtx expand_unop PARAMS ((enum machine_mode, optab, rtx, rtx, int));
+
+/* Expand the absolute value operation.  */
+extern rtx expand_abs PARAMS ((enum machine_mode, rtx, rtx, int, int));
+
+/* Expand the complex absolute value operation.  */
+extern rtx expand_complex_abs PARAMS ((enum machine_mode, rtx, rtx, int));
+
+/* Generate an instruction with a given INSN_CODE with an output and
+   an input.  */
+extern void emit_unop_insn PARAMS ((int, rtx, rtx, enum rtx_code));
+
+/* Emit code to perform a series of operations on a multi-word quantity, one
+   word at a time.  */
+extern rtx emit_no_conflict_block PARAMS ((rtx, rtx, rtx, rtx, rtx));
+
+/* Emit one rtl instruction to store zero in specified rtx.  */
+extern void emit_clr_insn PARAMS ((rtx));
+
+/* Emit one rtl insn to store 1 in specified rtx assuming it contains 0.  */
+extern void emit_0_to_1_insn PARAMS ((rtx));
+
+/* Emit one rtl insn to compare two rtx's.  */
+extern void emit_cmp_insn PARAMS ((rtx, rtx, enum rtx_code, rtx,
+                                  enum machine_mode, int, unsigned int));
+
+/* 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 PARAMS ((enum rtx_code, enum machine_mode,
+                                 enum can_compare_purpose));
+
+extern void prepare_cmp_insn PARAMS ((rtx *, rtx *, enum rtx_code *, rtx,
+                                     enum machine_mode *, int *, int,
+                                     enum can_compare_purpose));
+
+extern rtx prepare_operand PARAMS ((int, rtx, int, enum machine_mode,
+                                   enum machine_mode, int));
+
+/* Return the INSN_CODE to use for an extend operation.  */
+extern enum insn_code can_extend_p PARAMS ((enum machine_mode,
+                                           enum 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 PARAMS ((rtx, rtx, enum machine_mode,
+                                   enum machine_mode, int));
+
+/* Initialize the tables that control conversion between fixed and
+   floating values.  */
+extern void init_fixtab PARAMS ((void));
+extern void init_floattab PARAMS ((void));
+
+/* Generate code for a FLOAT_EXPR.  */
+extern void expand_float PARAMS ((rtx, rtx, int));
+
+/* Generate code for a FIX_EXPR.  */
+extern void expand_fix PARAMS ((rtx, rtx, int));
+
+#endif /* GCC_OPTABS_H */
index 90327ca4ba9982c3d283dddb39be2c0eb5a42a9c..39b259f38709b35a777e5501b137c1358c430295 100644 (file)
@@ -42,6 +42,7 @@ Boston, MA 02111-1307, USA.  */
 #include "output.h"
 #include "regs.h"
 #include "expr.h"
+#include "optabs.h"
 #include "function.h"
 #include "toplev.h"
 #include "ggc.h"
index 283713bba5f6828ee321736a564ee941cb3c05e9..f2e046f3a83a188d44438879d5aafb9b10146fd0 100644 (file)
@@ -30,6 +30,7 @@ Boston, MA 02111-1307, USA.  */
 #include "recog.h"
 #include "regs.h"
 #include "expr.h"
+#include "insn-codes.h"
 #include "function.h"
 #include "flags.h"
 #include "real.h"
index 484c39119a0757c575547bb6460f3398c97f71af..de8e3e4380ed1e2fdbade96f7f74988797f3ac6d 100644 (file)
@@ -55,7 +55,6 @@ static int perhaps_ends_bb_p  PARAMS ((rtx));
 static int optimize_reg_copy_1 PARAMS ((rtx, rtx, rtx));
 static void optimize_reg_copy_2        PARAMS ((rtx, rtx, rtx));
 static void optimize_reg_copy_3        PARAMS ((rtx, rtx, rtx));
-static rtx gen_add3_insn       PARAMS ((rtx, rtx, rtx));
 static void copy_src_to_dest   PARAMS ((rtx, rtx, rtx, int));
 static int *regmove_bb_head;
 
@@ -94,27 +93,6 @@ regclass_compatible_p (class0, class1)
              && ! CLASS_LIKELY_SPILLED_P (class1)));
 }
 
-/* Generate and return an insn body to add r1 and c,
-   storing the result in r0.  */
-static rtx
-gen_add3_insn (r0, r1, c)
-     rtx r0, r1, c;
-{
-  int icode = (int) add_optab->handlers[(int) GET_MODE (r0)].insn_code;
-
-    if (icode == CODE_FOR_nothing
-      || ! ((*insn_data[icode].operand[0].predicate)
-           (r0, insn_data[icode].operand[0].mode))
-      || ! ((*insn_data[icode].operand[1].predicate)
-           (r1, insn_data[icode].operand[1].mode))
-      || ! ((*insn_data[icode].operand[2].predicate)
-           (c, insn_data[icode].operand[2].mode)))
-    return NULL_RTX;
-
-  return (GEN_FCN (icode) (r0, r1, c));
-}
-
-
 /* INC_INSN is an instruction that adds INCREMENT to REG.
    Try to fold INC_INSN as a post/pre in/decrement into INSN.
    Iff INC_INSN_SET is nonzero, inc_insn has a destination different from src.
index a569ab8c4a3f1ff4bae7456e387f55160106360b..989c224d280f55858feb888753854b8dd7f6fada 100644 (file)
@@ -91,6 +91,8 @@ a register with any other reload.  */
 #include "rtl.h"
 #include "tm_p.h"
 #include "insn-config.h"
+#include "expr.h"
+#include "optabs.h"
 #include "recog.h"
 #include "reload.h"
 #include "regs.h"
@@ -99,7 +101,6 @@ a register with any other reload.  */
 #include "real.h"
 #include "output.h"
 #include "function.h"
-#include "expr.h"
 #include "toplev.h"
 
 #ifndef REGISTER_MOVE_COST
index 40af087e48e0a7e4e40192f68f91c301da52101b..32ddfe5d5646b93174fb95f8f2dc819fe5ec048f 100644 (file)
@@ -82,7 +82,7 @@ enum reload_type
   RELOAD_OTHER, RELOAD_FOR_OTHER_ADDRESS
 };
 
-#ifdef MAX_INSN_CODE
+#ifdef GCC_INSN_CODES_H
 /* Each reload is recorded with a structure like this.  */
 struct reload
 {
@@ -192,14 +192,6 @@ extern char double_reg_address_ok;
 
 extern int num_not_at_initial_offset;
 
-#ifdef MAX_INSN_CODE
-/* These arrays record the insn_code of insns that may be needed to
-   perform input and output reloads of special objects.  They provide a
-   place to pass a scratch register.  */
-extern enum insn_code reload_in_optab[];
-extern enum insn_code reload_out_optab[];
-#endif
-
 struct needs
 {
   /* [0] is normal, [1] is nongroup.  */
index ded6943c04724eee0fbab22c107bdb857e4270fa..02f4aa518039b40d4d4e5f4c4e3173392a7dd1df 100644 (file)
@@ -31,6 +31,7 @@ Boston, MA 02111-1307, USA.  */
 #include "flags.h"
 #include "function.h"
 #include "expr.h"
+#include "optabs.h"
 #include "regs.h"
 #include "basic-block.h"
 #include "reload.h"
index 08adde25963bb99abcb106bd621524a1e2ee8d39..a29e4850f89c06c4c63f0999488abc3d7e2754a2 100644 (file)
@@ -33,6 +33,7 @@ Boston, MA 02111-1307, USA.  */
 #include "recog.h"
 #include "function.h"
 #include "expr.h"
+#include "optabs.h"
 #include "toplev.h"
 #include "output.h"
 #include "ggc.h"
index e9f044a73d833dc33a9c7ce38cab34299f6c3548..593fe4de4dac2029438ba158d6ed9a07388d011d 100644 (file)
@@ -44,6 +44,8 @@ Boston, MA 02111-1307, USA.  */
 #include "function.h"
 #include "insn-config.h"
 #include "expr.h"
+#include "optabs.h"
+#include "libfuncs.h"
 #include "hard-reg-set.h"
 #include "obstack.h"
 #include "loop.h"
index c26a29741e5f9a28cda21621c8dbea752c656a1d..f888089da9fdd4c17ca3a6cec075109371575766 100644 (file)
@@ -163,6 +163,7 @@ enum unroll_types
 #include "flags.h"
 #include "function.h"
 #include "expr.h"
+#include "optabs.h"
 #include "loop.h"
 #include "toplev.h"
 #include "hard-reg-set.h"