diff options
author | H. Peter Anvin <hpa@zytor.com> | 2007-09-12 20:27:41 -0700 |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2007-09-12 20:27:41 -0700 |
commit | 16b0a33ceae7b57cf4ebc9ab62cd4e1dc00dbf8c (patch) | |
tree | 8402b87bfea53a1b9c57069653c3b8f42e0f8b6e /tokhash.pl | |
parent | 7978feebd2fb0be9f4a37980090dfebeeb29a36d (diff) | |
download | nasm-16b0a33ceae7b57cf4ebc9ab62cd4e1dc00dbf8c.tar.gz nasm-16b0a33ceae7b57cf4ebc9ab62cd4e1dc00dbf8c.tar.bz2 nasm-16b0a33ceae7b57cf4ebc9ab62cd4e1dc00dbf8c.zip |
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.
Diffstat (limited to 'tokhash.pl')
-rwxr-xr-x | tokhash.pl | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -32,7 +32,7 @@ while (defined($line = <ID>)) { # 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"; |