diff options
author | zack <zack@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-08-18 19:59:46 +0000 |
---|---|---|
committer | zack <zack@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-08-18 19:59:46 +0000 |
commit | ad99e708993275cfd0d666486d9c1b8bc7107416 (patch) | |
tree | f45f62817a1ba4ec89643d51d48fc4dea2c0237b /gcc/stmt.c | |
parent | 9c44ac54d7f5256b72b2e36db6e92e62815ac844 (diff) | |
download | gcc-ad99e708993275cfd0d666486d9c1b8bc7107416.tar.gz |
* 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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@45008 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/stmt.c')
-rw-r--r-- | gcc/stmt.c | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/gcc/stmt.c b/gcc/stmt.c index 357583d004f..5ef7ba90c7c 100644 --- a/gcc/stmt.c +++ b/gcc/stmt.c @@ -43,8 +43,8 @@ Boston, MA 02111-1307, USA. */ #include "except.h" #include "function.h" #include "insn-config.h" +#include "insn-codes.h" #include "expr.h" -#include "optabs.h" #include "libfuncs.h" #include "hard-reg-set.h" #include "obstack.h" @@ -5326,14 +5326,12 @@ expand_end_case (orig_index) generate the conversion. */ if (GET_MODE_CLASS (GET_MODE (index)) == MODE_INT - && (cmp_optab->handlers[(int) GET_MODE (index)].insn_code - == CODE_FOR_nothing)) + && ! have_insn_for (COMPARE, GET_MODE (index))) { enum machine_mode wider_mode; for (wider_mode = GET_MODE (index); wider_mode != VOIDmode; wider_mode = GET_MODE_WIDER_MODE (wider_mode)) - if (cmp_optab->handlers[(int) wider_mode].insn_code - != CODE_FOR_nothing) + if (have_insn_for (COMPARE, wider_mode)) { index = convert_to_mode (wider_mode, index, unsignedp); break; @@ -6345,13 +6343,14 @@ emit_case_nodes (index, node, default_label, index_type) tree type = type_for_mode (mode, unsignedp); tree low = build1 (CONVERT_EXPR, type, node->low); tree high = build1 (CONVERT_EXPR, type, node->high); - rtx new_index, new_bound; + rtx low_rtx, new_index, new_bound; /* Instead of doing two branches, emit one unsigned branch for (index-low) > (high-low). */ - new_index = expand_binop (mode, sub_optab, index, - expand_expr (low, NULL_RTX, mode, 0), - NULL_RTX, unsignedp, OPTAB_WIDEN); + low_rtx = expand_expr (low, NULL_RTX, mode, 0); + new_index = expand_simple_binop (mode, MINUS, index, low_rtx, + NULL_RTX, unsignedp, + OPTAB_WIDEN); new_bound = expand_expr (fold (build (MINUS_EXPR, type, high, low)), NULL_RTX, mode, 0); |