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/doloop.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/doloop.c')
-rw-r--r-- | gcc/doloop.c | 39 |
1 files changed, 19 insertions, 20 deletions
diff --git a/gcc/doloop.c b/gcc/doloop.c index 6ccc53941a9..289da282fb9 100644 --- a/gcc/doloop.c +++ b/gcc/doloop.c @@ -24,7 +24,6 @@ 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" @@ -469,9 +468,9 @@ doloop_modify (loop, iterations, iterations_max, if (GET_CODE (count) == CONST_INT) count = GEN_INT (INTVAL (count) - 1); else - count = expand_binop (GET_MODE (counter_reg), sub_optab, - count, GEN_INT (1), - 0, 0, OPTAB_LIB_WIDEN); + count = expand_simple_binop (GET_MODE (counter_reg), MINUS, + count, GEN_INT (1), + 0, 0, OPTAB_LIB_WIDEN); } /* Insert initialization of the count register into the loop header. */ @@ -592,10 +591,10 @@ doloop_modify_runtime (loop, iterations_max, start_sequence (); /* abs (final - initial) */ - diff = expand_binop (mode, sub_optab, - copy_rtx (neg_inc ? initial_value : final_value), - copy_rtx (neg_inc ? final_value : initial_value), - NULL_RTX, unsigned_p, OPTAB_LIB_WIDEN); + diff = expand_simple_binop (mode, MINUS, + copy_rtx (neg_inc ? initial_value : final_value), + copy_rtx (neg_inc ? final_value : initial_value), + NULL_RTX, unsigned_p, OPTAB_LIB_WIDEN); if (abs_inc * loop_info->unroll_number != 1) { @@ -609,18 +608,18 @@ doloop_modify_runtime (loop, iterations_max, abort (); /* abs (final - initial) / (abs_inc * unroll_number) */ - iterations = expand_binop (GET_MODE (diff), lshr_optab, - diff, GEN_INT (shift_count), - NULL_RTX, 1, - OPTAB_LIB_WIDEN); + iterations = expand_simple_binop (GET_MODE (diff), LSHIFTRT, + diff, GEN_INT (shift_count), + NULL_RTX, 1, + OPTAB_LIB_WIDEN); if (abs_inc != 1) { /* abs (final - initial) % (abs_inc * unroll_number) */ - extra = expand_binop (GET_MODE (iterations), and_optab, - diff, GEN_INT (abs_inc * loop_info->unroll_number - 1), - NULL_RTX, 1, - OPTAB_LIB_WIDEN); + rtx count = GEN_INT (abs_inc * loop_info->unroll_number - 1); + extra = expand_simple_binop (GET_MODE (iterations), AND, + diff, count, NULL_RTX, 1, + OPTAB_LIB_WIDEN); /* If (abs (final - initial) % (abs_inc * unroll_number) <= abs_inc * (unroll - 1)), @@ -634,10 +633,10 @@ doloop_modify_runtime (loop, iterations_max, LABEL_NUSES (label)++; /* Increment the iteration count by one. */ - iterations = expand_binop (GET_MODE (iterations), add_optab, - iterations, GEN_INT (1), - iterations, 1, - OPTAB_LIB_WIDEN); + iterations = expand_simple_binop (GET_MODE (iterations), PLUS, + iterations, GEN_INT (1), + iterations, 1, + OPTAB_LIB_WIDEN); emit_label (label); } |