Add generic perfect string hashes, use for directives
commit5253f58c3679b9b21006567ad26a419904791645
authorH. Peter Anvin <hpa@zytor.com>
Mon, 3 Apr 2017 07:09:58 +0000 (3 00:09 -0700)
committerH. Peter Anvin <hpa@zytor.com>
Mon, 3 Apr 2017 07:27:07 +0000 (3 00:27 -0700)
tree538cd02d8ea06b042e97ecf548366883fb9a31ba
parentb1a5b26477db4ce4270b8de75c36b8f9acfc3f69
Add generic perfect string hashes, use for directives

Add a generic facility for generating perfect string hashes, where all
that is needed is an enum and a string table.  The existing mechanism
using a custom Perl script wrapped around a module continues to be
available for any use case where this particular approach isn't
sophisticated enough.

Much of this patch comes from renaming "enum directives" to "enum
directive" as a result of the string hash generator expecting a set of
uniform naming conventions.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
24 files changed:
Makefile.in
Mkfiles/msvc.mak
Mkfiles/netware.mak
Mkfiles/openwcom.mak
asm/directiv.c
asm/directiv.dat
asm/directiv.pl [deleted file]
asm/pragma.c
include/hashtbl.h
include/nasm.h
include/nasmlib.h
include/perfhash.h [copied from output/nullout.c with 78% similarity]
nasmlib/badenum.c [copied from output/nullout.c with 81% similarity]
nasmlib/perfhash.c [copied from output/nullout.c with 72% similarity]
nasmlib/perfhash.pl [new file with mode: 0755]
output/nullout.c
output/outbin.c
output/outcoff.c
output/outdbg.c
output/outelf.c
output/outieee.c
output/outlib.h
output/outobj.c
output/outrdf2.c