asm/nasm.c: Move directive parsing into a separate function

Move the directive parsing out of the main loop into a separate
function.  It is much cleaner this way, and opens up for further
refactoring -- a bunch of the directives do the same thing or very
similar things.

Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
This commit is contained in:
H. Peter Anvin 2017-03-07 17:45:01 -08:00
parent f786ef7371
commit c713168bc7
2 changed files with 611 additions and 545 deletions

View File

@ -45,7 +45,10 @@ require 'phash.ph';
my($output, $directives_dat, $outfile) = @ARGV;
@directives = ();
@specials = ('none', 'unknown');
# Special values for enum directives. Note that D_none must be first
# so D_none == 0.
@specials = ('none', 'unknown', 'corrupt');
open(DD, "< ${directives_dat}\0")
or die "$0: cannot open: ${directives_dat}: $!\n";

1151
asm/nasm.c

File diff suppressed because it is too large Load Diff