This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
PATCH: CODE_FOR_nothing value changed
- To: gcc-patches at gcc dot gnu dot org
- Subject: PATCH: CODE_FOR_nothing value changed
- From: Herman ten Brugge <Haj dot Ten dot Brugge at net dot HCC dot nl>
- Date: Thu, 3 Aug 2000 20:00:05 +0100 (WEST)
Hello,
While debugging the problem with genpeep.c (See previous mail). I found
another problem. The value for CODE_FOR_nothing seems to be incorrect.
If the last insn is the md file is a define_peephole or define_peephole2
or define_split the insn_code for these insns could match the insn_code
for CODE_FOR_nothing. I am not sure if this is really a problem but
changing the value should not be harmfull and is much safer.
Herman.
2000-08-03 Herman A.J. ten Brugge <Haj.Ten.Brugge@net.HCC.nl>
* gencodes.c (main): Define CODE_FOR_nothing as the last possible
insn_code_number + 1.
--- gencodes.c.org Thu Aug 3 19:45:15 2000
+++ gencodes.c Wed Aug 2 21:38:21 2000
@@ -84,7 +84,7 @@ from the machine description file `md'.
gen_insn (desc);
}
- printf (" CODE_FOR_nothing };\n");
+ printf (" CODE_FOR_nothing = %d };\n", insn_code_number + 1);
printf ("\n#define MAX_INSN_CODE ((int) CODE_FOR_nothing)\n");