X-Git-Url: http://git.sourceforge.jp/view?a=blobdiff_plain;f=gcc%2Fgenoutput.c;h=e651cb4d8788ebf5873dc8cf80a7914180100b0a;hb=ea386dbadfa9ee82f762a5ce4c6988f13b1ca80b;hp=601483d8b2f2bf5869489dfbc6575fb40b20fa58;hpb=2657a7d538a2f03c5fdf56efd1c8e87cd30b9f13;p=pf3gnuchains%2Fgcc-fork.git diff --git a/gcc/genoutput.c b/gcc/genoutput.c index 601483d8b2f..e651cb4d878 100644 --- a/gcc/genoutput.c +++ b/gcc/genoutput.c @@ -1,6 +1,6 @@ /* Generate code from to output assembler insns as recognized from rtl. Copyright (C) 1987, 1988, 1992, 1994, 1995, 1997, 1998, 1999, 2000, 2002, - 2003, 2004, 2005, 2007 Free Software Foundation, Inc. + 2003, 2004, 2005, 2007, 2008 Free Software Foundation, Inc. This file is part of GCC. @@ -830,6 +830,22 @@ validate_insn_operands (struct data *d) have_error = 1; } } + +static void +validate_optab_operands (struct data *d) +{ + if (!d->name || d->name[0] == '\0' || d->name[0] == '*') + return; + + /* Miscellaneous tests. */ + if (strncmp (d->name, "cstore", 6) == 0 + && d->name[strlen (d->name) - 1] == '4' + && d->operand[0].mode == VOIDmode) + { + message_with_line (d->lineno, "missing mode for operand 0 of cstore"); + have_error = 1; + } +} /* Look at a define_insn just read. Assign its code number. Record on idata the template and the number of arguments. If the insn has @@ -871,6 +887,7 @@ gen_insn (rtx insn, int lineno) #endif validate_insn_operands (d); validate_insn_alternatives (d); + validate_optab_operands (d); place_operands (d); process_template (d, XTMPL (insn, 3)); } @@ -956,6 +973,7 @@ gen_expand (rtx insn, int lineno) d->output_format = INSN_OUTPUT_FORMAT_NONE; validate_insn_alternatives (d); + validate_optab_operands (d); place_operands (d); }