diff options
author | H. Peter Anvin (Intel) <hpa@zytor.com> | 2020-06-30 09:17:41 -0700 |
---|---|---|
committer | H. Peter Anvin (Intel) <hpa@zytor.com> | 2020-06-30 09:17:41 -0700 |
commit | 14f41b23192e827a01201ac4296861290e221c1f (patch) | |
tree | 7ff728f634761c34bdf41d98490ec5511a29ec0a | |
parent | 43a72dd6386864b64c0d6f77b10cab007c024285 (diff) | |
download | nasm-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>
-rwxr-xr-x | asm/pptok.pl | 6 | ||||
-rwxr-xr-x | asm/tokhash.pl | 6 | ||||
-rwxr-xr-x | macros/macros.pl | 6 | ||||
-rwxr-xr-x | nasmlib/perfhash.pl | 6 |
4 files changed, 12 insertions, 12 deletions
diff --git a/asm/pptok.pl b/asm/pptok.pl index a4853f2e..5498cb46 100755 --- a/asm/pptok.pl +++ b/asm/pptok.pl @@ -223,19 +223,19 @@ if ($what eq 'c') { # 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 OUT "#define UNUSED (65535/3)\n"; + print OUT "#define UNUSED_HASH_ENTRY (65535/3)\n"; print OUT " static const int16_t hash1[$n] = {\n"; for ($i = 0; $i < $n; $i++) { my $h = ${$g}[$i*2+0]; - print OUT " ", defined($h) ? $h : 'UNUSED', ",\n"; + print OUT " ", defined($h) ? $h : 'UNUSED_HASH_ENTRY', ",\n"; } print OUT " };\n"; print OUT " static const int16_t hash2[$n] = {\n"; for ($i = 0; $i < $n; $i++) { my $h = ${$g}[$i*2+1]; - print OUT " ", defined($h) ? $h : 'UNUSED', ",\n"; + print OUT " ", defined($h) ? $h : 'UNUSED_HASH_ENTRY', ",\n"; } print OUT " };\n"; 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"; diff --git a/macros/macros.pl b/macros/macros.pl index 9fc425d4..517a9e6f 100755 --- a/macros/macros.pl +++ b/macros/macros.pl @@ -276,19 +276,19 @@ print OUT " };\n"; # 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 OUT "#define UNUSED (65535/3)\n"; +print OUT "#define UNUSED_HASH_ENTRY (65535/3)\n"; print OUT " static const int16_t hash1[$n] = {\n"; for ($i = 0; $i < $n; $i++) { my $h = ${$g}[$i*2+0]; - print OUT " ", defined($h) ? $h : 'UNUSED', ",\n"; + print OUT " ", defined($h) ? $h : 'UNUSED_HASH_ENTRY', ",\n"; } print OUT " };\n"; print OUT " static const int16_t hash2[$n] = {\n"; for ($i = 0; $i < $n; $i++) { my $h = ${$g}[$i*2+1]; - print OUT " ", defined($h) ? $h : 'UNUSED', ",\n"; + print OUT " ", defined($h) ? $h : 'UNUSED_HASH_ENTRY', ",\n"; } print OUT " };\n"; diff --git a/nasmlib/perfhash.pl b/nasmlib/perfhash.pl index 8df21f69..9236bfec 100755 --- a/nasmlib/perfhash.pl +++ b/nasmlib/perfhash.pl @@ -334,18 +334,18 @@ if ($output eq 'h') { } print F "\n};\n\n"; - print F "#define UNUSED (65536/3)\n\n"; + print F "#define UNUSED_HASH_ENTRY (65536/3)\n\n"; printf F "static const int16_t %s_hashvals[%d] = ", $name, $n*2; $c = '{'; for (my $i = 0; $i < $n; $i++) { my $h = ${$g}[$i*2+0]; - print F "$c\n ", defined($h) ? $h : 'UNUSED'; + print F "$c\n ", defined($h) ? $h : 'UNUSED_HASH_ENTRY'; $c = ','; } for (my $i = 0; $i < $n; $i++) { my $h = ${$g}[$i*2+1]; - print F "$c\n ", defined($h) ? $h : 'UNUSED'; + print F "$c\n ", defined($h) ? $h : 'UNUSED_HASH_ENTRY'; $c = ','; } print F "\n};\n\n"; |