Rename directiv.c to directbl.c to free up the name directiv.c

We want to move the directive handling to a separate file, so change
the filename of the directive table handler to something a bit more
specific.

Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
This commit is contained in:
H. Peter Anvin 2017-03-07 17:56:42 -08:00
parent c713168bc7
commit ed40e2528d
7 changed files with 24 additions and 24 deletions

2
.gitignore vendored
View File

@ -27,7 +27,7 @@ tags
TAGS
/*.1
/Makefile
/asm/directiv.c
/asm/directbl.c
/asm/directiv.h
/asm/pptok.c
/asm/pptok.h

View File

@ -105,7 +105,7 @@ LIBOBJ = stdlib/snprintf.$(O) stdlib/vsnprintf.$(O) stdlib/strlcpy.$(O) \
x86/disp8.$(O) x86/iflag.$(O) \
\
asm/float.$(O) \
asm/directiv.$(O) \
asm/directbl.$(O) \
asm/assemble.$(O) asm/labels.$(O) asm/parser.$(O) \
asm/preproc.$(O) asm/quote.$(O) asm/pptok.$(O) \
asm/listing.$(O) asm/eval.$(O) asm/exprlib.$(O) asm/exprdump.$(O) \
@ -245,9 +245,9 @@ asm/pptok.ph: asm/pptok.dat asm/pptok.pl perllib/phash.ph
asm/directiv.h: asm/directiv.dat asm/directiv.pl perllib/phash.ph
$(RUNPERL) $(srcdir)/asm/directiv.pl h \
$(srcdir)/asm/directiv.dat asm/directiv.h
asm/directiv.c: asm/directiv.dat asm/directiv.pl perllib/phash.ph
asm/directbl.c: asm/directiv.dat asm/directiv.pl perllib/phash.ph
$(RUNPERL) $(srcdir)/asm/directiv.pl c \
$(srcdir)/asm/directiv.dat asm/directiv.c
$(srcdir)/asm/directiv.dat asm/directbl.c
# This target generates all files that require perl.
# This allows easier generation of distribution (see dist target).
@ -256,7 +256,7 @@ PERLREQ = x86/insnsb.c x86/insnsa.c x86/insnsd.c x86/insnsi.h x86/insnsn.c \
x86/regvals.c asm/tokhash.c asm/tokens.h asm/pptok.h asm/pptok.c \
x86/iflag.c x86/iflaggen.h \
macros/macros.c \
asm/pptok.ph asm/directiv.c asm/directiv.h \
asm/pptok.ph asm/directbl.c asm/directiv.h \
version.h version.mac version.mak nsis/version.nsh
perlreq: $(PERLREQ)
@ -386,7 +386,7 @@ asm/assemble.$(O): asm/assemble.c asm/assemble.h asm/directiv.h \
include/disp8.h include/iflag.h include/insns.h include/nasm.h \
include/nasmint.h include/nasmlib.h include/opflags.h include/strlist.h \
include/tables.h x86/iflaggen.h x86/insnsi.h x86/regs.h
asm/directiv.$(O): asm/directiv.c asm/directiv.h asm/pptok.h asm/preproc.h \
asm/directbl.$(O): asm/directbl.c asm/directiv.h asm/pptok.h asm/preproc.h \
config/config.h config/msvc.h config/unknown.h config/watcom.h \
include/compiler.h include/hashtbl.h include/nasm.h include/nasmint.h \
include/nasmlib.h include/opflags.h include/strlist.h include/tables.h \

View File

@ -73,7 +73,7 @@ LIBOBJ = stdlib/snprintf.$(O) stdlib/vsnprintf.$(O) stdlib/strlcpy.$(O) \
x86/disp8.$(O) x86/iflag.$(O) \
\
asm/float.$(O) \
asm/directiv.$(O) \
asm/directbl.$(O) \
asm/assemble.$(O) asm/labels.$(O) asm/parser.$(O) \
asm/preproc.$(O) asm/quote.$(O) asm/pptok.$(O) \
asm/listing.$(O) asm/eval.$(O) asm/exprlib.$(O) asm/exprdump.$(O) \
@ -188,15 +188,15 @@ pptok.ph: pptok.dat pptok.pl perllib/phash.ph
# Directives hash
directiv.h: directiv.dat directiv.pl perllib/phash.ph
$(PERL) $(srcdir)/directiv.pl h $(srcdir)/directiv.dat directiv.h
directiv.c: directiv.dat directiv.pl perllib/phash.ph
$(PERL) $(srcdir)/directiv.pl c $(srcdir)/directiv.dat directiv.c
directbl.c: directiv.dat directiv.pl perllib/phash.ph
$(PERL) $(srcdir)/directiv.pl c $(srcdir)/directiv.dat directbl.c
# This target generates all files that require perl.
# This allows easier generation of distribution (see dist target).
PERLREQ = macros.c insnsb.c insnsa.c insnsd.c insnsi.h insnsn.c \
regs.c regs.h regflags.c regdis.c regvals.c tokhash.c tokens.h \
version.h version.mac pptok.h pptok.c iflag.c iflaggen.h \
directiv.c directiv.h pptok.ph regdis.h
directbl.c directiv.h pptok.ph regdis.h
perlreq: $(PERLREQ)
clean:
@ -275,7 +275,7 @@ asm/assemble.$(O): asm/assemble.c asm/assemble.h asm/directiv.h \
include/iflag.h include/insns.h include/nasm.h include/nasmint.h \
include/nasmlib.h include/opflags.h include/strlist.h include/tables.h \
x86/iflaggen.h x86/insnsi.h x86/regs.h
asm/directiv.$(O): asm/directiv.c asm/directiv.h asm/pptok.h asm/preproc.h \
asm/directbl.$(O): asm/directbl.c asm/directiv.h asm/pptok.h asm/preproc.h \
config/msvc.h config/unknown.h config/watcom.h include/compiler.h \
include/hashtbl.h include/nasm.h include/nasmint.h include/nasmlib.h \
include/opflags.h include/strlist.h include/tables.h x86/insnsi.h \

View File

@ -50,7 +50,7 @@ LIBOBJ = snprintf.o vsnprintf.o strlcpy.o \
disp8.o iflag.o \
\
float.o \
directiv.o \
directbl.o \
assemble.o labels.o parser.o \
preproc.o quote.o pptok.o \
listing.o eval.o exprlib.o exprdump.o \
@ -155,7 +155,7 @@ assemble.o: assemble.c assemble.h directiv.h listing.h pptok.h preproc.h \
tokens.h config.h msvc.h unknown.h watcom.h compiler.h disp8.h iflag.h \
insns.h nasm.h nasmint.h nasmlib.h opflags.h strlist.h tables.h iflaggen.h \
insnsi.h regs.h
directiv.o: directiv.c directiv.h pptok.h preproc.h config.h msvc.h \
directbl.o: directbl.c directiv.h pptok.h preproc.h config.h msvc.h \
unknown.h watcom.h compiler.h hashtbl.h nasm.h nasmint.h nasmlib.h \
opflags.h strlist.h tables.h insnsi.h regs.h
eval.o: eval.c directiv.h eval.h float.h pptok.h preproc.h config.h msvc.h \

View File

@ -66,7 +66,7 @@ LIBOBJ = stdlib/snprintf.$(O) stdlib/vsnprintf.$(O) stdlib/strlcpy.$(O) &
x86/disp8.$(O) x86/iflag.$(O) &
&
asm/float.$(O) &
asm/directiv.$(O) &
asm/directbl.$(O) &
asm/assemble.$(O) asm/labels.$(O) asm/parser.$(O) &
asm/preproc.$(O) asm/quote.$(O) asm/pptok.$(O) &
asm/listing.$(O) asm/eval.$(O) asm/exprlib.$(O) asm/exprdump.$(O) &
@ -204,8 +204,8 @@ asm/pptok.ph: asm/pptok.dat asm/pptok.pl perllib/phash.ph
# Directives hash
asm/directiv.h: asm/directiv.dat asm/directiv.pl perllib/phash.ph
$(PERL) $(srcdir)/asm/directiv.pl h $(srcdir)/asm/directiv.dat asm/directiv.h
asm/directiv.c: asm/directiv.dat asm/directiv.pl perllib/phash.ph
$(PERL) $(srcdir)/asm/directiv.pl c $(srcdir)/asm/directiv.dat asm/directiv.c
asm/directbl.c: asm/directiv.dat asm/directiv.pl perllib/phash.ph
$(PERL) $(srcdir)/asm/directiv.pl c $(srcdir)/asm/directiv.dat asm/directbl.c
# This target generates all files that require perl.
# This allows easier generation of distribution (see dist target).
@ -277,7 +277,7 @@ asm/assemble.$(O): asm/assemble.c asm/assemble.h asm/directiv.h &
include/iflag.h include/insns.h include/nasm.h include/nasmint.h &
include/nasmlib.h include/opflags.h include/strlist.h include/tables.h &
x86/iflaggen.h x86/insnsi.h x86/regs.h
asm/directiv.$(O): asm/directiv.c asm/directiv.h asm/pptok.h asm/preproc.h &
asm/directbl.$(O): asm/directbl.c asm/directiv.h asm/pptok.h asm/preproc.h &
config/msvc.h config/unknown.h config/watcom.h include/compiler.h &
include/hashtbl.h include/nasm.h include/nasmint.h include/nasmlib.h &
include/opflags.h include/strlist.h include/tables.h x86/insnsi.h &

View File

@ -77,7 +77,7 @@ LIBOBJ = stdlib/snprintf.$(O) stdlib/vsnprintf.$(O) stdlib/strlcpy.$(O) \
x86/disp8.$(O) x86/iflag.$(O) \
\
asm/float.$(O) \
asm/directiv.$(O) \
asm/directbl.$(O) \
asm/assemble.$(O) asm/labels.$(O) asm/parser.$(O) \
asm/preproc.$(O) asm/quote.$(O) asm/pptok.$(O) \
asm/listing.$(O) asm/eval.$(O) asm/exprlib.$(O) asm/exprdump.$(O) \
@ -263,7 +263,7 @@ asm/assemble.$(O): asm/assemble.c asm/assemble.h asm/directiv.h \
include/disp8.h include/iflag.h include/insns.h include/nasm.h \
include/nasmint.h include/nasmlib.h include/opflags.h include/strlist.h \
include/tables.h x86/iflaggen.h x86/insnsi.h x86/regs.h
asm/directiv.$(O): asm/directiv.c asm/directiv.h asm/pptok.h asm/preproc.h \
asm/directbl.$(O): asm/directbl.c asm/directiv.h asm/pptok.h asm/preproc.h \
config/config.h config/msvc.h config/unknown.h config/watcom.h \
include/compiler.h include/hashtbl.h include/nasm.h include/nasmint.h \
include/nasmlib.h include/opflags.h include/strlist.h include/tables.h \

View File

@ -1,7 +1,7 @@
#!/usr/bin/perl
## --------------------------------------------------------------------------
##
## Copyright 1996-2009 The NASM Authors - All Rights Reserved
## Copyright 1996-2017 The NASM Authors - All Rights Reserved
## See the file AUTHORS included with the NASM distribution for
## the specific copyright holders.
##
@ -37,7 +37,7 @@
#
# Usage:
# directiv.pl h directiv.dat directiv.h (to generate C header)
# directiv.pl c directiv.dat directiv.c (to generate C source)
# directiv.pl c directiv.dat directbl.c (to generate C source)
#
require 'phash.ph';
@ -70,8 +70,8 @@ if ($output eq 'h') {
print H " */\n";
print H "\n";
print H "#ifndef NASM_DIRECTIVES_H\n";
print H "#define NASM_DIRECTIVES_H\n";
print H "#ifndef NASM_DIRECTIV_H\n";
print H "#define NASM_DIRECTIV_H\n";
print H "\n";
$c = '{';
@ -88,7 +88,7 @@ if ($output eq 'h') {
printf H "extern const char * const directives[%d];\n",
scalar(@directives)+scalar(@specials);
print H "enum directives find_directive(const char *token);\n\n";
print H "#endif /* NASM_DIRECTIVES_H */\n";
print H "#endif /* NASM_DIRECTIV_H */\n";
} elsif ($output eq 'c') {
%directive = ();
$n = 0;