aboutsummaryrefslogtreecommitdiff
path: root/gcc/expr.c
diff options
context:
space:
mode:
authorJeffrey A Law <law@cygnus.com>1999-02-14 20:08:39 +0000
committerJeff Law <law@gcc.gnu.org>1999-02-14 13:08:39 -0700
commitc5d5d461419c704497a2635330bf0cd5c5014eab (patch)
treec29b256d986d0f06f6c18f5de1ad3725b91cd3e1 /gcc/expr.c
parentd4ddd7b97734bcfa0aa968b50d9d3439d4f302c3 (diff)
downloadgcc-c5d5d461419c704497a2635330bf0cd5c5014eab.zip
gcc-c5d5d461419c704497a2635330bf0cd5c5014eab.tar.gz
gcc-c5d5d461419c704497a2635330bf0cd5c5014eab.tar.bz2
except.c (start_catch_handler): Use emit_cmp_and_jump_insns.
* except.c (start_catch_handler): Use emit_cmp_and_jump_insns. * explow.c (probe_stack_range): Likewise. * expmed.c (do_cmp_and_jump): Likewise. * expr.c (store_expr, expand_expr, expand_builtin): Likewise. (do_tablejump): Likewise. * stmt.c (expand_expr_stmt, expand_end_case): Likewise. (do_jump_if_equal, emit_case_nodes): Likewise. * optabs.c (emit_cmp_and_jump_insns): Clarify comments. If UNSIGNEDP, then convert comparison to an unsigned code before emitting the jump. (expand_float, expand_fix): Use emit_cmp_and_jump_insns. From-SVN: r25205
Diffstat (limited to 'gcc/expr.c')
-rw-r--r--gcc/expr.c28
1 files changed, 12 insertions, 16 deletions
diff --git a/gcc/expr.c b/gcc/expr.c
index 5eca5f5..63d9155 100644
--- a/gcc/expr.c
+++ b/gcc/expr.c
@@ -3784,10 +3784,9 @@ store_expr (exp, target, want_value)
copy_size_rtx, NULL_RTX, 0,
OPTAB_LIB_WIDEN);
- emit_cmp_insn (size, const0_rtx, LT, NULL_RTX,
- GET_MODE (size), 0, 0);
label = gen_label_rtx ();
- emit_jump_insn (gen_blt (label));
+ emit_cmp_and_jump_insns (size, const0_rtx, LT, NULL_RTX,
+ GET_MODE (size), 0, 0, label);
}
if (size != const0_rtx)
@@ -6653,17 +6652,15 @@ expand_expr (exp, target, tmode, modifier)
if (! (GET_CODE (index_val) == CONST_INT
&& GET_CODE (lo_r) == CONST_INT))
{
- emit_cmp_insn (index_val, lo_r, LT, NULL_RTX,
- GET_MODE (index_val), iunsignedp, 0);
- emit_jump_insn (gen_blt (op1));
+ emit_cmp_and_jump_insns (index_val, lo_r, LT, NULL_RTX,
+ GET_MODE (index_val), iunsignedp, 0, op1);
}
if (! (GET_CODE (index_val) == CONST_INT
&& GET_CODE (hi_r) == CONST_INT))
{
- emit_cmp_insn (index_val, hi_r, GT, NULL_RTX,
- GET_MODE (index_val), iunsignedp, 0);
- emit_jump_insn (gen_bgt (op1));
+ emit_cmp_and_jump_insns (index_val, hi_r, GT, NULL_RTX,
+ GET_MODE (index_val), iunsignedp, 0, op1);
}
/* Calculate the element number of bit zero in the first word
@@ -7361,9 +7358,8 @@ expand_expr (exp, target, tmode, modifier)
temp = copy_to_reg (temp);
op1 = gen_label_rtx ();
- emit_cmp_insn (temp, const0_rtx, EQ, NULL_RTX,
- GET_MODE (temp), unsignedp, 0);
- emit_jump_insn (gen_beq (op1));
+ emit_cmp_and_jump_insns (temp, const0_rtx, EQ, NULL_RTX,
+ GET_MODE (temp), unsignedp, 0, op1);
emit_move_insn (temp, const1_rtx);
emit_label (op1);
return temp;
@@ -8709,8 +8705,8 @@ expand_builtin (exp, target, subtarget, mode, ignore)
/* Test the result; if it is NaN, set errno=EDOM because
the argument was not in the domain. */
- emit_cmp_insn (target, target, EQ, 0, GET_MODE (target), 0, 0);
- emit_jump_insn (gen_beq (lab1));
+ emit_cmp_and_jump_insns (target, target, EQ, 0, GET_MODE (target),
+ 0, 0, lab1);
#ifdef TARGET_EDOM
{
@@ -11562,8 +11558,8 @@ do_tablejump (index, mode, range, table_label, default_label)
or equal to the minimum value of the range and less than or equal to
the maximum value of the range. */
- emit_cmp_insn (index, range, GTU, NULL_RTX, mode, 1, 0);
- emit_jump_insn (gen_bgtu (default_label));
+ emit_cmp_and_jump_insns (index, range, GTU, NULL_RTX, mode, 1,
+ 0, default_label);
/* If index is in range, it must fit in Pmode.
Convert to Pmode so we can index with it. */