void bc_load_parmaddr PROTO((rtx));
static void preexpand_calls PROTO((tree));
static void do_jump_by_parts_greater PROTO((tree, int, rtx, rtx));
-static void do_jump_by_parts_greater_rtx PROTO((enum machine_mode, int, rtx, rtx, rtx, rtx));
+void do_jump_by_parts_greater_rtx PROTO((enum machine_mode, int, rtx, rtx, rtx, rtx));
static void do_jump_by_parts_equality PROTO((tree, rtx, rtx));
static void do_jump_by_parts_equality_rtx PROTO((rtx, rtx, rtx));
static void do_jump_for_compare PROTO((rtx, rtx, rtx));
if (TREE_UNSIGNED (type))
return op0;
- /* First try to do it with a special abs instruction. */
- temp = expand_unop (mode, abs_optab, op0, target, 0);
- if (temp != 0)
- return temp;
-
- /* If this machine has expensive jumps, we can do integer absolute
- value of X as (((signed) x >> (W-1)) ^ x) - ((signed) x >> (W-1)),
- where W is the width of MODE. */
-
- if (GET_MODE_CLASS (mode) == MODE_INT && BRANCH_COST >= 2)
- {
- rtx extended = expand_shift (RSHIFT_EXPR, mode, op0,
- size_int (GET_MODE_BITSIZE (mode) - 1),
- NULL_RTX, 0);
-
- temp = expand_binop (mode, xor_optab, extended, op0, target, 0,
- OPTAB_LIB_WIDEN);
- if (temp != 0)
- temp = expand_binop (mode, sub_optab, temp, extended, target, 0,
- OPTAB_LIB_WIDEN);
-
- if (temp != 0)
- return temp;
- }
-
- /* If that does not win, use conditional jump and negate. */
- target = original_target;
- op1 = gen_label_rtx ();
- if (target == 0 || ! safe_from_p (target, TREE_OPERAND (exp, 0))
- || GET_MODE (target) != mode
- || (GET_CODE (target) == MEM && MEM_VOLATILE_P (target))
- || (GET_CODE (target) == REG
- && REGNO (target) < FIRST_PSEUDO_REGISTER))
- target = gen_reg_rtx (mode);
-
- emit_move_insn (target, op0);
- NO_DEFER_POP;
-
- /* If this mode is an integer too wide to compare properly,
- compare word by word. Rely on CSE to optimize constant cases. */
- if (GET_MODE_CLASS (mode) == MODE_INT && ! can_compare_p (mode))
- do_jump_by_parts_greater_rtx (mode, 0, target, const0_rtx,
- NULL_RTX, op1);
- else
- {
- temp = compare_from_rtx (target, CONST0_RTX (mode), GE, 0, mode,
- NULL_RTX, 0);
- if (temp == const1_rtx)
- return target;
- else if (temp != const0_rtx)
- {
- if (bcc_gen_fctn[(int) GET_CODE (temp)] != 0)
- emit_jump_insn ((*bcc_gen_fctn[(int) GET_CODE (temp)]) (op1));
- else
- abort ();
- }
- }
-
- op0 = expand_unop (mode, neg_optab, target, target, 0);
- if (op0 != target)
- emit_move_insn (target, op0);
- emit_label (op1);
- OK_DEFER_POP;
- return target;
+ return expand_abs (mode, op0, target, unsignedp,
+ safe_from_p (target, TREE_OPERAND (exp, 0)));
case MAX_EXPR:
case MIN_EXPR:
UNSIGNEDP says to do unsigned comparison.
Jump to IF_TRUE_LABEL if OP0 is greater, IF_FALSE_LABEL otherwise. */
-static void
+void
do_jump_by_parts_greater_rtx (mode, unsignedp, op0, op1, if_false_label, if_true_label)
enum machine_mode mode;
int unsignedp;