diff options
author | Andrew Cagney <cagney@redhat.com> | 1997-10-09 08:35:33 +0000 |
---|---|---|
committer | Andrew Cagney <cagney@redhat.com> | 1997-10-09 08:35:33 +0000 |
commit | 8782bfcfc466158aeb9433586b6d885641b507df (patch) | |
tree | 46f6641193765201492d953c76b439e8c475cb4a /sim/igen/igen.c | |
parent | 8d2e72a1c8919c8e54bfe4d5b508c382586ed4cd (diff) | |
download | gdb-8782bfcfc466158aeb9433586b6d885641b507df.zip gdb-8782bfcfc466158aeb9433586b6d885641b507df.tar.gz gdb-8782bfcfc466158aeb9433586b6d885641b507df.tar.bz2 |
Add -Wnodiscard option so that warning about discarded instructions
can be suppressed.
Allow ``<insn-spec> { <nmemonic> | <model> }'' in instruction file.
Diffstat (limited to 'sim/igen/igen.c')
-rw-r--r-- | sim/igen/igen.c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/sim/igen/igen.c b/sim/igen/igen.c index 28e6e15..7820603 100644 --- a/sim/igen/igen.c +++ b/sim/igen/igen.c @@ -491,8 +491,9 @@ print_itrace (lf *file, lf_indent_suppress (file); lf_printf (file, "#if defined (WITH_TRACE)\n"); lf_printf (file, "/* trace the instructions execution if enabled */\n"); - lf_printf (file, "if (TRACE_%s_P (CPU)) {\n", phase); - lf_indent (file, +2); + lf_printf (file, "if (TRACE_%s_P (CPU))\n", phase); + lf_printf (file, " {\n"); + lf_indent (file, +4); if (insn->mnemonics != NULL) { insn_mnemonic_entry *assembler = insn->mnemonics; @@ -541,8 +542,8 @@ print_itrace (lf *file, lf_printf (file, "itable[MY_INDEX].name);\n"); lf_indent (file, -indent); } - lf_indent (file, -2); - lf_printf (file, "}\n"); + lf_indent (file, -4); + lf_printf (file, " }\n"); lf_indent_suppress (file); lf_printf (file, "#endif\n"); } @@ -989,6 +990,8 @@ main (int argc, printf ("\n"); printf (" -Werror\n"); printf ("\t Make warnings errors\n"); + printf (" -Wnodiscard\n"); + printf ("\t Suppress warnings about discarded instructions\n"); printf ("\n"); printf (" -G [!]<gen-option>\n"); printf ("\t Any of the following options:\n"); @@ -1186,6 +1189,10 @@ main (int argc, { if (strcmp (optarg, "error") == 0) options.warning = error; + else if (strcmp (optarg, "nodiscard") == 0) + options.warn.discard = 0; + else if (strcmp (optarg, "discard") == 0) + options.warn.discard = 1; else error (NULL, "Unknown -W argument `%s'\n", optarg); break; |