diff options
author | Nathan Sidwell <nathan@gcc.gnu.org> | 2004-09-08 08:05:14 +0000 |
---|---|---|
committer | Nathan Sidwell <nathan@gcc.gnu.org> | 2004-09-08 08:05:14 +0000 |
commit | 5b0264cb4d7a017784253061843a52f7776a3942 (patch) | |
tree | 33b0784e8edadfbdb707175909731132a211267f /gcc/explow.c | |
parent | ced3f397be6d68ba9a838ee7e3f27c456238501a (diff) | |
download | gcc-5b0264cb4d7a017784253061843a52f7776a3942.tar.gz |
emit-rtl.c (immed_double_const): Use gcc_assert and gcc_unreachable.
* emit-rtl.c (immed_double_const): Use gcc_assert and gcc_unreachable.
(gen_rtx_SUBREG, gen_reg_rtx, mark_user_reg, subreg_hard_regno,
gen_lowpart_common, gen_highpart, gen_highpart_mode,
subreg_highpart_offset, operand_subword, operand_subword_force,
mem_expr_equal_p, set_mem_attributes_minus_bitpos,
set_mem_alias_set, change_address_1, verify_rtx_sharing,
copy_most_rtx, set_first_insn, set_last_insn, prev_cc0_setter,
try_split, add_insn_after, add_insn_before, remove_insn,
remove_unnecessary_notes, emit_insn_before, emit_jump_insn_before,
emit_call_insn_before, emit_insn_after, emit_jump_insn_after,
emit_call_insn_after, emit_insn, emit_jump_insn, emit_call_insn,
set_unique_reg_note, emit, push_to_full_sequence, copy_insn_1,
gen_const_vector_0, emit_copy_of_insn_after): Likewise.
* et-forest.c (set_prev, set_next, et_check_occ_sanity,
record_path_before_1, check_path_after_1, check_path_after): Likewise.
* except.c (gen_eh_region, resolve_one_fixup_region,
remove_unreachable_regions, convert_from_eh_region_ranges_1,
add_ehl_entry, duplicate_eh_region_1, build_post_landing_pads,
connect_post_landing_pads, sjlj_emit_function_exit,
remove_exception_handler_label, remove_eh_handler,
reachable_next_level, collect_one_action_chain,
output_function_exception_table): Likewise.
* explow.c (trunc_int_for_mode, copy_to_mode_reg,
optimize_save_area_alloca, allocate_dynamic_stack_space,
probe_stack_range, hard_function_value): Likewise.
* expmed.c (mode_for_extraction, store_bit_field,
store_fixed_bit_field, extract_bit_field, expand_shift,
expand_mult_const, expand_mult, choose_multiplier,
expand_mult_highpart, expand_divmod, emit_store_flag,
do_cmp_and_jump): Likewise.
* expr.c (convert_move, convert_modes, move_by_pieces,
move_by_pieces_ninsns, move_by_pieces_1, emit_block_move,
move_block_from_reg, gen_group_rtx, emit_group_load,
emit_group_move, emit_group_store, use_reg, use_regs,
can_store_by_pieces, store_by_pieces, store_by_pieces_1,
emit_move_insn, emit_move_insn_1, emit_push_insn,
expand_assignment, store_expr, count_type_elements,
store_constructor, store_field, safe_from_p, expand_var,
expand_expr_addr_expr, expand_expr_real_1, do_store_flag): Likewise.
From-SVN: r87178
Diffstat (limited to 'gcc/explow.c')
-rw-r--r-- | gcc/explow.c | 31 |
1 files changed, 12 insertions, 19 deletions
diff --git a/gcc/explow.c b/gcc/explow.c index 47cb8671e27..62ca87c3ca0 100644 --- a/gcc/explow.c +++ b/gcc/explow.c @@ -50,8 +50,7 @@ trunc_int_for_mode (HOST_WIDE_INT c, enum machine_mode mode) int width = GET_MODE_BITSIZE (mode); /* You want to truncate to a _what_? */ - if (! SCALAR_INT_MODE_P (mode)) - abort (); + gcc_assert (SCALAR_INT_MODE_P (mode)); /* Canonicalize BImode to 0 and STORE_FLAG_VALUE. */ if (mode == BImode) @@ -633,8 +632,7 @@ copy_to_mode_reg (enum machine_mode mode, rtx x) if (! general_operand (x, VOIDmode)) x = force_operand (x, temp); - if (GET_MODE (x) != mode && GET_MODE (x) != VOIDmode) - abort (); + gcc_assert (GET_MODE (x) == mode || GET_MODE (x) == VOIDmode); if (x != temp) emit_move_insn (temp, x); return temp; @@ -1106,11 +1104,10 @@ optimize_save_area_alloca (void) Right now only supported port with stack that grow upward is the HPPA and it does not define SETJMP_VIA_SAVE_AREA. */ - if (GET_CODE (pat) != SET - || SET_DEST (pat) != stack_pointer_rtx - || GET_CODE (SET_SRC (pat)) != MINUS - || XEXP (SET_SRC (pat), 0) != stack_pointer_rtx) - abort (); + gcc_assert (GET_CODE (pat) == SET + && SET_DEST (pat) == stack_pointer_rtx + && GET_CODE (SET_SRC (pat)) == MINUS + && XEXP (SET_SRC (pat), 0) == stack_pointer_rtx); /* This will now be transformed into a (set REG REG) so we can just blow away all the other notes. */ @@ -1134,8 +1131,7 @@ optimize_save_area_alloca (void) if (XEXP (srch, 1) == note) break; - if (srch == NULL_RTX) - abort (); + gcc_assert (srch); XEXP (srch, 1) = XEXP (note, 1); } @@ -1229,8 +1225,7 @@ allocate_dynamic_stack_space (rtx size, rtx target, int known_align) /* ??? Code below assumes that the save area needs maximal alignment. This constraint may be too strong. */ - if (PREFERRED_STACK_BOUNDARY != BIGGEST_ALIGNMENT) - abort (); + gcc_assert (PREFERRED_STACK_BOUNDARY == BIGGEST_ALIGNMENT); if (GET_CODE (size) == CONST_INT) { @@ -1287,8 +1282,8 @@ allocate_dynamic_stack_space (rtx size, rtx target, int known_align) /* We ought to be called always on the toplevel and stack ought to be aligned properly. */ - if (stack_pointer_delta % (PREFERRED_STACK_BOUNDARY / BITS_PER_UNIT)) - abort (); + gcc_assert (!(stack_pointer_delta + % (PREFERRED_STACK_BOUNDARY / BITS_PER_UNIT))); /* If needed, check that we have the required amount of stack. Take into account what has already been checked. */ @@ -1539,8 +1534,7 @@ probe_stack_range (HOST_WIDE_INT first, rtx size) 1, OPTAB_WIDEN); #endif - if (temp != test_addr) - abort (); + gcc_assert (temp == test_addr); emit_label (test_lab); emit_cmp_and_jump_insns (test_addr, last_addr, CMP_OPCODE, @@ -1594,8 +1588,7 @@ hard_function_value (tree valtype, tree func ATTRIBUTE_UNUSED, } /* No suitable mode found. */ - if (tmpmode == VOIDmode) - abort (); + gcc_assert (tmpmode != VOIDmode); PUT_MODE (val, tmpmode); } |