aboutsummaryrefslogtreecommitdiff
path: root/gcc/expr.h
diff options
context:
space:
mode:
authorZack Weinberg <zackw@panix.com>2001-08-18 19:59:46 +0000
committerZack Weinberg <zack@gcc.gnu.org>2001-08-18 19:59:46 +0000
commitef89d648b84b126fe6c15be5b09105bf705aa60a (patch)
treef45f62817a1ba4ec89643d51d48fc4dea2c0237b /gcc/expr.h
parent8d36d7229213f91138844f0e710e68c185774aea (diff)
downloadgcc-ef89d648b84b126fe6c15be5b09105bf705aa60a.zip
gcc-ef89d648b84b126fe6c15be5b09105bf705aa60a.tar.gz
gcc-ef89d648b84b126fe6c15be5b09105bf705aa60a.tar.bz2
optabs.h (OTI_flodiv, [...]): Kill.
* optabs.h (OTI_flodiv, flodiv_optab): Kill. * genopinit.c: Put floating point divide insns in sdiv_optab. * expr.c (expand_expr): Use sdiv_optab, not flodiv_optab. * config/gofast.h, config/c4x/c4x.h, config/ia64/hpux_longdouble.h, config/mips/mips.h, config/pa/long_double.h, config/rs6000/sysv4.h, config/sparc/sparc.h: Put floating point divide libcalls in sdiv_optab. * optabs.c (init_optab): Break into new_optab, init_optab, init_optabv. (init_optabs): Use init_optabv for overflow-trapping optabs. Don't init flodiv_optab. Give mov_optab, movstrict_optab, and cmp_optab RTX codes so have_insn_for can find them. * optabs.c (expand_simple_binop, expand_simple_unop, have_insn_for, gen_sub3_insn): New interfaces. * expr.h: Prototype new functions. (enum optab_methods): Move here from optabs.h. * builtins.c, combine.c, doloop.c, function.c, ifcvt.c, loop.c, profile.c, simplify-rtx.c, stmt.c, unroll.c: Use new functions instead of working directly with optabs. * doloop.c, ifcvt.c, loop.c, profile.c, simplify-rtx.c, unroll.c: Don't include optabs.h. * caller-save.c, combine.c, function.c, stmt.c: Just include insn-codes.h, not optabs.h. * Makefile.in: Update dependencies. * combine.c (make_compound_operation, simplify_comparison): Fix typos testing for this or that instruction. From-SVN: r45008
Diffstat (limited to 'gcc/expr.h')
-rw-r--r--gcc/expr.h29
1 files changed, 29 insertions, 0 deletions
diff --git a/gcc/expr.h b/gcc/expr.h
index 3a651b0..2ea167e 100644
--- a/gcc/expr.h
+++ b/gcc/expr.h
@@ -256,6 +256,34 @@ enum direction {none, upward, downward}; /* Value has this type. */
/* 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 PARAMS ((enum machine_mode, enum rtx_code, rtx,
+ rtx, rtx, int, enum optab_methods));
+extern rtx expand_simple_unop PARAMS ((enum 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 PARAMS ((enum rtx_code, enum machine_mode));
+
/* Emit code to make a call to a constant function or a library call. */
extern void emit_libcall_block PARAMS ((rtx, rtx, rtx, rtx));
@@ -266,6 +294,7 @@ extern void emit_libcall_block PARAMS ((rtx, rtx, rtx, rtx));
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_sub3_insn PARAMS ((rtx, 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));