diff options
author | H. Peter Anvin <hpa@zytor.com> | 2008-09-09 09:55:05 -0700 |
---|---|---|
committer | H. Peter Anvin <hpa@zytor.com> | 2008-09-09 09:55:05 -0700 |
commit | a436e9bcab604724ab0db7bb9b6ca9009b173b8d (patch) | |
tree | 9097126ed2476c9dbcdeac6d7a3d1ec8237dd060 | |
parent | c3101832076f6433aa17b676256fb30c81678ff9 (diff) | |
parent | 325a4bff508e5cdf8804c6ea3ce6b8eb08110625 (diff) | |
download | nasm-a436e9bcab604724ab0db7bb9b6ca9009b173b8d.tar.gz |
Merge branch 'master' into macho64
-rw-r--r-- | Makefile.in | 4 | ||||
-rw-r--r-- | Mkfiles/msvc.mak | 3 | ||||
-rw-r--r-- | Mkfiles/netware.mak | 3 | ||||
-rw-r--r-- | Mkfiles/openwcom.mak | 3 | ||||
-rw-r--r-- | Mkfiles/owlinux.mak | 3 | ||||
-rwxr-xr-x | macros.pl | 21 | ||||
-rw-r--r-- | output/outaout.mac | 2 |
7 files changed, 26 insertions, 13 deletions
diff --git a/Makefile.in b/Makefile.in index dbe66484..de13adcc 100644 --- a/Makefile.in +++ b/Makefile.in @@ -269,8 +269,8 @@ lib/snprintf.$(O): lib/snprintf.c compiler.h config.h nasmlib.h lib/vsnprintf.$(O): lib/vsnprintf.c compiler.h config.h nasmlib.h listing.$(O): listing.c compiler.h config.h insnsi.h listing.h nasm.h \ nasmlib.h pptok.h preproc.h regs.h version.h -macros.$(O): macros.c compiler.h config.h hashtbl.h insnsi.h nasmlib.h \ - tables.h +macros.$(O): macros.c compiler.h config.h hashtbl.h insnsi.h nasm.h \ + nasmlib.h outform.h pptok.h preproc.h regs.h tables.h version.h nasm.$(O): nasm.c assemble.h compiler.h config.h eval.h float.h insns.h \ insnsi.h labels.h listing.h nasm.h nasmlib.h outform.h parser.h pptok.h \ preproc.h raa.h regs.h saa.h stdscan.h tokens.h version.h diff --git a/Mkfiles/msvc.mak b/Mkfiles/msvc.mak index ce052fce..6e57e420 100644 --- a/Mkfiles/msvc.mak +++ b/Mkfiles/msvc.mak @@ -208,7 +208,8 @@ lib/snprintf.$(O): lib/snprintf.c compiler.h nasmlib.h lib/vsnprintf.$(O): lib/vsnprintf.c compiler.h nasmlib.h listing.$(O): listing.c compiler.h insnsi.h listing.h nasm.h nasmlib.h \ pptok.h preproc.h regs.h version.h -macros.$(O): macros.c compiler.h hashtbl.h insnsi.h nasmlib.h tables.h +macros.$(O): macros.c compiler.h hashtbl.h insnsi.h nasm.h nasmlib.h \ + outform.h pptok.h preproc.h regs.h tables.h version.h nasm.$(O): nasm.c assemble.h compiler.h eval.h float.h insns.h insnsi.h \ labels.h listing.h nasm.h nasmlib.h outform.h parser.h pptok.h preproc.h \ raa.h regs.h saa.h stdscan.h tokens.h version.h diff --git a/Mkfiles/netware.mak b/Mkfiles/netware.mak index 07843d0b..3a01e79f 100644 --- a/Mkfiles/netware.mak +++ b/Mkfiles/netware.mak @@ -149,7 +149,8 @@ snprintf.o: snprintf.c compiler.h config.h nasmlib.h vsnprintf.o: vsnprintf.c compiler.h config.h nasmlib.h listing.o: listing.c compiler.h config.h insnsi.h listing.h nasm.h nasmlib.h \ pptok.h preproc.h regs.h version.h -macros.o: macros.c compiler.h config.h hashtbl.h insnsi.h nasmlib.h tables.h +macros.o: macros.c compiler.h config.h hashtbl.h insnsi.h nasm.h nasmlib.h \ + outform.h pptok.h preproc.h regs.h tables.h version.h nasm.o: nasm.c assemble.h compiler.h config.h eval.h float.h insns.h \ insnsi.h labels.h listing.h nasm.h nasmlib.h outform.h parser.h pptok.h \ preproc.h raa.h regs.h saa.h stdscan.h tokens.h version.h diff --git a/Mkfiles/openwcom.mak b/Mkfiles/openwcom.mak index c785b03b..32b61348 100644 --- a/Mkfiles/openwcom.mak +++ b/Mkfiles/openwcom.mak @@ -237,7 +237,8 @@ lib\snprintf.$(O): lib\snprintf.c compiler.h nasmlib.h lib\vsnprintf.$(O): lib\vsnprintf.c compiler.h nasmlib.h listing.$(O): listing.c compiler.h insnsi.h listing.h nasm.h nasmlib.h & pptok.h preproc.h regs.h version.h -macros.$(O): macros.c compiler.h hashtbl.h insnsi.h nasmlib.h tables.h +macros.$(O): macros.c compiler.h hashtbl.h insnsi.h nasm.h nasmlib.h & + outform.h pptok.h preproc.h regs.h tables.h version.h nasm.$(O): nasm.c assemble.h compiler.h eval.h float.h insns.h insnsi.h & labels.h listing.h nasm.h nasmlib.h outform.h parser.h pptok.h preproc.h & raa.h regs.h saa.h stdscan.h tokens.h version.h diff --git a/Mkfiles/owlinux.mak b/Mkfiles/owlinux.mak index 8a3fd485..7eb82577 100644 --- a/Mkfiles/owlinux.mak +++ b/Mkfiles/owlinux.mak @@ -247,7 +247,8 @@ lib/snprintf.$(O): lib/snprintf.c compiler.h nasmlib.h lib/vsnprintf.$(O): lib/vsnprintf.c compiler.h nasmlib.h listing.$(O): listing.c compiler.h insnsi.h listing.h nasm.h nasmlib.h \ pptok.h preproc.h regs.h version.h -macros.$(O): macros.c compiler.h hashtbl.h insnsi.h nasmlib.h tables.h +macros.$(O): macros.c compiler.h hashtbl.h insnsi.h nasm.h nasmlib.h \ + outform.h pptok.h preproc.h regs.h tables.h version.h nasm.$(O): nasm.c assemble.h compiler.h eval.h float.h insns.h insnsi.h \ labels.h listing.h nasm.h nasmlib.h outform.h parser.h pptok.h preproc.h \ raa.h regs.h saa.h stdscan.h tokens.h version.h @@ -37,7 +37,7 @@ sub charcify(@) { # # Generate macros.c # -open(OUT,">macros.c") or die "unable to open macros.c\n"; +open(OUT,"> macros.c\0") or die "unable to open macros.c\n"; print OUT "/*\n"; print OUT " * Do not edit - this file auto-generated by macros.pl from:\n"; @@ -47,7 +47,9 @@ print OUT "\n"; print OUT "#include \"tables.h\"\n"; print OUT "#include \"nasmlib.h\"\n"; print OUT "#include \"hashtbl.h\"\n"; +print OUT "#include \"outform.h\"\n"; print OUT "\n"; +print OUT "#if 1\n"; print OUT "const unsigned char nasm_stdmac[] = {"; my $npkg = 0; @@ -60,7 +62,7 @@ my $lastname; my $z; foreach $fname ( @ARGV ) { - open(INPUT,$fname) or die "unable to open $fname\n"; + open(INPUT,"< $fname\0") or die "$0: $fname: $!\n"; while (<INPUT>) { $line++; chomp; @@ -71,9 +73,15 @@ foreach $fname ( @ARGV ) { undef $pkg; my @out_alias = split(/\s+/, $1); printf OUT " /* %4d */ 0\n", $index++; - print OUT "};\n"; + print OUT "};\n#endif\n"; $index = 0; - printf OUT "const unsigned char %s_stdmac[] = {\n", $out_alias[0]; + print OUT "\n"; + my $pfx = '#if'; + foreach my $al (@out_alias) { + print OUT $pfx, " defined(OF_\U${al}\E)"; + $pfx = ' ||'; + } + printf OUT "\nconst unsigned char %s_stdmac[] = {\n", $out_alias[0]; print OUT " /* From $fname */\n"; $lastname = $fname; push(@out_list, $out_alias[0]); @@ -84,8 +92,9 @@ foreach $fname ( @ARGV ) { die "$0: $fname: duplicate package: $pkg\n"; } printf OUT " /* %4d */ 0\n", $index++; - print OUT "};\n"; + print OUT "};\n#endif\n"; $index = 0; + print OUT "\n#if 1\n"; printf OUT "static const unsigned char nasm_stdmac_%s[] = {\n", $pkg; print OUT " /* From $fname */\n"; $lastname = $fname; @@ -126,7 +135,7 @@ foreach $fname ( @ARGV ) { } close(INPUT); } -printf OUT " /* %4d */ 0\n};\n\n", $index++; +printf OUT " /* %4d */ 0\n};\n#endif\n\n", $index++; print OUT "const unsigned char * const nasm_stdmac_after_tasm = ", "&nasm_stdmac[$tasm_count];\n\n"; diff --git a/output/outaout.mac b/output/outaout.mac index ef049a28..f00cb960 100644 --- a/output/outaout.mac +++ b/output/outaout.mac @@ -1,4 +1,4 @@ -OUT: aout +OUT: aout aoutb %define __SECT__ [section .text] %macro __NASM_CDecl__ 1 %endmacro |