diff options
author | nathan <nathan@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-05-09 12:10:29 +0000 |
---|---|---|
committer | nathan <nathan@138bc75d-0d04-0410-961f-82ee72b054a4> | 2005-05-09 12:10:29 +0000 |
commit | 797d223e6bb3fa1b5c602887b771d699889c21b7 (patch) | |
tree | a99910a278a74f302e7dca4862ab350590d3b489 /gcc/config/iq2000 | |
parent | cbea0c792c6083587fb70dab3782f245b7e90b45 (diff) | |
download | gcc-797d223e6bb3fa1b5c602887b771d699889c21b7.tar.gz |
* config/iq2000/iq2000.c (abort_with_insn): Use fancy_abort.
(gen_int_relational): Use gcc_unreachable and gcc_assert as necessary.
(function_arg_advance, function_arg, save_restore_insns,
iq2000_expand_prologue, iq2000_output_conditional_branch,
expand_one_builtin, print_operand):
* config/iq2000/iq2000.md (tablejump): Likewise.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@99432 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/config/iq2000')
-rw-r--r-- | gcc/config/iq2000/iq2000.c | 40 | ||||
-rw-r--r-- | gcc/config/iq2000/iq2000.md | 3 |
2 files changed, 14 insertions, 29 deletions
diff --git a/gcc/config/iq2000/iq2000.c b/gcc/config/iq2000/iq2000.c index bb695e940bb..91bb128f525 100644 --- a/gcc/config/iq2000/iq2000.c +++ b/gcc/config/iq2000/iq2000.c @@ -500,7 +500,7 @@ abort_with_insn (rtx insn, const char * reason) { error (reason); debug_rtx (insn); - abort (); + fancy_abort (__FILE__, __LINE__, __FUNCTION__); } /* Return the appropriate instructions to move one operand to another. */ @@ -872,8 +872,7 @@ gen_int_relational (enum rtx_code test_code, rtx result, rtx cmp0, rtx cmp1, rtx reg2; test = map_test_to_internal_test (test_code); - if (test == ITEST_MAX) - abort (); + gcc_assert (test != ITEST_MAX); p_info = &info[(int) test]; eqne_p = (p_info->test_code == XOR); @@ -1136,9 +1135,8 @@ function_arg_advance (CUMULATIVE_ARGS *cum, enum machine_mode mode, tree type, break; default: - if (GET_MODE_CLASS (mode) != MODE_COMPLEX_INT - && GET_MODE_CLASS (mode) != MODE_COMPLEX_FLOAT) - abort (); + gcc_assert (GET_MODE_CLASS (mode) == MODE_COMPLEX_INT + || GET_MODE_CLASS (mode) == MODE_COMPLEX_FLOAT); cum->gp_reg_found = 1; cum->arg_words += ((GET_MODE_SIZE (mode) + UNITS_PER_WORD - 1) @@ -1218,9 +1216,8 @@ function_arg (CUMULATIVE_ARGS *cum, enum machine_mode mode, tree type, break; default: - if (GET_MODE_CLASS (mode) != MODE_COMPLEX_INT - && GET_MODE_CLASS (mode) != MODE_COMPLEX_FLOAT) - abort (); + gcc_assert (GET_MODE_CLASS (mode) == MODE_COMPLEX_INT + || GET_MODE_CLASS (mode) == MODE_COMPLEX_FLOAT); /* Drops through. */ case BLKmode: @@ -1250,8 +1247,7 @@ function_arg (CUMULATIVE_ARGS *cum, enum machine_mode mode, tree type, } else { - if (regbase == -1) - abort (); + gcc_assert (regbase != -1); if (! type || TREE_CODE (type) != RECORD_TYPE || ! named || ! TYPE_SIZE_UNIT (type) @@ -1781,9 +1777,8 @@ save_restore_insns (int store_p) HOST_WIDE_INT gp_offset; HOST_WIDE_INT end_offset; - if (frame_pointer_needed - && ! BITSET_P (mask, HARD_FRAME_POINTER_REGNUM - GP_REG_FIRST)) - abort (); + gcc_assert (!frame_pointer_needed + || BITSET_P (mask, HARD_FRAME_POINTER_REGNUM - GP_REG_FIRST)); if (mask == 0) { @@ -1923,8 +1918,7 @@ iq2000_expand_prologue (void) { int words; - if (GET_CODE (entry_parm) != REG) - abort (); + gcc_assert (GET_CODE (entry_parm) == REG); /* Passed in a register, so will get homed automatically. */ if (GET_MODE (entry_parm) == BLKmode) @@ -2430,7 +2424,7 @@ iq2000_output_conditional_branch (rtx insn, rtx * operands, int two_operands_p, } default: - abort (); + gcc_unreachable (); } /* NOTREACHED */ @@ -2637,7 +2631,7 @@ expand_one_builtin (enum insn_code icode, rtx target, tree arglist, pat = GEN_FCN (icode) (op[0], op[1], op[2], op[3]); break; default: - abort (); + gcc_unreachable (); } if (! pat) @@ -3142,15 +3136,7 @@ print_operand (FILE *file, rtx op, int letter) else if (letter == 'Z') { - int regnum; - - if (code != REG) - abort (); - - regnum = REGNO (op); - abort (); - - fprintf (file, "%s,", reg_names[regnum]); + gcc_unreachable (); } else if (code == REG || code == SUBREG) diff --git a/gcc/config/iq2000/iq2000.md b/gcc/config/iq2000/iq2000.md index 208b82c2b9d..0528a12e88d 100644 --- a/gcc/config/iq2000/iq2000.md +++ b/gcc/config/iq2000/iq2000.md @@ -1729,8 +1729,7 @@ { if (operands[0]) /* eliminate unused code warnings */ { - if (GET_MODE (operands[0]) != Pmode) - abort (); + gcc_assert (GET_MODE (operands[0]) == Pmode); if (!(Pmode == DImode)) emit_jump_insn (gen_tablejump_internal1 (operands[0], operands[1])); |