This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

PATCH: CODE_FOR_nothing value changed


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");
 

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]