summaryrefslogtreecommitdiff
path: root/gcc/config/fr30/fr30.c
diff options
context:
space:
mode:
authorNathan Sidwell <nathan@codesourcery.com>2005-04-29 14:45:43 +0000
committerNathan Sidwell <nathan@gcc.gnu.org>2005-04-29 14:45:43 +0000
commit4e81e7c201f6093138fa387d8bdc708a279c6f0a (patch)
treee7ba9e83bb945f27c04e478fdcfb01ac5159e57a /gcc/config/fr30/fr30.c
parent1fb2002d69c09edb91d88e99a21a86f908b7b85b (diff)
downloadgcc-4e81e7c201f6093138fa387d8bdc708a279c6f0a.tar.gz
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
Diffstat (limited to 'gcc/config/fr30/fr30.c')
-rw-r--r--gcc/config/fr30/fr30.c23
1 files changed, 8 insertions, 15 deletions
diff --git a/gcc/config/fr30/fr30.c b/gcc/config/fr30/fr30.c
index e796406ac73..7346cff3174 100644
--- a/gcc/config/fr30/fr30.c
+++ b/gcc/config/fr30/fr30.c
@@ -243,9 +243,7 @@ fr30_expand_prologue (void)
fr30_compute_frame_size (0, 0);
/* This cases shouldn't happen. Catch it now. */
- if (current_frame_info.total_size == 0
- && current_frame_info.gmask)
- abort ();
+ gcc_assert (current_frame_info.total_size || !current_frame_info.gmask);
/* Allocate space for register arguments if this is a variadic function. */
if (current_frame_info.pretend_size)
@@ -367,9 +365,8 @@ fr30_expand_epilogue (void)
int regno;
/* Perform the inversion operations of the prologue. */
- if (! current_frame_info.initialised)
- abort ();
-
+ gcc_assert (current_frame_info.initialised);
+
/* Pop local variables and arguments off the stack.
If frame_pointer_needed is TRUE then the frame pointer register
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,
int size;
/* All BLKmode values are passed by reference. */
- if (mode == BLKmode)
- abort ();
+ gcc_assert (mode != BLKmode);
/* ??? This run-time test as well as the code inside the if
statement is probably unnecessary. */
@@ -595,8 +591,7 @@ fr30_print_operand (FILE *file, rtx x, int code)
switch (GET_CODE (x0))
{
case REG:
- if ((unsigned) REGNO (x0) >= ARRAY_SIZE (reg_names))
- abort ();
+ gcc_assert ((unsigned) REGNO (x0) < ARRAY_SIZE (reg_names));
fprintf (file, "@%s", reg_names [REGNO (x0)]);
break;
@@ -841,8 +836,7 @@ fr30_move_double (rtx * operands)
must load it last. Otherwise, load it first. */
int reverse = (refers_to_regno_p (dregno, dregno + 1, addr, 0) != 0);
- if (GET_CODE (addr) != REG)
- abort ();
+ gcc_assert (GET_CODE (addr) == REG);
dest0 = operand_subword (dest, reverse, TRUE, mode);
dest1 = operand_subword (dest, !reverse, TRUE, mode);
@@ -895,8 +889,7 @@ fr30_move_double (rtx * operands)
rtx src0;
rtx src1;
- if (GET_CODE (addr) != REG)
- abort ();
+ gcc_assert (GET_CODE (addr) == REG);
src0 = operand_subword (src, 0, TRUE, mode);
src1 = operand_subword (src, 1, TRUE, mode);
@@ -929,7 +922,7 @@ fr30_move_double (rtx * operands)
}
else
/* This should have been prevented by the constraints on movdi_insn. */
- abort ();
+ gcc_unreachable ();
val = get_insns ();
end_sequence ();