summaryrefslogtreecommitdiff
path: root/asm/tokhash.pl
diff options
context:
space:
mode:
authorH. Peter Anvin (Intel) <hpa@zytor.com>2020-06-30 09:17:41 -0700
committerH. Peter Anvin (Intel) <hpa@zytor.com>2020-06-30 09:17:41 -0700
commit14f41b23192e827a01201ac4296861290e221c1f (patch)
tree7ff728f634761c34bdf41d98490ec5511a29ec0a /asm/tokhash.pl
parent43a72dd6386864b64c0d6f77b10cab007c024285 (diff)
downloadnasm-14f41b23192e827a01201ac4296861290e221c1f.tar.gz
hash generators: rename UNUSED to UNUSED_HASH_ENTRY
The name UNUSED is too generic and may conflict with future macro definitions. This is machine-generated code anyway, so rename UNUSED to UNUSED_HASH_ENTRY. Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
Diffstat (limited to 'asm/tokhash.pl')
-rwxr-xr-xasm/tokhash.pl6
1 files changed, 3 insertions, 3 deletions
diff --git a/asm/tokhash.pl b/asm/tokhash.pl
index 9dbe77a2..9303157b 100755
--- a/asm/tokhash.pl
+++ b/asm/tokhash.pl
@@ -234,19 +234,19 @@ if ($output eq 'h') {
# Put a large value in unused slots. This makes it extremely unlikely
# that any combination that involves unused slot will pass the range test.
# This speeds up rejection of unrecognized tokens, i.e. identifiers.
- print "#define UNUSED (65535/3)\n";
+ print "#define UNUSED_HASH_ENTRY (65535/3)\n";
print " static const int16_t hash1[$n] = {\n";
for ($i = 0; $i < $n; $i++) {
my $h = ${$g}[$i*2+0];
- print " ", defined($h) ? $h : 'UNUSED', ",\n";
+ print " ", defined($h) ? $h : 'UNUSED_HASH_ENTRY', ",\n";
}
print " };\n";
print " static const int16_t hash2[$n] = {\n";
for ($i = 0; $i < $n; $i++) {
my $h = ${$g}[$i*2+1];
- print " ", defined($h) ? $h : 'UNUSED', ",\n";
+ print " ", defined($h) ? $h : 'UNUSED_HASH_ENTRY', ",\n";
}
print " };\n";