diff options
author | Adam Nemet <anemet@caviumnetworks.com> | 2009-05-14 02:07:00 +0000 |
---|---|---|
committer | Adam Nemet <nemet@gcc.gnu.org> | 2009-05-14 02:07:00 +0000 |
commit | b0907a6ca0f7591fd741247210aa8ac709dd784a (patch) | |
tree | b87d650a2fab13cac77a89d1537179584c40f09e | |
parent | d1c8e08a0c45483b90b09e6cdf12cf8d77876fd6 (diff) | |
download | gcc-b0907a6ca0f7591fd741247210aa8ac709dd784a.zip gcc-b0907a6ca0f7591fd741247210aa8ac709dd784a.tar.gz gcc-b0907a6ca0f7591fd741247210aa8ac709dd784a.tar.bz2 |
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
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/config/mips/mips.c | 6 |
2 files changed, 11 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 4b5637b..ea7ec06 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -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 diff --git a/gcc/config/mips/mips.c b/gcc/config/mips/mips.c index 9d712d2..d8686dd 100644 --- a/gcc/config/mips/mips.c +++ b/gcc/config/mips/mips.c @@ -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", ®_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 |