From 16b0a33ceae7b57cf4ebc9ab62cd4e1dc00dbf8c Mon Sep 17 00:00:00 2001 From: "H. Peter Anvin" Date: Wed, 12 Sep 2007 20:27:41 -0700 Subject: Use enumerations where practical to ease debugging We have a lot of enumerations; by declaring fields as such, we make it easier when debugging, since the debugger can display the enumerations in cleartext. However, make sure exceptional values (like -1) are included in the enumeration, since the compiler otherwise may not include it in the valid range of the enumeration. --- tokhash.pl | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'tokhash.pl') diff --git a/tokhash.pl b/tokhash.pl index 7962fe6f..5f1a9f4c 100755 --- a/tokhash.pl +++ b/tokhash.pl @@ -32,7 +32,7 @@ while (defined($line = )) { # Single instruction token if (!defined($tokens{$token})) { $tokens{$token} = scalar @tokendata; - push(@tokendata, "\"${token}\", TOKEN_INSN, 0, I_${insn}"); + push(@tokendata, "\"${token}\", TOKEN_INSN, C_none, I_${insn}"); } } else { # Conditional instruction @@ -144,8 +144,8 @@ print "\n"; print "struct tokendata {\n"; print " const char *string;\n"; print " int16_t tokentype;\n"; -print " uint16_t aux;\n"; -print " uint32_t num;\n"; +print " int16_t aux;\n"; +print " int32_t num;\n"; print "};\n"; print "\n"; -- cgit v1.2.1