summaryrefslogtreecommitdiff
path: root/gcc/gencodes.c
diff options
context:
space:
mode:
authorrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>2014-05-27 10:05:55 +0000
committerrsandifo <rsandifo@138bc75d-0d04-0410-961f-82ee72b054a4>2014-05-27 10:05:55 +0000
commit6add2e69343004dabec88d6e8c40229c930b4c7c (patch)
tree2a71cfeb14a1c81c34dcdc52ac5b339bb007c667 /gcc/gencodes.c
parentd3314a91c87799e642652a58a7a2a904507937b4 (diff)
downloadgcc-6add2e69343004dabec88d6e8c40229c930b4c7c.tar.gz
gcc/
* gencodes.c (main): Make LAST_INSN_CODE higher than any insn code, rather than any named insn's code. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@210963 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/gencodes.c')
-rw-r--r--gcc/gencodes.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/gcc/gencodes.c b/gcc/gencodes.c
index b34381f9268..207b7eeb8f4 100644
--- a/gcc/gencodes.c
+++ b/gcc/gencodes.c
@@ -50,6 +50,7 @@ int
main (int argc, char **argv)
{
rtx desc;
+ int last = 1;
progname = "gencodes";
@@ -82,13 +83,16 @@ enum insn_code {\n\
break;
if (GET_CODE (desc) == DEFINE_INSN || GET_CODE (desc) == DEFINE_EXPAND)
- gen_insn (desc, insn_code_number);
+ {
+ gen_insn (desc, insn_code_number);
+ last = insn_code_number + 1;
+ }
}
- puts (" LAST_INSN_CODE\n\
+ printf (" LAST_INSN_CODE = %d\n\
};\n\
\n\
-#endif /* GCC_INSN_CODES_H */");
+#endif /* GCC_INSN_CODES_H */\n", last);
if (ferror (stdout) || fflush (stdout) || fclose (stdout))
return FATAL_EXIT_CODE;