Commit 4e81e7c2 by Nathan Sidwell Committed by Nathan Sidwell

fr30.c (fr30_expand_prologue): Use gcc_assert and gcc_unreachable as appropriate.


	* config/fr30/fr30.c (fr30_expand_prologue): Use gcc_assert and
	gcc_unreachable as appropriate.
	(fr30_expand_epilogue, fr30_setup_incoming_varargs,
	fr30_print_operand, fr30_move_double): Likewise.
	* config/fr30/fr30.md (*movsi_internal, *movsf_internal): Likewise.

From-SVN: r98991
parent 1fb2002d
2005-04-29 Nathan Sidwell <nathan@codesourcery.com>
* config/fr30/fr30.c (fr30_expand_prologue): Use gcc_assert and
gcc_unreachable as appropriate.
(fr30_expand_epilogue, fr30_setup_incoming_varargs,
fr30_print_operand, fr30_move_double): Likewise.
* config/fr30/fr30.md (*movsi_internal, *movsf_internal): Likewise.
2005-04-29 Mark Mitchell <mark@codesourcery.com> 2005-04-29 Mark Mitchell <mark@codesourcery.com>
* config/arm/arm.h (ARM_EABI_CTORS_SECTION_OP): Do not define if a * config/arm/arm.h (ARM_EABI_CTORS_SECTION_OP): Do not define if a
......
...@@ -243,9 +243,7 @@ fr30_expand_prologue (void) ...@@ -243,9 +243,7 @@ fr30_expand_prologue (void)
fr30_compute_frame_size (0, 0); fr30_compute_frame_size (0, 0);
/* This cases shouldn't happen. Catch it now. */ /* This cases shouldn't happen. Catch it now. */
if (current_frame_info.total_size == 0 gcc_assert (current_frame_info.total_size || !current_frame_info.gmask);
&& current_frame_info.gmask)
abort ();
/* Allocate space for register arguments if this is a variadic function. */ /* Allocate space for register arguments if this is a variadic function. */
if (current_frame_info.pretend_size) if (current_frame_info.pretend_size)
...@@ -367,9 +365,8 @@ fr30_expand_epilogue (void) ...@@ -367,9 +365,8 @@ fr30_expand_epilogue (void)
int regno; int regno;
/* Perform the inversion operations of the prologue. */ /* Perform the inversion operations of the prologue. */
if (! current_frame_info.initialised) gcc_assert (current_frame_info.initialised);
abort ();
/* Pop local variables and arguments off the stack. /* Pop local variables and arguments off the stack.
If frame_pointer_needed is TRUE then the frame pointer register If frame_pointer_needed is TRUE then the frame pointer register
has actually been used as a frame pointer, and we can recover has actually been used as a frame pointer, and we can recover
...@@ -430,8 +427,7 @@ fr30_setup_incoming_varargs (CUMULATIVE_ARGS *arg_regs_used_so_far, ...@@ -430,8 +427,7 @@ fr30_setup_incoming_varargs (CUMULATIVE_ARGS *arg_regs_used_so_far,
int size; int size;
/* All BLKmode values are passed by reference. */ /* All BLKmode values are passed by reference. */
if (mode == BLKmode) gcc_assert (mode != BLKmode);
abort ();
/* ??? This run-time test as well as the code inside the if /* ??? This run-time test as well as the code inside the if
statement is probably unnecessary. */ statement is probably unnecessary. */
...@@ -595,8 +591,7 @@ fr30_print_operand (FILE *file, rtx x, int code) ...@@ -595,8 +591,7 @@ fr30_print_operand (FILE *file, rtx x, int code)
switch (GET_CODE (x0)) switch (GET_CODE (x0))
{ {
case REG: case REG:
if ((unsigned) REGNO (x0) >= ARRAY_SIZE (reg_names)) gcc_assert ((unsigned) REGNO (x0) < ARRAY_SIZE (reg_names));
abort ();
fprintf (file, "@%s", reg_names [REGNO (x0)]); fprintf (file, "@%s", reg_names [REGNO (x0)]);
break; break;
...@@ -841,8 +836,7 @@ fr30_move_double (rtx * operands) ...@@ -841,8 +836,7 @@ fr30_move_double (rtx * operands)
must load it last. Otherwise, load it first. */ must load it last. Otherwise, load it first. */
int reverse = (refers_to_regno_p (dregno, dregno + 1, addr, 0) != 0); int reverse = (refers_to_regno_p (dregno, dregno + 1, addr, 0) != 0);
if (GET_CODE (addr) != REG) gcc_assert (GET_CODE (addr) == REG);
abort ();
dest0 = operand_subword (dest, reverse, TRUE, mode); dest0 = operand_subword (dest, reverse, TRUE, mode);
dest1 = operand_subword (dest, !reverse, TRUE, mode); dest1 = operand_subword (dest, !reverse, TRUE, mode);
...@@ -895,8 +889,7 @@ fr30_move_double (rtx * operands) ...@@ -895,8 +889,7 @@ fr30_move_double (rtx * operands)
rtx src0; rtx src0;
rtx src1; rtx src1;
if (GET_CODE (addr) != REG) gcc_assert (GET_CODE (addr) == REG);
abort ();
src0 = operand_subword (src, 0, TRUE, mode); src0 = operand_subword (src, 0, TRUE, mode);
src1 = operand_subword (src, 1, TRUE, mode); src1 = operand_subword (src, 1, TRUE, mode);
...@@ -929,7 +922,7 @@ fr30_move_double (rtx * operands) ...@@ -929,7 +922,7 @@ fr30_move_double (rtx * operands)
} }
else else
/* This should have been prevented by the constraints on movdi_insn. */ /* This should have been prevented by the constraints on movdi_insn. */
abort (); gcc_unreachable ();
val = get_insns (); val = get_insns ();
end_sequence (); end_sequence ();
......
...@@ -356,7 +356,7 @@ ...@@ -356,7 +356,7 @@
case 4: return \"mov \\t%1, %0\"; case 4: return \"mov \\t%1, %0\";
case 5: return \"st \\t%1, %0\"; case 5: return \"st \\t%1, %0\";
case 6: return \"ld \\t%1, %0\"; case 6: return \"ld \\t%1, %0\";
default: abort (); default: gcc_unreachable ();
} }
}" }"
[(set (attr "length") (cond [(eq_attr "alternative" "1") (const_int 4) [(set (attr "length") (cond [(eq_attr "alternative" "1") (const_int 4)
...@@ -554,7 +554,7 @@ ...@@ -554,7 +554,7 @@
case 2: return \"mov \\t%1, %0\"; case 2: return \"mov \\t%1, %0\";
case 3: return \"st \\t%1, %0\"; case 3: return \"st \\t%1, %0\";
case 4: return \"ld \\t%1, %0\"; case 4: return \"ld \\t%1, %0\";
default: abort (); default: gcc_unreachable ();
} }
}" }"
[(set (attr "length") (cond [(eq_attr "alternative" "0") (const_int 6) [(set (attr "length") (cond [(eq_attr "alternative" "0") (const_int 6)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment