mips.c (mips_print_operand): Check for invalid values of LETTER.

* config/mips/mips.c (mips_print_operand) <REG, MEM, default>:
	Check for invalid values of LETTER.

From-SVN: r147517
This commit is contained in:
Adam Nemet 2009-05-14 02:07:00 +00:00 committed by Adam Nemet
parent d1c8e08a0c
commit b0907a6ca0
2 changed files with 11 additions and 0 deletions

View File

@ -1,3 +1,8 @@
2009-05-13 Adam Nemet <anemet@caviumnetworks.com>
* config/mips/mips.c (mips_print_operand) <REG, MEM, default>:
Check for invalid values of LETTER.
2009-05-13 Taras Glek <tglek@mozilla.com>
* attribs.c moved out attribute registration into register_attribute

View File

@ -7292,6 +7292,8 @@ mips_print_operand (FILE *file, rtx op, int letter)
|| (letter == 'L' && TARGET_BIG_ENDIAN)
|| letter == 'D')
regno++;
else if (letter && letter != 'z' && letter != 'M' && letter != 'L')
output_operand_lossage ("invalid use of '%%%c'", letter);
/* We need to print $0 .. $31 for COP0 registers. */
if (COP0_REG_P (regno))
fprintf (file, "$%s", &reg_names[regno][4]);
@ -7303,6 +7305,8 @@ mips_print_operand (FILE *file, rtx op, int letter)
case MEM:
if (letter == 'D')
output_address (plus_constant (XEXP (op, 0), 4));
else if (letter && letter != 'z')
output_operand_lossage ("invalid use of '%%%c'", letter);
else
output_address (XEXP (op, 0));
break;
@ -7310,6 +7314,8 @@ mips_print_operand (FILE *file, rtx op, int letter)
default:
if (letter == 'z' && op == CONST0_RTX (GET_MODE (op)))
fputs (reg_names[GP_REG_FIRST], file);
else if (letter && letter != 'z')
output_operand_lossage ("invalid use of '%%%c'", letter);
else if (CONST_GP_P (op))
fputs (reg_names[GLOBAL_POINTER_REGNUM], file);
else