Commit b570063a by Jie Zhang Committed by Jie Zhang

bfin.c (print_operand): Report error instead of ICE for wrong operand.

	* config/bfin/bfin.c (print_operand): Report error instead of
	ICE for wrong operand.

From-SVN: r127780
parent 48f9f863
2007-08-24 Jie Zhang <jie.zhang@analog.com>
* config/bfin/bfin.c (print_operand): Report error instead of
ICE for wrong operand.
2007-08-24 Michael Matz <matz@suse.de> 2007-08-24 Michael Matz <matz@suse.de>
* Makefile.in (GTFILES_H): Use $(patsubst) instead of $(subst). * Makefile.in (GTFILES_H): Use $(patsubst) instead of $(subst).
......
...@@ -1310,26 +1310,31 @@ print_operand (FILE *file, rtx x, char code) ...@@ -1310,26 +1310,31 @@ print_operand (FILE *file, rtx x, char code)
case REG: case REG:
if (code == 'h') if (code == 'h')
{ {
gcc_assert (REGNO (x) < 32); if (REGNO (x) < 32)
fprintf (file, "%s", short_reg_names[REGNO (x)]); fprintf (file, "%s", short_reg_names[REGNO (x)]);
/*fprintf (file, "\n%d\n ", REGNO (x));*/ else
break; output_operand_lossage ("invalid operand for code '%c'", code);
} }
else if (code == 'd') else if (code == 'd')
{ {
gcc_assert (REGNO (x) < 32); if (REGNO (x) < 32)
fprintf (file, "%s", high_reg_names[REGNO (x)]); fprintf (file, "%s", high_reg_names[REGNO (x)]);
break; else
output_operand_lossage ("invalid operand for code '%c'", code);
} }
else if (code == 'w') else if (code == 'w')
{ {
gcc_assert (REGNO (x) == REG_A0 || REGNO (x) == REG_A1); if (REGNO (x) == REG_A0 || REGNO (x) == REG_A1)
fprintf (file, "%s.w", reg_names[REGNO (x)]); fprintf (file, "%s.w", reg_names[REGNO (x)]);
else
output_operand_lossage ("invalid operand for code '%c'", code);
} }
else if (code == 'x') else if (code == 'x')
{ {
gcc_assert (REGNO (x) == REG_A0 || REGNO (x) == REG_A1); if (REGNO (x) == REG_A0 || REGNO (x) == REG_A1)
fprintf (file, "%s.x", reg_names[REGNO (x)]); fprintf (file, "%s.x", reg_names[REGNO (x)]);
else
output_operand_lossage ("invalid operand for code '%c'", code);
} }
else if (code == 'v') else if (code == 'v')
{ {
...@@ -1342,18 +1347,24 @@ print_operand (FILE *file, rtx x, char code) ...@@ -1342,18 +1347,24 @@ print_operand (FILE *file, rtx x, char code)
} }
else if (code == 'D') else if (code == 'D')
{ {
fprintf (file, "%s", dregs_pair_names[REGNO (x)]); if (D_REGNO_P (REGNO (x)))
fprintf (file, "%s", dregs_pair_names[REGNO (x)]);
else
output_operand_lossage ("invalid operand for code '%c'", code);
} }
else if (code == 'H') else if (code == 'H')
{ {
gcc_assert (mode == DImode || mode == DFmode); if ((mode == DImode || mode == DFmode) && REG_P (x))
gcc_assert (REG_P (x)); fprintf (file, "%s", reg_names[REGNO (x) + 1]);
fprintf (file, "%s", reg_names[REGNO (x) + 1]); else
output_operand_lossage ("invalid operand for code '%c'", code);
} }
else if (code == 'T') else if (code == 'T')
{ {
gcc_assert (D_REGNO_P (REGNO (x))); if (D_REGNO_P (REGNO (x)))
fprintf (file, "%s", byte_reg_names[REGNO (x)]); fprintf (file, "%s", byte_reg_names[REGNO (x)]);
else
output_operand_lossage ("invalid operand for code '%c'", code);
} }
else else
fprintf (file, "%s", reg_names[REGNO (x)]); fprintf (file, "%s", reg_names[REGNO (x)]);
......
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