X-Git-Url: http://git.sourceforge.jp/view?p=pf3gnuchains%2Fgcc-fork.git;a=blobdiff_plain;f=gcc%2Fexpr.c;h=cd530d0a4f424abb94f3798d14b0d91953c92309;hp=ff3867e59ecc4813970408701c8d622080dc44f0;hb=467829319b1fd38f35b497a6ebb34faebd0c0046;hpb=862f468ce622f6c9109267cace894779cd46b851 diff --git a/gcc/expr.c b/gcc/expr.c index ff3867e59ec..cd530d0a4f4 100644 --- a/gcc/expr.c +++ b/gcc/expr.c @@ -151,7 +151,7 @@ static int is_aligning_offset (const_tree, const_tree); static void expand_operands (tree, tree, rtx, rtx*, rtx*, enum expand_modifier); static rtx reduce_to_bit_field_precision (rtx, rtx, tree); -static rtx do_store_flag (tree, rtx, enum machine_mode, int); +static rtx do_store_flag (tree, rtx, enum machine_mode); #ifdef PUSH_ROUNDING static void emit_single_push_insn (enum machine_mode, rtx, tree); #endif @@ -234,7 +234,6 @@ enum insn_code sync_new_and_optab[NUM_MACHINE_MODES]; enum insn_code sync_new_xor_optab[NUM_MACHINE_MODES]; enum insn_code sync_new_nand_optab[NUM_MACHINE_MODES]; enum insn_code sync_compare_and_swap[NUM_MACHINE_MODES]; -enum insn_code sync_compare_and_swap_cc[NUM_MACHINE_MODES]; enum insn_code sync_lock_test_and_set[NUM_MACHINE_MODES]; enum insn_code sync_lock_release[NUM_MACHINE_MODES]; @@ -588,27 +587,9 @@ convert_move (rtx to, rtx from, int unsignedp) if (unsignedp) fill_value = const0_rtx; else - { -#ifdef HAVE_slt - if (HAVE_slt - && insn_data[(int) CODE_FOR_slt].operand[0].mode == word_mode - && STORE_FLAG_VALUE == -1) - { - emit_cmp_insn (lowfrom, const0_rtx, NE, NULL_RTX, - lowpart_mode, 0); - fill_value = gen_reg_rtx (word_mode); - emit_insn (gen_slt (fill_value)); - } - else -#endif - { - fill_value - = expand_shift (RSHIFT_EXPR, lowpart_mode, lowfrom, - size_int (GET_MODE_BITSIZE (lowpart_mode) - 1), - NULL_RTX, 0); - fill_value = convert_to_mode (word_mode, fill_value, 1); - } - } + fill_value = emit_store_flag (gen_reg_rtx (word_mode), + LT, lowfrom, const0_rtx, + VOIDmode, 0, -1); /* Fill the remaining words. */ for (i = GET_MODE_SIZE (lowpart_mode) / UNITS_PER_WORD; i < nwords; i++) @@ -9042,7 +9023,7 @@ expand_expr_real_1 (tree exp, rtx target, enum machine_mode tmode, case LTGT_EXPR: temp = do_store_flag (exp, modifier != EXPAND_STACK_PARM ? target : NULL_RTX, - tmode != VOIDmode ? tmode : mode, 0); + tmode != VOIDmode ? tmode : mode); if (temp != 0) return temp; @@ -9697,9 +9678,6 @@ string_constant (tree arg, tree *ptr_offset) If TARGET is nonzero, store the result there if convenient. - If ONLY_CHEAP is nonzero, only do this if it is likely to be very - cheap. - Return zero if there is no suitable set-flag instruction available on this machine. @@ -9712,7 +9690,7 @@ string_constant (tree arg, tree *ptr_offset) set/jump/set sequence. */ static rtx -do_store_flag (tree exp, rtx target, enum machine_mode mode, int only_cheap) +do_store_flag (tree exp, rtx target, enum machine_mode mode) { enum rtx_code code; tree arg0, arg1, type; @@ -9721,7 +9699,6 @@ do_store_flag (tree exp, rtx target, enum machine_mode mode, int only_cheap) int invert = 0; int unsignedp; rtx op0, op1; - enum insn_code icode; rtx subtarget = target; rtx result, label; @@ -9865,37 +9842,6 @@ do_store_flag (tree exp, rtx target, enum machine_mode mode, int only_cheap) if (! can_compare_p (code, operand_mode, ccp_store_flag)) return 0; - icode = setcc_gen_code[(int) code]; - - if (icode == CODE_FOR_nothing) - { - enum machine_mode wmode; - - for (wmode = operand_mode; - icode == CODE_FOR_nothing && wmode != VOIDmode; - wmode = GET_MODE_WIDER_MODE (wmode)) - icode = optab_handler (cstore_optab, wmode)->insn_code; - } - - if (icode == CODE_FOR_nothing - || (only_cheap && insn_data[(int) icode].operand[0].mode != mode)) - { - /* We can only do this if it is one of the special cases that - can be handled without an scc insn. */ - if ((code == LT && integer_zerop (arg1)) - || (! only_cheap && code == GE && integer_zerop (arg1))) - ; - else if (! only_cheap && (code == NE || code == EQ) - && TREE_CODE (type) != REAL_TYPE - && ((optab_handler (abs_optab, operand_mode)->insn_code - != CODE_FOR_nothing) - || (optab_handler (ffs_optab, operand_mode)->insn_code - != CODE_FOR_nothing))) - ; - else - return 0; - } - if (! get_subtarget (target) || GET_MODE (subtarget) != operand_mode) subtarget = 0;