Commit 90285d8d by Nathan Sidwell Committed by John David Anglin

vax.c: (print_operand_address) Use gcc_unreachable() and gcc_assert().

	* config/vax/vax.c: (print_operand_address) Use gcc_unreachable() and
	gcc_assert().
	(rev_cond_name) Likewise.
	(vax_float_literal) Likewise.
	* config/vax/vax.md: Likewise.

Co-Authored-By: Jan-Benedict Glaw <jbglaw@lug-owl.de>

From-SVN: r99703
parent 0f8def68
2005-05-14 Nathan Sidwell <nathan@codesourcery.com>
Jan-Benedict Glaw <jbglaw@lug-owl.de>
* config/vax/vax.c: (print_operand_address) Use gcc_unreachable() and
gcc_assert().
(rev_cond_name) Likewise.
(vax_float_literal) Likewise.
* config/vax/vax.md: Likewise.
2005-05-14 Jan-Benedict Glaw <jbglaw@lug-owl.de> 2005-05-14 Jan-Benedict Glaw <jbglaw@lug-owl.de>
* config/vax/vax.md: define_constant VAXens AP, FP, SP and PC * config/vax/vax.md: define_constant VAXens AP, FP, SP and PC
......
...@@ -269,7 +269,7 @@ print_operand_address (FILE * file, rtx addr) ...@@ -269,7 +269,7 @@ print_operand_address (FILE * file, rtx addr)
addr = XEXP (addr, 1); addr = XEXP (addr, 1);
} }
else else
abort (); gcc_unreachable ();
if (GET_CODE (addr) == REG) if (GET_CODE (addr) == REG)
{ {
...@@ -280,8 +280,9 @@ print_operand_address (FILE * file, rtx addr) ...@@ -280,8 +280,9 @@ print_operand_address (FILE * file, rtx addr)
} }
else if (GET_CODE (addr) == MULT) else if (GET_CODE (addr) == MULT)
ireg = addr; ireg = addr;
else if (GET_CODE (addr) == PLUS) else
{ {
gcc_assert (GET_CODE (addr) == PLUS);
if (CONSTANT_ADDRESS_P (XEXP (addr, 0)) if (CONSTANT_ADDRESS_P (XEXP (addr, 0))
|| GET_CODE (XEXP (addr, 0)) == MEM) || GET_CODE (XEXP (addr, 0)) == MEM)
{ {
...@@ -289,10 +290,11 @@ print_operand_address (FILE * file, rtx addr) ...@@ -289,10 +290,11 @@ print_operand_address (FILE * file, rtx addr)
{ {
if (GET_CODE (offset) == CONST_INT) if (GET_CODE (offset) == CONST_INT)
offset = plus_constant (XEXP (addr, 0), INTVAL (offset)); offset = plus_constant (XEXP (addr, 0), INTVAL (offset));
else if (GET_CODE (XEXP (addr, 0)) == CONST_INT)
offset = plus_constant (offset, INTVAL (XEXP (addr, 0)));
else else
abort (); {
gcc_assert (GET_CODE (XEXP (addr, 0)) == CONST_INT);
offset = plus_constant (offset, INTVAL (XEXP (addr, 0)));
}
} }
offset = XEXP (addr, 0); offset = XEXP (addr, 0);
} }
...@@ -303,14 +305,12 @@ print_operand_address (FILE * file, rtx addr) ...@@ -303,14 +305,12 @@ print_operand_address (FILE * file, rtx addr)
else else
reg1 = XEXP (addr, 0); reg1 = XEXP (addr, 0);
} }
else if (GET_CODE (XEXP (addr, 0)) == MULT) else
{ {
if (ireg) gcc_assert (GET_CODE (XEXP (addr, 0)) == MULT);
abort (); gcc_assert (!ireg);
ireg = XEXP (addr, 0); ireg = XEXP (addr, 0);
} }
else
abort ();
if (CONSTANT_ADDRESS_P (XEXP (addr, 1)) if (CONSTANT_ADDRESS_P (XEXP (addr, 1))
|| GET_CODE (XEXP (addr, 1)) == MEM) || GET_CODE (XEXP (addr, 1)) == MEM)
...@@ -319,10 +319,11 @@ print_operand_address (FILE * file, rtx addr) ...@@ -319,10 +319,11 @@ print_operand_address (FILE * file, rtx addr)
{ {
if (GET_CODE (offset) == CONST_INT) if (GET_CODE (offset) == CONST_INT)
offset = plus_constant (XEXP (addr, 1), INTVAL (offset)); offset = plus_constant (XEXP (addr, 1), INTVAL (offset));
else if (GET_CODE (XEXP (addr, 1)) == CONST_INT)
offset = plus_constant (offset, INTVAL (XEXP (addr, 1)));
else else
abort (); {
gcc_assert (GET_CODE (XEXP (addr, 1)) == CONST_INT);
offset = plus_constant (offset, INTVAL (XEXP (addr, 1)));
}
} }
offset = XEXP (addr, 1); offset = XEXP (addr, 1);
} }
...@@ -333,25 +334,20 @@ print_operand_address (FILE * file, rtx addr) ...@@ -333,25 +334,20 @@ print_operand_address (FILE * file, rtx addr)
else else
reg1 = XEXP (addr, 1); reg1 = XEXP (addr, 1);
} }
else if (GET_CODE (XEXP (addr, 1)) == MULT) else
{ {
if (ireg) gcc_assert (GET_CODE (XEXP (addr, 1)) == MULT);
abort (); gcc_assert (!ireg);
ireg = XEXP (addr, 1); ireg = XEXP (addr, 1);
} }
else
abort ();
} }
else
abort ();
/* If REG1 is nonzero, figure out if it is a base or index register. */ /* If REG1 is nonzero, figure out if it is a base or index register. */
if (reg1) if (reg1)
{ {
if (breg != 0 || (offset && GET_CODE (offset) == MEM)) if (breg != 0 || (offset && GET_CODE (offset) == MEM))
{ {
if (ireg) gcc_assert (!ireg);
abort ();
ireg = reg1; ireg = reg1;
} }
else else
...@@ -368,8 +364,7 @@ print_operand_address (FILE * file, rtx addr) ...@@ -368,8 +364,7 @@ print_operand_address (FILE * file, rtx addr)
{ {
if (GET_CODE (ireg) == MULT) if (GET_CODE (ireg) == MULT)
ireg = XEXP (ireg, 0); ireg = XEXP (ireg, 0);
if (GET_CODE (ireg) != REG) gcc_assert (GET_CODE (ireg) == REG);
abort ();
fprintf (file, "[%s]", reg_names[REGNO (ireg)]); fprintf (file, "[%s]", reg_names[REGNO (ireg)]);
} }
break; break;
...@@ -406,7 +401,7 @@ rev_cond_name (rtx op) ...@@ -406,7 +401,7 @@ rev_cond_name (rtx op)
return "lssu"; return "lssu";
default: default:
abort (); gcc_unreachable ();
} }
} }
...@@ -432,12 +427,13 @@ vax_float_literal(rtx c) ...@@ -432,12 +427,13 @@ vax_float_literal(rtx c)
for (i = 0; i < 7; i++) for (i = 0; i < 7; i++)
{ {
int x = 1 << i; int x = 1 << i;
bool ok;
REAL_VALUE_FROM_INT (s, x, 0, mode); REAL_VALUE_FROM_INT (s, x, 0, mode);
if (REAL_VALUES_EQUAL (r, s)) if (REAL_VALUES_EQUAL (r, s))
return 1; return 1;
if (!exact_real_inverse (mode, &s)) ok = exact_real_inverse (mode, &s);
abort (); gcc_assert (ok);
if (REAL_VALUES_EQUAL (r, s)) if (REAL_VALUES_EQUAL (r, s))
return 1; return 1;
} }
......
...@@ -1205,8 +1205,7 @@ ...@@ -1205,8 +1205,7 @@
(match_operand:SI 3 "immediate_operand" "")))])] (match_operand:SI 3 "immediate_operand" "")))])]
"" ""
{ {
if (INTVAL (operands[3]) > 255 * 4 || INTVAL (operands[3]) % 4) gcc_assert (INTVAL (operands[3]) <= 255 * 4 && INTVAL (operands[3]) % 4 == 0);
abort ();
/* Operand 1 is the number of bytes to be popped by DW_CFA_GNU_args_size /* Operand 1 is the number of bytes to be popped by DW_CFA_GNU_args_size
during EH unwinding. We must include the argument count pushed by during EH unwinding. We must include the argument count pushed by
...@@ -1234,8 +1233,7 @@ ...@@ -1234,8 +1233,7 @@
(match_operand:SI 4 "immediate_operand" "")))])] (match_operand:SI 4 "immediate_operand" "")))])]
"" ""
{ {
if (INTVAL (operands[4]) > 255 * 4 || INTVAL (operands[4]) % 4) gcc_assert (INTVAL (operands[4]) <= 255 * 4 && INTVAL (operands[4]) % 4 == 0);
abort ();
/* Operand 2 is the number of bytes to be popped by DW_CFA_GNU_args_size /* Operand 2 is the number of bytes to be popped by DW_CFA_GNU_args_size
during EH unwinding. We must include the argument count pushed by during EH unwinding. We must include the argument count pushed by
......
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