summaryrefslogtreecommitdiff
path: root/gcc/gencodes.c
diff options
context:
space:
mode:
authorrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>2015-08-21 17:23:10 +0000
committerrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>2015-08-21 17:23:10 +0000
commit9fdbc4322d88eeb2398a87ef7adf94bf05111861 (patch)
tree48205e4dfefd1ab26f456d3fbd7f172bbab3cf5b /gcc/gencodes.c
parent8308815586fbc62e680e34d1fa32e2687db88c07 (diff)
downloadgcc-9fdbc4322d88eeb2398a87ef7adf94bf05111861.tar.gz
gcc/
* gencodes.c (gencodes): Print the comma for the preceding enum value rather than the current one. Use aliased enum values rather than #defines for compiled-out patterns. (main): Update accordingly. Replace LAST_INSN_CODE with NUM_INSN_CODES. * lra.c (insn_code_data): Update accordingly. (finish_insn_code_data_once, get_static_insn_data): Likewise. * recog.h (target_recog): Likewise. (preprocess_insn_constraints): Change parameter to unsigned int. * recog.c (preprocess_insn_constraints): Likewise. (recog_init): Replace LAST_INSN_CODE with NUM_INSN_CODES. * tree-vect-stmts.c (vectorizable_operation): Simplify. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@227076 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/gencodes.c')
-rw-r--r--gcc/gencodes.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/gcc/gencodes.c b/gcc/gencodes.c
index c7478912e9b..d4560b4abf4 100644
--- a/gcc/gencodes.c
+++ b/gcc/gencodes.c
@@ -40,9 +40,9 @@ gen_insn (md_rtx_info *info)
if (name[0] != 0 && name[0] != '*')
{
if (truth == 0)
- printf ("#define CODE_FOR_%s CODE_FOR_nothing\n", name);
+ printf (",\n CODE_FOR_%s = CODE_FOR_nothing", name);
else
- printf (" CODE_FOR_%s = %d,\n", name, info->index);
+ printf (",\n CODE_FOR_%s = %d", name, info->index);
}
}
@@ -58,7 +58,7 @@ main (int argc, char **argv)
if (!init_rtx_reader_args (argc, argv))
return (FATAL_EXIT_CODE);
- puts ("\
+ printf ("\
/* Generated automatically by the program `gencodes'\n\
from the machine description file `md'. */\n\
\n\
@@ -66,7 +66,7 @@ main (int argc, char **argv)
#define GCC_INSN_CODES_H\n\
\n\
enum insn_code {\n\
- CODE_FOR_nothing = 0,\n");
+ CODE_FOR_nothing = 0");
/* Read the machine description. */
@@ -83,10 +83,10 @@ enum insn_code {\n\
break;
}
- printf (" LAST_INSN_CODE = %d\n\
-};\n\
+ printf ("\n};\n\
\n\
-#endif /* GCC_INSN_CODES_H */\n", get_num_insn_codes () - 1);
+const unsigned int NUM_INSN_CODES = %d;\n\
+#endif /* GCC_INSN_CODES_H */\n", get_num_insn_codes ());
if (ferror (stdout) || fflush (stdout) || fclose (stdout))
return FATAL_EXIT_CODE;