summaryrefslogtreecommitdiff
path: root/tokhash.pl
diff options
context:
space:
mode:
authorH. Peter Anvin <hpa@zytor.com>2007-09-12 20:27:41 -0700
committerH. Peter Anvin <hpa@zytor.com>2007-09-12 20:27:41 -0700
commit16b0a33ceae7b57cf4ebc9ab62cd4e1dc00dbf8c (patch)
tree8402b87bfea53a1b9c57069653c3b8f42e0f8b6e /tokhash.pl
parent7978feebd2fb0be9f4a37980090dfebeeb29a36d (diff)
downloadnasm-16b0a33ceae7b57cf4ebc9ab62cd4e1dc00dbf8c.tar.gz
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-xtokhash.pl6
1 files changed, 3 insertions, 3 deletions
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 = <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";