From: Nathan Sidwell Date: Sun, 8 May 2005 09:37:17 +0000 (+0000) Subject: mn10300.c (print_operand): Use gcc_assert and gcc_unreachable as appropriate. X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=dc759020e81ab9c7083653aef86dfa9fcd5cdec3;p=platform%2Fupstream%2Fgcc.git mn10300.c (print_operand): Use gcc_assert and gcc_unreachable as appropriate. * config/mn10300/mn10300.c (print_operand): Use gcc_assert and gcc_unreachable as appropriate. (print_operand_address, mn10300_print_reg_list, expand_prologue, expand_epilogue, notice_update_cc, initial_offset, mn10300_address_cost_1): Likewise. * config/mn10300/mn10300.md: Likewise. (absdf2, abssf2, negdf2, negsf2): Likewise. From-SVN: r99382 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 75d0064..38bc458 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,13 @@ +2005-05-08 Nathan Sidwell + + * config/mn10300/mn10300.c (print_operand): Use gcc_assert and + gcc_unreachable as appropriate. + (print_operand_address, mn10300_print_reg_list, expand_prologue, + expand_epilogue, notice_update_cc, initial_offset, + mn10300_address_cost_1): Likewise. + * config/mn10300/mn10300.md: Likewise. + (absdf2, abssf2, negdf2, negsf2): Likewise. + 2005-05-08 Richard Sandiford PR target/21416 diff --git a/gcc/config/mn10300/mn10300.c b/gcc/config/mn10300/mn10300.c index a552b8b..2c36223 100644 --- a/gcc/config/mn10300/mn10300.c +++ b/gcc/config/mn10300/mn10300.c @@ -220,7 +220,7 @@ print_operand (FILE *file, rtx x, int code) fprintf (file, "ul"); break; default: - abort (); + gcc_unreachable (); } break; } @@ -258,7 +258,7 @@ print_operand (FILE *file, rtx x, int code) fprintf (file, "cs"); break; default: - abort (); + gcc_unreachable (); } break; case 'C': @@ -289,7 +289,7 @@ print_operand (FILE *file, rtx x, int code) break; default: - abort (); + gcc_unreachable (); } break; @@ -348,7 +348,7 @@ print_operand (FILE *file, rtx x, int code) } default: - abort (); + gcc_unreachable (); } break; @@ -384,7 +384,7 @@ print_operand (FILE *file, rtx x, int code) fprintf (file, "0x%lx", val[1]); break;; case SFmode: - abort (); + gcc_unreachable (); case VOIDmode: case DImode: print_operand_address (file, @@ -405,7 +405,7 @@ print_operand (FILE *file, rtx x, int code) } default: - abort (); + gcc_unreachable (); } break; @@ -419,14 +419,12 @@ print_operand (FILE *file, rtx x, int code) break; case 'N': - if (INTVAL (x) < -128 || INTVAL (x) > 255) - abort (); + gcc_assert (INTVAL (x) >= -128 && INTVAL (x) <= 255); fprintf (file, "%d", (int)((~INTVAL (x)) & 0xff)); break; case 'U': - if (INTVAL (x) < -128 || INTVAL (x) > 255) - abort (); + gcc_assert (INTVAL (x) >= -128 && INTVAL (x) <= 255); fprintf (file, "%d", (int)(INTVAL (x) & 0xff)); break; @@ -484,7 +482,7 @@ print_operand (FILE *file, rtx x, int code) print_operand_address (file, x); break; default: - abort (); + gcc_unreachable (); } break; } @@ -514,7 +512,7 @@ print_operand_address (FILE *file, rtx addr) && REG_OK_FOR_BASE_P (XEXP (addr, 1))) base = XEXP (addr, 1), index = XEXP (addr, 0); else - abort (); + gcc_unreachable (); print_operand (file, index, 0); fputc (',', file); print_operand (file, base, 0);; @@ -571,8 +569,7 @@ mn10300_print_reg_list (FILE *file, int mask) if ((mask & 0x3c000) != 0) { - if ((mask & 0x3c000) != 0x3c000) - abort(); + gcc_assert ((mask & 0x3c000) == 0x3c000); if (need_comma) fputc (',', file); fputs ("exreg1", file); @@ -883,7 +880,7 @@ expand_prologue (void) break; default: - abort (); + gcc_unreachable (); } /* Now prepare register a0, if we have decided to use it. */ @@ -905,7 +902,7 @@ expand_prologue (void) break; default: - abort (); + gcc_unreachable (); } /* Now actually save the FP registers. */ @@ -1121,7 +1118,7 @@ expand_epilogue (void) break; default: - abort (); + gcc_unreachable (); } } @@ -1252,7 +1249,7 @@ notice_update_cc (rtx body, rtx insn) break; default: - abort (); + gcc_unreachable (); } } @@ -1443,7 +1440,7 @@ initial_offset (int from, int to) + (current_function_outgoing_args_size ? current_function_outgoing_args_size + 4 : 0)); - abort (); + gcc_unreachable (); } /* Worker function for TARGET_RETURN_IN_MEMORY. */ @@ -1936,7 +1933,7 @@ mn10300_address_cost_1 (rtx x, int *unsig) return 5; default: - abort (); + gcc_unreachable (); } case PLUS: @@ -1973,7 +1970,7 @@ mn10300_address_cost_1 (rtx x, int *unsig) return 8; default: - abort (); + gcc_unreachable (); } } diff --git a/gcc/config/mn10300/mn10300.md b/gcc/config/mn10300/mn10300.md index 0d51857..7dc9499 100644 --- a/gcc/config/mn10300/mn10300.md +++ b/gcc/config/mn10300/mn10300.md @@ -109,7 +109,7 @@ case 6: return \"fmov %1,%0\"; default: - abort (); + gcc_unreachable (); } }" [(set_attr "cc" "none,clobber,none_0hit,none_0hit,none_0hit,none_0hit,none_0hit")]) @@ -142,7 +142,7 @@ case 4: return \"movbu %1,%0\"; default: - abort (); + gcc_unreachable (); } }" [(set_attr "cc" "none,clobber,none_0hit,none_0hit,none_0hit")]) @@ -202,7 +202,7 @@ case 6: return \"fmov %1,%0\"; default: - abort (); + gcc_unreachable (); } }" [(set_attr "cc" "none,clobber,none_0hit,none_0hit,none_0hit,none_0hit,none_0hit")]) @@ -234,7 +234,7 @@ case 4: return \"movhu %1,%0\"; default: - abort (); + gcc_unreachable (); } }" [(set_attr "cc" "none,clobber,none_0hit,none_0hit,none_0hit")]) @@ -378,7 +378,7 @@ case 16: return \"fmov %1,%0\"; default: - abort (); + gcc_unreachable (); } }" [(set_attr "cc" "none,none,clobber,none_0hit,none_0hit,none_0hit,none_0hit,none_0hit,none_0hit,none_0hit,none_0hit,none_0hit,none_0hit,none_0hit,none,none_0hit,none_0hit")]) @@ -428,7 +428,7 @@ } return \"mov %1,%0\"; default: - abort (); + gcc_unreachable (); } }" [(set_attr "cc" "none,none,none,clobber,none_0hit,none_0hit,none_0hit,none_0hit,none_0hit")]) @@ -509,8 +509,7 @@ while (GET_CODE (temp) == SUBREG) temp = SUBREG_REG (temp); - if (GET_CODE (temp) != REG) - abort (); + gcc_assert (GET_CODE (temp) == REG); if (reg_overlap_mentioned_p (gen_rtx_REG (SImode, REGNO (temp)), XEXP (operands[1], 0))) @@ -598,7 +597,7 @@ else return \"fmov %L1, %L0\;fmov %H1, %H0\"; default: - abort (); + gcc_unreachable (); } }" [(set (attr "cc") @@ -721,8 +720,7 @@ while (GET_CODE (temp) == SUBREG) temp = SUBREG_REG (temp); - if (GET_CODE (temp) != REG) - abort (); + gcc_assert (GET_CODE (temp) == REG); if (reg_overlap_mentioned_p (gen_rtx_REG (SImode, REGNO (temp)), XEXP (operands[1], 0))) @@ -790,7 +788,7 @@ return \"\"; } default: - abort (); + gcc_unreachable (); } }" [(set (attr "cc") @@ -971,7 +969,7 @@ return \"mov %2,%0\;add %1,%0\"; } default: - abort (); + gcc_unreachable (); } }" [(set_attr "cc" "set_zn,none_0hit,set_zn,none_0hit,set_zn,none_0hit,set_zn")]) @@ -1013,7 +1011,7 @@ return \"mov %1,%0\;add %2,%0\"; return \"mov %2,%0\;add %1,%0\"; default: - abort (); + gcc_unreachable (); } }" [(set_attr "cc" "set_zn,none_0hit,none_0hit,set_zn,none_0hit,set_zn")]) @@ -2187,8 +2185,7 @@ operand_subword_force (operands[1], 1, DFmode), GEN_INT (0x7fffffff), target, 0, OPTAB_WIDEN); - if (result == 0) - abort (); + gcc_assert (result); if (result != target) emit_move_insn (result, target); @@ -2222,8 +2219,7 @@ result = expand_binop (SImode, and_optab, operand_subword_force (operands[1], 0, SFmode), GEN_INT (0x7fffffff), target, 0, OPTAB_WIDEN); - if (result == 0) - abort (); + gcc_assert (result); if (result != target) emit_move_insn (result, target); @@ -2258,8 +2254,7 @@ GEN_INT (trunc_int_for_mode (0x80000000, SImode)), target, 0, OPTAB_WIDEN); - if (result == 0) - abort (); + gcc_assert (result); if (result != target) emit_move_insn (result, target); @@ -2294,8 +2289,7 @@ operand_subword_force (operands[1], 0, SFmode), GEN_INT (trunc_int_for_mode (0x80000000, SImode)), target, 0, OPTAB_WIDEN); - if (result == 0) - abort (); + gcc_assert (result); if (result != target) emit_move_insn (result, target);