mirror of
https://github.com/netwide-assembler/nasm.git
synced 2025-04-12 18:40:23 +08:00
Merge branch 'master' of git+ssh://fbkotler@repo.or.cz/srv/git/nasm
This commit is contained in:
commit
bb2018587b
@ -1,44 +1,34 @@
|
||||
These are pre-created Makefiles for various platforms, use them if
|
||||
GNU autoconf/automake packages are not supported on your system.
|
||||
|
||||
Copy appropriate Makefile to ../Makefile, look at it to see if there
|
||||
are any edits that need to be made, and run make.
|
||||
|
||||
Some of these Makefiles have been contributed by end users, and the
|
||||
NASM team has no way of knowing if they work correctly or not. For
|
||||
that reason, there are sometimes multiple Makefiles for the same
|
||||
platform. Look at the comments at the beginning to help select a
|
||||
Makefile for your particular system.
|
||||
|
||||
|
||||
The Makefiles are:
|
||||
|
||||
Filename Target Compiler Notes
|
||||
Filename Target Compiler Tested with
|
||||
---------------------------------------------------------------------------
|
||||
Makefile.b32 Win32 Borland C++ OK as of NASM 0.98.37
|
||||
Makefile.bc3 16-bit DOS Borland C++ OK as of NASM 0.98.34
|
||||
Makefile.bor 16-bit DOS Turbo C (**)
|
||||
Makefile.dcp Win32 Dev-Cpp/MinGW OK as of NASM 0.99.00
|
||||
Makefile.dj 32-bit DOS DJGPP OK as of NASM 0.98.37
|
||||
Makefile.djo 32-bit DOS DJGPP "Opus Make" version(**)
|
||||
Makefile.dl 32-bit DOS cc386 cc386 by David Lindauer
|
||||
Makefile.dos 16-bit DOS MSC 5 (**)
|
||||
Makefile.ms7 16-bit DOS MSC 7 OK as of NASM 0.98.31
|
||||
Makefile.os2 OS/2 Warp Borland C++ (**)
|
||||
Makefile.sc 32-bit DOS Symantec C++ 7
|
||||
Makefile.scw Win32 Symantec C++ 7
|
||||
Makefile.unx Unix Any(*) use only if "configure" fails
|
||||
Makefile.vc Win32 MS Visual C++ OK as of NASM 0.98.32
|
||||
Makefile.wc 32-bit DOS Watcom C (**)
|
||||
Makefile.wcd 16-bit DOS OpenWatcom C OK as of NASM 0.98.37
|
||||
Makefile.wcw Win32 Watcom C (**)
|
||||
msvc.mak Win32 MS Visual C++ Visual C++ Express 2005
|
||||
|
||||
For building on a Win32 host using Microsoft Visual C++.
|
||||
|
||||
Usage: nmake /f Mkfiles/msvc.mak
|
||||
|
||||
|
||||
(*) = This Makefile should work with any compiler which is ANSI
|
||||
C89/ISO C90 compliant and that uses the standard Unix compiler
|
||||
arguments, such as -c, -o, -I and -O. Pre-ANSI compilers,
|
||||
such as the "cc" distributed with SunOS 4.x, will not work.
|
||||
If you find a system on which you need to use this, please write
|
||||
<nasm-devel@lists.sourceforge.net> and tell us which system.
|
||||
Filename Target Compiler Tested with
|
||||
---------------------------------------------------------------------------
|
||||
openwcom.mak DOS,Win32,OS/2 OpenWatcom C OpenWatcom 1.7 (Win32)
|
||||
|
||||
(**) = Probably obsolete, needs updating.
|
||||
For building on a DOS, OS/2 or Win32 host using OpenWatcom.
|
||||
OpenWatcom can be downloaded from http://www.openwatcom.org/.
|
||||
|
||||
Usage: wmake /f Mkfiles/<filename> <target>
|
||||
|
||||
<target> is dos, win32, or os2.
|
||||
|
||||
Filename Target Compiler Tested with
|
||||
---------------------------------------------------------------------------
|
||||
owlinux.mak DOS,Win32,OS/2 OpenWatcom C OpenWatcom 1.6rc2 (Linux)
|
||||
|
||||
For building on a Linux host using OpenWatcom for Linux.
|
||||
|
||||
Usage: make -f Mkfiles/<filename> <target>
|
||||
|
||||
<target> is dos, win32, or os2.
|
||||
|
121
Mkfiles/msvc.mak
121
Mkfiles/msvc.mak
@ -171,76 +171,75 @@ everything: all doc rdf
|
||||
#-- Magic hints to mkdep.pl --#
|
||||
# @object-ending: ".$(O)"
|
||||
# @path-separator: "/"
|
||||
# @exclude: "config.h"
|
||||
#-- Everything below is generated by mkdep.pl - do not edit --#
|
||||
assemble.$(O): assemble.c assemble.h compiler.h config.h insns.h insnsi.h \
|
||||
nasm.h nasmlib.h pptok.h preproc.h regflags.c regs.h regvals.c tokens.h \
|
||||
version.h
|
||||
assemble.$(O): assemble.c assemble.h compiler.h insns.h insnsi.h nasm.h \
|
||||
nasmlib.h pptok.h preproc.h regflags.c regs.h regvals.c tokens.h version.h
|
||||
crc64.$(O): crc64.c
|
||||
disasm.$(O): disasm.c compiler.h config.h disasm.h insns.h insnsi.h insnsn.c \
|
||||
names.c nasm.h nasmlib.h regdis.c regs.c regs.h sync.h tokens.h version.h
|
||||
eval.$(O): eval.c compiler.h config.h eval.h float.h insnsi.h labels.h \
|
||||
nasm.h nasmlib.h regs.h version.h
|
||||
exprlib.$(O): exprlib.c compiler.h config.h insnsi.h nasm.h nasmlib.h regs.h \
|
||||
version.h
|
||||
float.$(O): float.c compiler.h config.h insnsi.h nasm.h nasmlib.h regs.h \
|
||||
version.h
|
||||
hashtbl.$(O): hashtbl.c compiler.h config.h hashtbl.h insnsi.h nasm.h \
|
||||
disasm.$(O): disasm.c compiler.h disasm.h insns.h insnsi.h insnsn.c names.c \
|
||||
nasm.h nasmlib.h regdis.c regs.c regs.h sync.h tokens.h version.h
|
||||
eval.$(O): eval.c compiler.h eval.h float.h insnsi.h labels.h nasm.h \
|
||||
nasmlib.h regs.h version.h
|
||||
insnsa.$(O): insnsa.c compiler.h config.h insns.h insnsi.h nasm.h nasmlib.h \
|
||||
regs.h tokens.h version.h
|
||||
insnsd.$(O): insnsd.c compiler.h config.h insns.h insnsi.h nasm.h nasmlib.h \
|
||||
regs.h tokens.h version.h
|
||||
exprlib.$(O): exprlib.c compiler.h insnsi.h nasm.h nasmlib.h regs.h \
|
||||
version.h
|
||||
float.$(O): float.c compiler.h insnsi.h nasm.h nasmlib.h regs.h version.h
|
||||
hashtbl.$(O): hashtbl.c compiler.h hashtbl.h insnsi.h nasm.h nasmlib.h \
|
||||
regs.h version.h
|
||||
insnsa.$(O): insnsa.c compiler.h insns.h insnsi.h nasm.h nasmlib.h regs.h \
|
||||
tokens.h version.h
|
||||
insnsd.$(O): insnsd.c compiler.h insns.h insnsi.h nasm.h nasmlib.h regs.h \
|
||||
tokens.h version.h
|
||||
insnsn.$(O): insnsn.c
|
||||
labels.$(O): labels.c compiler.h config.h hashtbl.h insnsi.h nasm.h \
|
||||
nasmlib.h regs.h version.h
|
||||
listing.$(O): listing.c compiler.h config.h insnsi.h listing.h nasm.h \
|
||||
nasmlib.h regs.h version.h
|
||||
labels.$(O): labels.c compiler.h hashtbl.h insnsi.h nasm.h nasmlib.h regs.h \
|
||||
version.h
|
||||
listing.$(O): listing.c compiler.h insnsi.h listing.h nasm.h nasmlib.h \
|
||||
regs.h version.h
|
||||
macros.$(O): macros.c
|
||||
names.$(O): names.c insnsn.c regs.c
|
||||
nasm.$(O): nasm.c assemble.h compiler.h config.h eval.h insns.h insnsi.h \
|
||||
labels.h listing.h nasm.h nasmlib.h outform.h parser.h pptok.h preproc.h \
|
||||
regs.h stdscan.h tokens.h version.h
|
||||
nasmlib.$(O): nasmlib.c compiler.h config.h insns.h insnsi.h nasm.h \
|
||||
nasmlib.h regs.h tokens.h version.h
|
||||
ndisasm.$(O): ndisasm.c compiler.h config.h disasm.h insns.h insnsi.h nasm.h \
|
||||
nasm.$(O): nasm.c assemble.h compiler.h eval.h insns.h insnsi.h labels.h \
|
||||
listing.h nasm.h nasmlib.h outform.h parser.h pptok.h preproc.h regs.h \
|
||||
stdscan.h tokens.h version.h
|
||||
nasmlib.$(O): nasmlib.c compiler.h insns.h insnsi.h nasm.h nasmlib.h regs.h \
|
||||
tokens.h version.h
|
||||
ndisasm.$(O): ndisasm.c compiler.h disasm.h insns.h insnsi.h nasm.h \
|
||||
nasmlib.h regs.h sync.h tokens.h version.h
|
||||
outform.$(O): outform.c compiler.h config.h insnsi.h nasm.h nasmlib.h \
|
||||
outform.$(O): outform.c compiler.h insnsi.h nasm.h nasmlib.h outform.h \
|
||||
regs.h version.h
|
||||
output/outaout.$(O): output/outaout.c compiler.h insnsi.h nasm.h nasmlib.h \
|
||||
outform.h regs.h stdscan.h version.h
|
||||
output/outas86.$(O): output/outas86.c compiler.h insnsi.h nasm.h nasmlib.h \
|
||||
outform.h regs.h version.h
|
||||
output/outaout.$(O): output/outaout.c compiler.h config.h insnsi.h nasm.h \
|
||||
nasmlib.h outform.h regs.h stdscan.h version.h
|
||||
output/outas86.$(O): output/outas86.c compiler.h config.h insnsi.h nasm.h \
|
||||
nasmlib.h outform.h regs.h version.h
|
||||
output/outbin.$(O): output/outbin.c compiler.h config.h eval.h insnsi.h \
|
||||
labels.h nasm.h nasmlib.h outform.h regs.h stdscan.h version.h
|
||||
output/outcoff.$(O): output/outcoff.c compiler.h config.h insnsi.h nasm.h \
|
||||
nasmlib.h outform.h regs.h version.h
|
||||
output/outdbg.$(O): output/outdbg.c compiler.h config.h insnsi.h nasm.h \
|
||||
nasmlib.h outform.h regs.h version.h
|
||||
output/outelf32.$(O): output/outelf32.c compiler.h config.h insnsi.h nasm.h \
|
||||
nasmlib.h outform.h regs.h stdscan.h version.h
|
||||
output/outelf64.$(O): output/outelf64.c compiler.h config.h insnsi.h nasm.h \
|
||||
nasmlib.h outform.h regs.h stdscan.h version.h
|
||||
output/outieee.$(O): output/outieee.c compiler.h config.h insnsi.h nasm.h \
|
||||
nasmlib.h outform.h regs.h version.h
|
||||
output/outmacho.$(O): output/outmacho.c compiler.h config.h insnsi.h nasm.h \
|
||||
nasmlib.h outform.h regs.h version.h
|
||||
output/outobj.$(O): output/outobj.c compiler.h config.h insnsi.h nasm.h \
|
||||
nasmlib.h outform.h regs.h stdscan.h version.h
|
||||
output/outrdf.$(O): output/outrdf.c compiler.h config.h insnsi.h nasm.h \
|
||||
nasmlib.h outform.h regs.h version.h
|
||||
output/outrdf2.$(O): output/outrdf2.c compiler.h config.h insnsi.h nasm.h \
|
||||
nasmlib.h outform.h rdoff/rdoff.h regs.h version.h
|
||||
parser.$(O): parser.c compiler.h config.h float.h insns.h insnsi.h nasm.h \
|
||||
nasmlib.h parser.h regflags.c regs.h stdscan.h tokens.h version.h
|
||||
pptok.$(O): pptok.c compiler.h config.h nasmlib.h pptok.h preproc.h
|
||||
preproc.$(O): preproc.c compiler.h config.h hashtbl.h insnsi.h macros.c \
|
||||
nasm.h nasmlib.h pptok.h preproc.h regs.h version.h
|
||||
output/outbin.$(O): output/outbin.c compiler.h eval.h insnsi.h labels.h \
|
||||
nasm.h nasmlib.h outform.h regs.h stdscan.h version.h
|
||||
output/outcoff.$(O): output/outcoff.c compiler.h insnsi.h nasm.h nasmlib.h \
|
||||
outform.h regs.h version.h
|
||||
output/outdbg.$(O): output/outdbg.c compiler.h insnsi.h nasm.h nasmlib.h \
|
||||
outform.h regs.h version.h
|
||||
output/outelf32.$(O): output/outelf32.c compiler.h insnsi.h nasm.h nasmlib.h \
|
||||
outform.h regs.h stdscan.h version.h
|
||||
output/outelf64.$(O): output/outelf64.c compiler.h insnsi.h nasm.h nasmlib.h \
|
||||
outform.h regs.h stdscan.h version.h
|
||||
output/outieee.$(O): output/outieee.c compiler.h insnsi.h nasm.h nasmlib.h \
|
||||
outform.h regs.h version.h
|
||||
output/outmacho.$(O): output/outmacho.c compiler.h insnsi.h nasm.h nasmlib.h \
|
||||
outform.h regs.h version.h
|
||||
output/outobj.$(O): output/outobj.c compiler.h insnsi.h nasm.h nasmlib.h \
|
||||
outform.h regs.h stdscan.h version.h
|
||||
output/outrdf.$(O): output/outrdf.c compiler.h insnsi.h nasm.h nasmlib.h \
|
||||
outform.h regs.h version.h
|
||||
output/outrdf2.$(O): output/outrdf2.c compiler.h insnsi.h nasm.h nasmlib.h \
|
||||
outform.h rdoff/rdoff.h regs.h version.h
|
||||
parser.$(O): parser.c compiler.h float.h insns.h insnsi.h nasm.h nasmlib.h \
|
||||
parser.h regflags.c regs.h stdscan.h tokens.h version.h
|
||||
pptok.$(O): pptok.c compiler.h nasmlib.h pptok.h preproc.h
|
||||
preproc.$(O): preproc.c compiler.h hashtbl.h insnsi.h macros.c nasm.h \
|
||||
nasmlib.h pptok.h preproc.h regs.h version.h
|
||||
regdis.$(O): regdis.c
|
||||
regflags.$(O): regflags.c
|
||||
regs.$(O): regs.c
|
||||
regvals.$(O): regvals.c
|
||||
stdscan.$(O): stdscan.c compiler.h config.h insns.h insnsi.h nasm.h \
|
||||
nasmlib.h regs.h stdscan.h tokens.h version.h
|
||||
sync.$(O): sync.c compiler.h config.h nasmlib.h sync.h
|
||||
tokhash.$(O): tokhash.c compiler.h config.h insns.h insnsi.h nasm.h \
|
||||
nasmlib.h regs.h tokens.h version.h
|
||||
stdscan.$(O): stdscan.c compiler.h insns.h insnsi.h nasm.h nasmlib.h regs.h \
|
||||
stdscan.h tokens.h version.h
|
||||
sync.$(O): sync.c compiler.h nasmlib.h sync.h
|
||||
tokhash.$(O): tokhash.c compiler.h insns.h insnsi.h nasm.h nasmlib.h regs.h \
|
||||
tokens.h version.h
|
||||
|
270
Mkfiles/openwcom.mak
Normal file
270
Mkfiles/openwcom.mak
Normal file
@ -0,0 +1,270 @@
|
||||
# -*- makefile -*-
|
||||
#
|
||||
# Makefile for building NASM using OpenWatcom 1.7
|
||||
# building on a DOS/Win/OS2 platform host (backslashes
|
||||
# used in pathnames)
|
||||
#
|
||||
|
||||
top_srcdir = .
|
||||
srcdir = .
|
||||
VPATH = .\output
|
||||
prefix = C:\Program Files\NASM
|
||||
exec_prefix = $(prefix)
|
||||
bindir = $(prefix)\bin
|
||||
mandir = $(prefix)\man
|
||||
|
||||
CC = wcl386
|
||||
CFLAGS = -3 -bcl=$(TARGET) -ox -wx -ze -fpi
|
||||
BUILD_CFLAGS = $(CFLAGS) # -I$(srcdir)/inttypes
|
||||
INTERNAL_CFLAGS = -I$(srcdir) -I.
|
||||
ALL_CFLAGS = $(BUILD_CFLAGS) $(INTERNAL_CFLAGS)
|
||||
LD = $(CC)
|
||||
LDFLAGS = $(ALL_CFLAGS)
|
||||
LIBS =
|
||||
PERL = perl -I$(srcdir)/perllib
|
||||
|
||||
STRIP = wstrip
|
||||
|
||||
# Binary suffixes
|
||||
O = obj
|
||||
X = .exe
|
||||
|
||||
# WMAKE errors out if a suffix is declared more than once, including
|
||||
# its own built-in declarations. Thus, we need to explicitly clear the list
|
||||
# first. Also, WMAKE only allows implicit rules that point "to the left"
|
||||
# in this list!
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .man .1 .$(O) .i .c
|
||||
|
||||
# Needed to find C files anywhere but in the current directory
|
||||
.c : $(VPATH)
|
||||
|
||||
.c.$(O):
|
||||
$(CC) -c $(ALL_CFLAGS) -fo=$^@ $[@
|
||||
|
||||
# Note: wcl386 is broken if forward slashes are used as path separators.
|
||||
NASM = nasm.$(O) nasmlib.$(O) float.$(O) insnsa.$(O) assemble.$(O) &
|
||||
labels.$(O) hashtbl.$(O) crc64.$(O) parser.$(O) &
|
||||
outform.$(O) output\outbin.$(O) &
|
||||
output\outaout.$(O) output\outcoff.$(O) &
|
||||
output\outelf32.$(O) output\outelf64.$(O) &
|
||||
output\outobj.$(O) output\outas86.$(O) output\outrdf2.$(O) &
|
||||
output\outdbg.$(O) output\outieee.$(O) output\outmacho.$(O) &
|
||||
preproc.$(O) pptok.$(O) &
|
||||
listing.$(O) eval.$(O) exprlib.$(O) stdscan.$(O) tokhash.$(O)
|
||||
|
||||
NDISASM = ndisasm.$(O) disasm.$(O) sync.$(O) nasmlib.$(O) insnsd.$(O)
|
||||
|
||||
what: .SYMBOLIC
|
||||
@echo Please build "dos", "win32" or "os2"
|
||||
|
||||
dos: .SYMBOLIC
|
||||
$(MAKE) /f $(__MAKEFILES__) all TARGET=DOS4G
|
||||
|
||||
win32: .SYMBOLIC
|
||||
$(MAKE) /f $(__MAKEFILES__) all TARGET=NT
|
||||
|
||||
os2: .SYMBOLIC
|
||||
$(MAKE) /f $(__MAKEFILES__) all TARGET=OS2V2
|
||||
|
||||
all: nasm$(X) ndisasm$(X) .SYMBOLIC
|
||||
rem cd rdoff && $(MAKE) all
|
||||
|
||||
nasm$(X): $(NASM)
|
||||
$(LD) $(LDFLAGS) -fe=nasm$(X) $(NASM) $(LIBS)
|
||||
|
||||
ndisasm$(X): $(NDISASM)
|
||||
$(LD) $(LDFLAGS) -fe=ndisasm$(X) $(NDISASM) $(LIBS)
|
||||
|
||||
# These source files are automagically generated from a single
|
||||
# instruction-table file by a Perl script. They're distributed,
|
||||
# though, so it isn't necessary to have Perl just to recompile NASM
|
||||
# from the distribution.
|
||||
|
||||
insnsa.c: insns.dat insns.pl
|
||||
$(PERL) $(srcdir)/insns.pl -a $(srcdir)/insns.dat
|
||||
insnsd.c: insns.dat insns.pl
|
||||
$(PERL) $(srcdir)/insns.pl -d $(srcdir)/insns.dat
|
||||
insnsi.h: insns.dat insns.pl
|
||||
$(PERL) $(srcdir)/insns.pl -i $(srcdir)/insns.dat
|
||||
insnsn.c: insns.dat insns.pl
|
||||
$(PERL) $(srcdir)/insns.pl -n $(srcdir)/insns.dat
|
||||
|
||||
# These files contains all the standard macros that are derived from
|
||||
# the version number.
|
||||
version.h: version version.pl
|
||||
$(PERL) $(srcdir)/version.pl h < $(srcdir)/version > version.h
|
||||
|
||||
version.mac: version version.pl
|
||||
$(PERL) $(srcdir)/version.pl mac < $(srcdir)/version > version.mac
|
||||
|
||||
# This source file is generated from the standard macros file
|
||||
# `standard.mac' by another Perl script. Again, it's part of the
|
||||
# standard distribution.
|
||||
|
||||
macros.c: macros.pl standard.mac version.mac
|
||||
$(PERL) $(srcdir)/macros.pl $(srcdir)/standard.mac version.mac
|
||||
|
||||
# These source files are generated from regs.dat by yet another
|
||||
# perl script.
|
||||
regs.c: regs.dat regs.pl
|
||||
$(PERL) $(srcdir)/regs.pl c $(srcdir)/regs.dat > regs.c
|
||||
regflags.c: regs.dat regs.pl
|
||||
$(PERL) $(srcdir)/regs.pl fc $(srcdir)/regs.dat > regflags.c
|
||||
regdis.c: regs.dat regs.pl
|
||||
$(PERL) $(srcdir)/regs.pl dc $(srcdir)/regs.dat > regdis.c
|
||||
regvals.c: regs.dat regs.pl
|
||||
$(PERL) $(srcdir)/regs.pl vc $(srcdir)/regs.dat > regvals.c
|
||||
regs.h: regs.dat regs.pl
|
||||
$(PERL) $(srcdir)/regs.pl h $(srcdir)/regs.dat > regs.h
|
||||
|
||||
# Assembler token hash
|
||||
tokhash.c: insns.dat regs.dat tokens.dat tokhash.pl perllib/phash.ph
|
||||
$(PERL) $(srcdir)/tokhash.pl c $(srcdir)/insns.dat $(srcdir)/regs.dat &
|
||||
$(srcdir)/tokens.dat > tokhash.c
|
||||
|
||||
# Assembler token metadata
|
||||
tokens.h: insns.dat regs.dat tokens.dat tokhash.pl perllib/phash.ph
|
||||
$(PERL) $(srcdir)/tokhash.pl h $(srcdir)/insns.dat $(srcdir)/regs.dat &
|
||||
$(srcdir)/tokens.dat > tokens.h
|
||||
|
||||
# Preprocessor token hash
|
||||
pptok.h: pptok.dat pptok.pl perllib/phash.ph
|
||||
$(PERL) $(srcdir)/pptok.pl h $(srcdir)/pptok.dat pptok.h
|
||||
pptok.c: pptok.dat pptok.pl perllib/phash.ph
|
||||
$(PERL) $(srcdir)/pptok.pl c $(srcdir)/pptok.dat pptok.c
|
||||
|
||||
# This target generates all files that require perl.
|
||||
# This allows easier generation of distribution (see dist target).
|
||||
PERLREQ = macros.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
|
||||
perlreq: $(PERLREQ)
|
||||
|
||||
clean: .SYMBOLIC
|
||||
-del /f *.$(O)
|
||||
-del /f *.s
|
||||
-del /f *.i
|
||||
-del /f output\*.$(O)
|
||||
-del /f output\*.s
|
||||
-del /f output\*.i
|
||||
-del /f nasm$(X)
|
||||
-del /f ndisasm$(X)
|
||||
rem cd rdoff && $(MAKE) clean
|
||||
|
||||
distclean: clean .SYMBOLIC
|
||||
-del /f config.h
|
||||
-del /f config.log
|
||||
-del /f config.status
|
||||
-del /f Makefile
|
||||
-del /f *~
|
||||
-del /f *.bak
|
||||
-del /f *.lst
|
||||
-del /f *.bin
|
||||
-del /f output\*~
|
||||
-del /f output\*.bak
|
||||
-del /f test\*.lst
|
||||
-del /f test\*.bin
|
||||
-del /f test\*.$(O)
|
||||
-del /f test\*.bin
|
||||
-del /f/s autom4te*.cache
|
||||
rem cd rdoff && $(MAKE) distclean
|
||||
|
||||
cleaner: clean .SYMBOLIC
|
||||
-del /f $(PERLREQ)
|
||||
-del /f *.man
|
||||
-del /f nasm.spec
|
||||
rem cd doc && $(MAKE) clean
|
||||
|
||||
spotless: distclean cleaner .SYMBOLIC
|
||||
-del /f doc\Makefile
|
||||
-del doc\*~
|
||||
-del doc\*.bak
|
||||
|
||||
strip: .SYMBOLIC
|
||||
$(STRIP) *.exe
|
||||
|
||||
rdf:
|
||||
# cd rdoff && $(MAKE)
|
||||
|
||||
doc:
|
||||
# cd doc && $(MAKE) all
|
||||
|
||||
everything: all doc rdf
|
||||
|
||||
#-- Magic hints to mkdep.pl --#
|
||||
# @object-ending: ".$(O)"
|
||||
# @path-separator: "\"
|
||||
# @exclude: "config.h"
|
||||
# @continuation: "&"
|
||||
#-- Everything below is generated by mkdep.pl - do not edit --#
|
||||
assemble.$(O): assemble.c assemble.h compiler.h insns.h insnsi.h nasm.h &
|
||||
nasmlib.h pptok.h preproc.h regflags.c regs.h regvals.c tokens.h version.h
|
||||
crc64.$(O): crc64.c
|
||||
disasm.$(O): disasm.c compiler.h disasm.h insns.h insnsi.h insnsn.c names.c &
|
||||
nasm.h nasmlib.h regdis.c regs.c regs.h sync.h tokens.h version.h
|
||||
eval.$(O): eval.c compiler.h eval.h float.h insnsi.h labels.h nasm.h &
|
||||
nasmlib.h regs.h version.h
|
||||
exprlib.$(O): exprlib.c compiler.h insnsi.h nasm.h nasmlib.h regs.h &
|
||||
version.h
|
||||
float.$(O): float.c compiler.h insnsi.h nasm.h nasmlib.h regs.h version.h
|
||||
hashtbl.$(O): hashtbl.c compiler.h hashtbl.h insnsi.h nasm.h nasmlib.h &
|
||||
regs.h version.h
|
||||
insnsa.$(O): insnsa.c compiler.h insns.h insnsi.h nasm.h nasmlib.h regs.h &
|
||||
tokens.h version.h
|
||||
insnsd.$(O): insnsd.c compiler.h insns.h insnsi.h nasm.h nasmlib.h regs.h &
|
||||
tokens.h version.h
|
||||
insnsn.$(O): insnsn.c
|
||||
labels.$(O): labels.c compiler.h hashtbl.h insnsi.h nasm.h nasmlib.h regs.h &
|
||||
version.h
|
||||
listing.$(O): listing.c compiler.h insnsi.h listing.h nasm.h nasmlib.h &
|
||||
regs.h version.h
|
||||
macros.$(O): macros.c
|
||||
names.$(O): names.c insnsn.c regs.c
|
||||
nasm.$(O): nasm.c assemble.h compiler.h eval.h insns.h insnsi.h labels.h &
|
||||
listing.h nasm.h nasmlib.h outform.h parser.h pptok.h preproc.h regs.h &
|
||||
stdscan.h tokens.h version.h
|
||||
nasmlib.$(O): nasmlib.c compiler.h insns.h insnsi.h nasm.h nasmlib.h regs.h &
|
||||
tokens.h version.h
|
||||
ndisasm.$(O): ndisasm.c compiler.h disasm.h insns.h insnsi.h nasm.h &
|
||||
nasmlib.h regs.h sync.h tokens.h version.h
|
||||
outform.$(O): outform.c compiler.h insnsi.h nasm.h nasmlib.h outform.h &
|
||||
regs.h version.h
|
||||
output\outaout.$(O): output\outaout.c compiler.h insnsi.h nasm.h nasmlib.h &
|
||||
outform.h regs.h stdscan.h version.h
|
||||
output\outas86.$(O): output\outas86.c compiler.h insnsi.h nasm.h nasmlib.h &
|
||||
outform.h regs.h version.h
|
||||
output\outbin.$(O): output\outbin.c compiler.h eval.h insnsi.h labels.h &
|
||||
nasm.h nasmlib.h outform.h regs.h stdscan.h version.h
|
||||
output\outcoff.$(O): output\outcoff.c compiler.h insnsi.h nasm.h nasmlib.h &
|
||||
outform.h regs.h version.h
|
||||
output\outdbg.$(O): output\outdbg.c compiler.h insnsi.h nasm.h nasmlib.h &
|
||||
outform.h regs.h version.h
|
||||
output\outelf32.$(O): output\outelf32.c compiler.h insnsi.h nasm.h nasmlib.h &
|
||||
outform.h regs.h stdscan.h version.h
|
||||
output\outelf64.$(O): output\outelf64.c compiler.h insnsi.h nasm.h nasmlib.h &
|
||||
outform.h regs.h stdscan.h version.h
|
||||
output\outieee.$(O): output\outieee.c compiler.h insnsi.h nasm.h nasmlib.h &
|
||||
outform.h regs.h version.h
|
||||
output\outmacho.$(O): output\outmacho.c compiler.h insnsi.h nasm.h nasmlib.h &
|
||||
outform.h regs.h version.h
|
||||
output\outobj.$(O): output\outobj.c compiler.h insnsi.h nasm.h nasmlib.h &
|
||||
outform.h regs.h stdscan.h version.h
|
||||
output\outrdf.$(O): output\outrdf.c compiler.h insnsi.h nasm.h nasmlib.h &
|
||||
outform.h regs.h version.h
|
||||
output\outrdf2.$(O): output\outrdf2.c compiler.h insnsi.h nasm.h nasmlib.h &
|
||||
outform.h rdoff\rdoff.h regs.h version.h
|
||||
parser.$(O): parser.c compiler.h float.h insns.h insnsi.h nasm.h nasmlib.h &
|
||||
parser.h regflags.c regs.h stdscan.h tokens.h version.h
|
||||
pptok.$(O): pptok.c compiler.h nasmlib.h pptok.h preproc.h
|
||||
preproc.$(O): preproc.c compiler.h hashtbl.h insnsi.h macros.c nasm.h &
|
||||
nasmlib.h pptok.h preproc.h regs.h version.h
|
||||
regdis.$(O): regdis.c
|
||||
regflags.$(O): regflags.c
|
||||
regs.$(O): regs.c
|
||||
regvals.$(O): regvals.c
|
||||
stdscan.$(O): stdscan.c compiler.h insns.h insnsi.h nasm.h nasmlib.h regs.h &
|
||||
stdscan.h tokens.h version.h
|
||||
sync.$(O): sync.c compiler.h nasmlib.h sync.h
|
||||
tokhash.$(O): tokhash.c compiler.h insns.h insnsi.h nasm.h nasmlib.h regs.h &
|
||||
tokens.h version.h
|
263
Mkfiles/owlinux.mak
Normal file
263
Mkfiles/owlinux.mak
Normal file
@ -0,0 +1,263 @@
|
||||
# -*- makefile -*-
|
||||
#
|
||||
# Makefile for cross-compiling NASM from Linux
|
||||
# to DOS, Win32 or OS/2 using OpenWatcom.
|
||||
#
|
||||
|
||||
top_srcdir = .
|
||||
srcdir = .
|
||||
prefix = C:/Program Files/NASM
|
||||
exec_prefix = $(prefix)
|
||||
bindir = $(prefix)/bin
|
||||
mandir = $(prefix)/man
|
||||
|
||||
CC = wcl386
|
||||
CFLAGS = -3 -bcl=$(TARGET) -ox -wx -ze -fpi
|
||||
BUILD_CFLAGS = $(CFLAGS) # -I$(srcdir)/inttypes
|
||||
INTERNAL_CFLAGS = -I$(srcdir) -I.
|
||||
ALL_CFLAGS = $(BUILD_CFLAGS) $(INTERNAL_CFLAGS)
|
||||
LD = $(CC)
|
||||
LDFLAGS = $(ALL_CFLAGS)
|
||||
LIBS =
|
||||
PERL = perl -I$(srcdir)/perllib
|
||||
|
||||
STRIP = wstrip
|
||||
|
||||
# Binary suffixes
|
||||
O = obj
|
||||
X = .exe
|
||||
|
||||
# WMAKE errors out if a suffix is declared more than once, including
|
||||
# its own built-in declarations. Thus, we need to explicitly clear the list
|
||||
# first. Also, WMAKE only allows implicit rules that point "to the left"
|
||||
# in this list!
|
||||
.SUFFIXES:
|
||||
.SUFFIXES: .man .1 .$(O) .i .c
|
||||
|
||||
.c.$(O):
|
||||
$(CC) -c $(ALL_CFLAGS) -fo=$@ $<
|
||||
|
||||
NASM = nasm.$(O) nasmlib.$(O) float.$(O) insnsa.$(O) assemble.$(O) \
|
||||
labels.$(O) hashtbl.$(O) crc64.$(O) parser.$(O) \
|
||||
outform.$(O) output/outbin.$(O) \
|
||||
output/outaout.$(O) output/outcoff.$(O) \
|
||||
output/outelf32.$(O) output/outelf64.$(O) \
|
||||
output/outobj.$(O) output/outas86.$(O) output/outrdf2.$(O) \
|
||||
output/outdbg.$(O) output/outieee.$(O) output/outmacho.$(O) \
|
||||
preproc.$(O) pptok.$(O) \
|
||||
listing.$(O) eval.$(O) exprlib.$(O) stdscan.$(O) tokhash.$(O)
|
||||
|
||||
NDISASM = ndisasm.$(O) disasm.$(O) sync.$(O) nasmlib.$(O) insnsd.$(O)
|
||||
|
||||
what:
|
||||
@echo 'Please build "dos", "win32" or "os2"'
|
||||
|
||||
dos:
|
||||
$(MAKE) -f $(MAKEFILE_LIST) all TARGET=DOS4G
|
||||
|
||||
win32:
|
||||
$(MAKE) -f $(MAKEFILE_LIST) all TARGET=NT
|
||||
|
||||
os2:
|
||||
$(MAKE) -f $(MAKEFILE_LIST) all TARGET=OS2V2
|
||||
|
||||
all: nasm$(X) ndisasm$(X)
|
||||
|
||||
nasm$(X): $(NASM)
|
||||
$(LD) $(LDFLAGS) -fe=nasm$(X) $(NASM) $(LIBS)
|
||||
|
||||
ndisasm$(X): $(NDISASM)
|
||||
$(LD) $(LDFLAGS) -fe=ndisasm$(X) $(NDISASM) $(LIBS)
|
||||
|
||||
# These source files are automagically generated from a single
|
||||
# instruction-table file by a Perl script. They're distributed,
|
||||
# though, so it isn't necessary to have Perl just to recompile NASM
|
||||
# from the distribution.
|
||||
|
||||
insnsa.c: insns.dat insns.pl
|
||||
$(PERL) $(srcdir)/insns.pl -a $(srcdir)/insns.dat
|
||||
insnsd.c: insns.dat insns.pl
|
||||
$(PERL) $(srcdir)/insns.pl -d $(srcdir)/insns.dat
|
||||
insnsi.h: insns.dat insns.pl
|
||||
$(PERL) $(srcdir)/insns.pl -i $(srcdir)/insns.dat
|
||||
insnsn.c: insns.dat insns.pl
|
||||
$(PERL) $(srcdir)/insns.pl -n $(srcdir)/insns.dat
|
||||
|
||||
# These files contains all the standard macros that are derived from
|
||||
# the version number.
|
||||
version.h: version version.pl
|
||||
$(PERL) $(srcdir)/version.pl h < $(srcdir)/version > version.h
|
||||
|
||||
version.mac: version version.pl
|
||||
$(PERL) $(srcdir)/version.pl mac < $(srcdir)/version > version.mac
|
||||
|
||||
# This source file is generated from the standard macros file
|
||||
# `standard.mac' by another Perl script. Again, it's part of the
|
||||
# standard distribution.
|
||||
|
||||
macros.c: macros.pl standard.mac version.mac
|
||||
$(PERL) $(srcdir)/macros.pl $(srcdir)/standard.mac version.mac
|
||||
|
||||
# These source files are generated from regs.dat by yet another
|
||||
# perl script.
|
||||
regs.c: regs.dat regs.pl
|
||||
$(PERL) $(srcdir)/regs.pl c $(srcdir)/regs.dat > regs.c
|
||||
regflags.c: regs.dat regs.pl
|
||||
$(PERL) $(srcdir)/regs.pl fc $(srcdir)/regs.dat > regflags.c
|
||||
regdis.c: regs.dat regs.pl
|
||||
$(PERL) $(srcdir)/regs.pl dc $(srcdir)/regs.dat > regdis.c
|
||||
regvals.c: regs.dat regs.pl
|
||||
$(PERL) $(srcdir)/regs.pl vc $(srcdir)/regs.dat > regvals.c
|
||||
regs.h: regs.dat regs.pl
|
||||
$(PERL) $(srcdir)/regs.pl h $(srcdir)/regs.dat > regs.h
|
||||
|
||||
# Assembler token hash
|
||||
tokhash.c: insns.dat regs.dat tokens.dat tokhash.pl perllib/phash.ph
|
||||
$(PERL) $(srcdir)/tokhash.pl c $(srcdir)/insns.dat $(srcdir)/regs.dat \
|
||||
$(srcdir)/tokens.dat > tokhash.c
|
||||
|
||||
# Assembler token metadata
|
||||
tokens.h: insns.dat regs.dat tokens.dat tokhash.pl perllib/phash.ph
|
||||
$(PERL) $(srcdir)/tokhash.pl h $(srcdir)/insns.dat $(srcdir)/regs.dat \
|
||||
$(srcdir)/tokens.dat > tokens.h
|
||||
|
||||
# Preprocessor token hash
|
||||
pptok.h: pptok.dat pptok.pl perllib/phash.ph
|
||||
$(PERL) $(srcdir)/pptok.pl h $(srcdir)/pptok.dat pptok.h
|
||||
pptok.c: pptok.dat pptok.pl perllib/phash.ph
|
||||
$(PERL) $(srcdir)/pptok.pl c $(srcdir)/pptok.dat pptok.c
|
||||
|
||||
# This target generates all files that require perl.
|
||||
# This allows easier generation of distribution (see dist target).
|
||||
PERLREQ = macros.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
|
||||
perlreq: $(PERLREQ)
|
||||
|
||||
clean:
|
||||
-rm -f *.$(O)
|
||||
-rm -f *.s
|
||||
-rm -f *.i
|
||||
-rm -f output/*.$(O)
|
||||
-rm -f output/*.s
|
||||
-rm -f output/*.i
|
||||
-rm -f nasm$(X)
|
||||
-rm -f ndisasm$(X)
|
||||
cd rdoff && $(MAKE) clean
|
||||
|
||||
distclean: clean .SYMBOLIC
|
||||
-rm -f config.h
|
||||
-rm -f config.log
|
||||
-rm -f config.status
|
||||
-rm -f Makefile
|
||||
-rm -f *~
|
||||
-rm -f *.bak
|
||||
-rm -f *.lst
|
||||
-rm -f *.bin
|
||||
-rm -f output/*~
|
||||
-rm -f output/*.bak
|
||||
-rm -f test/*.lst
|
||||
-rm -f test/*.bin
|
||||
-rm -f test/*.$(O)
|
||||
-rm -f test/*.bin
|
||||
-rm -f/s autom4te*.cache
|
||||
cd rdoff && $(MAKE) distclean
|
||||
|
||||
cleaner: clean .SYMBOLIC
|
||||
-rm -f $(PERLREQ)
|
||||
-rm -f *.man
|
||||
-rm -f nasm.spec
|
||||
cd doc && $(MAKE) clean
|
||||
|
||||
spotless: distclean cleaner .SYMBOLIC
|
||||
-rm -f doc/Makefile
|
||||
-rm -f doc/*~
|
||||
-rm -f doc/*.bak
|
||||
|
||||
strip:
|
||||
$(STRIP) *.exe
|
||||
|
||||
rdf:
|
||||
# cd rdoff && $(MAKE)
|
||||
|
||||
doc:
|
||||
# cd doc && $(MAKE) all
|
||||
|
||||
everything: all doc rdf
|
||||
|
||||
#-- Magic hints to mkdep.pl --#
|
||||
# @object-ending: ".$(O)"
|
||||
# @path-separator: "/"
|
||||
# @exclude: "config.h"
|
||||
# @continuation: "\"
|
||||
#-- Everything below is generated by mkdep.pl - do not edit --#
|
||||
assemble.$(O): assemble.c assemble.h compiler.h insns.h insnsi.h nasm.h \
|
||||
nasmlib.h pptok.h preproc.h regflags.c regs.h regvals.c tokens.h version.h
|
||||
crc64.$(O): crc64.c
|
||||
disasm.$(O): disasm.c compiler.h disasm.h insns.h insnsi.h insnsn.c names.c \
|
||||
nasm.h nasmlib.h regdis.c regs.c regs.h sync.h tokens.h version.h
|
||||
eval.$(O): eval.c compiler.h eval.h float.h insnsi.h labels.h nasm.h \
|
||||
nasmlib.h regs.h version.h
|
||||
exprlib.$(O): exprlib.c compiler.h insnsi.h nasm.h nasmlib.h regs.h \
|
||||
version.h
|
||||
float.$(O): float.c compiler.h insnsi.h nasm.h nasmlib.h regs.h version.h
|
||||
hashtbl.$(O): hashtbl.c compiler.h hashtbl.h insnsi.h nasm.h nasmlib.h \
|
||||
regs.h version.h
|
||||
insnsa.$(O): insnsa.c compiler.h insns.h insnsi.h nasm.h nasmlib.h regs.h \
|
||||
tokens.h version.h
|
||||
insnsd.$(O): insnsd.c compiler.h insns.h insnsi.h nasm.h nasmlib.h regs.h \
|
||||
tokens.h version.h
|
||||
insnsn.$(O): insnsn.c
|
||||
labels.$(O): labels.c compiler.h hashtbl.h insnsi.h nasm.h nasmlib.h regs.h \
|
||||
version.h
|
||||
listing.$(O): listing.c compiler.h insnsi.h listing.h nasm.h nasmlib.h \
|
||||
regs.h version.h
|
||||
macros.$(O): macros.c
|
||||
names.$(O): names.c insnsn.c regs.c
|
||||
nasm.$(O): nasm.c assemble.h compiler.h eval.h insns.h insnsi.h labels.h \
|
||||
listing.h nasm.h nasmlib.h outform.h parser.h pptok.h preproc.h regs.h \
|
||||
stdscan.h tokens.h version.h
|
||||
nasmlib.$(O): nasmlib.c compiler.h insns.h insnsi.h nasm.h nasmlib.h regs.h \
|
||||
tokens.h version.h
|
||||
ndisasm.$(O): ndisasm.c compiler.h disasm.h insns.h insnsi.h nasm.h \
|
||||
nasmlib.h regs.h sync.h tokens.h version.h
|
||||
outform.$(O): outform.c compiler.h insnsi.h nasm.h nasmlib.h outform.h \
|
||||
regs.h version.h
|
||||
output/outaout.$(O): output/outaout.c compiler.h insnsi.h nasm.h nasmlib.h \
|
||||
outform.h regs.h stdscan.h version.h
|
||||
output/outas86.$(O): output/outas86.c compiler.h insnsi.h nasm.h nasmlib.h \
|
||||
outform.h regs.h version.h
|
||||
output/outbin.$(O): output/outbin.c compiler.h eval.h insnsi.h labels.h \
|
||||
nasm.h nasmlib.h outform.h regs.h stdscan.h version.h
|
||||
output/outcoff.$(O): output/outcoff.c compiler.h insnsi.h nasm.h nasmlib.h \
|
||||
outform.h regs.h version.h
|
||||
output/outdbg.$(O): output/outdbg.c compiler.h insnsi.h nasm.h nasmlib.h \
|
||||
outform.h regs.h version.h
|
||||
output/outelf32.$(O): output/outelf32.c compiler.h insnsi.h nasm.h nasmlib.h \
|
||||
outform.h regs.h stdscan.h version.h
|
||||
output/outelf64.$(O): output/outelf64.c compiler.h insnsi.h nasm.h nasmlib.h \
|
||||
outform.h regs.h stdscan.h version.h
|
||||
output/outieee.$(O): output/outieee.c compiler.h insnsi.h nasm.h nasmlib.h \
|
||||
outform.h regs.h version.h
|
||||
output/outmacho.$(O): output/outmacho.c compiler.h insnsi.h nasm.h nasmlib.h \
|
||||
outform.h regs.h version.h
|
||||
output/outobj.$(O): output/outobj.c compiler.h insnsi.h nasm.h nasmlib.h \
|
||||
outform.h regs.h stdscan.h version.h
|
||||
output/outrdf.$(O): output/outrdf.c compiler.h insnsi.h nasm.h nasmlib.h \
|
||||
outform.h regs.h version.h
|
||||
output/outrdf2.$(O): output/outrdf2.c compiler.h insnsi.h nasm.h nasmlib.h \
|
||||
outform.h rdoff/rdoff.h regs.h version.h
|
||||
parser.$(O): parser.c compiler.h float.h insns.h insnsi.h nasm.h nasmlib.h \
|
||||
parser.h regflags.c regs.h stdscan.h tokens.h version.h
|
||||
pptok.$(O): pptok.c compiler.h nasmlib.h pptok.h preproc.h
|
||||
preproc.$(O): preproc.c compiler.h hashtbl.h insnsi.h macros.c nasm.h \
|
||||
nasmlib.h pptok.h preproc.h regs.h version.h
|
||||
regdis.$(O): regdis.c
|
||||
regflags.$(O): regflags.c
|
||||
regs.$(O): regs.c
|
||||
regvals.$(O): regvals.c
|
||||
stdscan.$(O): stdscan.c compiler.h insns.h insnsi.h nasm.h nasmlib.h regs.h \
|
||||
stdscan.h tokens.h version.h
|
||||
sync.$(O): sync.c compiler.h nasmlib.h sync.h
|
||||
tokhash.$(O): tokhash.c compiler.h insns.h insnsi.h nasm.h nasmlib.h regs.h \
|
||||
tokens.h version.h
|
@ -35,6 +35,7 @@
|
||||
\IR{-v} \c{-v} option
|
||||
\IR{-w} \c{-w} option
|
||||
\IR{-y} \c{-y} option
|
||||
\IR{-Z} \c{-Z} option
|
||||
\IR{!=} \c{!=} operator
|
||||
\IR{$, here} \c{$}, Here token
|
||||
\IR{$, prefix} \c{$}, prefix
|
||||
@ -581,7 +582,7 @@ instead of being delimited by colons.
|
||||
|
||||
See also the \c{Visual C++} output format, \k{win32fmt}.
|
||||
|
||||
\S{opt-E} The \i\c{-E} Option: Send Errors to a File
|
||||
\S{opt-Z} The \i\c{-Z} Option: Send Errors to a File
|
||||
|
||||
Under \I{DOS}\c{MS-DOS} it can be difficult (though there are ways) to
|
||||
redirect the standard-error output of a program to a file. Since
|
||||
@ -589,13 +590,16 @@ NASM usually produces its warning and \i{error messages} on
|
||||
\i\c{stderr}, this can make it hard to capture the errors if (for
|
||||
example) you want to load them into an editor.
|
||||
|
||||
NASM therefore provides the \c{-E} option, taking a filename argument
|
||||
NASM therefore provides the \c{-Z} option, taking a filename argument
|
||||
which causes errors to be sent to the specified files rather than
|
||||
standard error. Therefore you can \I{redirecting errors}redirect
|
||||
the errors into a file by typing
|
||||
|
||||
\c nasm -E myfile.err -f obj myfile.asm
|
||||
\c nasm -Z myfile.err -f obj myfile.asm
|
||||
|
||||
In earlier versions of NASM, this option was called \c{-E}, but it was
|
||||
changed since \c{-E} is an option conventionally used for
|
||||
preprocessing only, with disastrous results. See \k{opt-E}.
|
||||
|
||||
\S{opt-s} The \i\c{-s} Option: Send Errors to \i\c{stdout}
|
||||
|
||||
@ -606,7 +610,7 @@ program, you can type:
|
||||
|
||||
\c nasm -s -f obj myfile.asm | more
|
||||
|
||||
See also the \c{-E} option, \k{opt-E}.
|
||||
See also the \c{-Z} option, \k{opt-Z}.
|
||||
|
||||
|
||||
\S{opt-i} The \i\c{-i}\I\c{-I} Option: Include File Search Directories
|
||||
@ -699,10 +703,10 @@ For Makefile compatibility with many C compilers, this option can also
|
||||
be specified as \c{-U}.
|
||||
|
||||
|
||||
\S{opt-e} The \i\c{-e} Option: Preprocess Only
|
||||
\S{opt-E} The \i\c{-E}\I{-e} Option: Preprocess Only
|
||||
|
||||
NASM allows the \i{preprocessor} to be run on its own, up to a
|
||||
point. Using the \c{-e} option (which requires no arguments) will
|
||||
point. Using the \c{-E} option (which requires no arguments) will
|
||||
cause NASM to preprocess its input file, expand all the macro
|
||||
references, remove all the comments and preprocessor directives, and
|
||||
print the resulting file on standard output (or save it to a file,
|
||||
@ -716,6 +720,9 @@ which depend on the values of symbols: so code such as
|
||||
|
||||
will cause an error in \i{preprocess-only mode}.
|
||||
|
||||
For compatiblity with older version of NASM, this option can also be
|
||||
written \c{-e}. \c{-E} in older versions of NASM was the equivalent
|
||||
of the current \c{-Z} option, \k{opt-Z}.
|
||||
|
||||
\S{opt-a} The \i\c{-a} Option: Don't Preprocess At All
|
||||
|
||||
@ -844,8 +851,7 @@ brackets) exists.
|
||||
\S{opt-v} The \i\c{-v} Option: Display \i{Version} Info
|
||||
|
||||
Typing \c{NASM -v} will display the version of NASM which you are using,
|
||||
and the date on which it was compiled. This replaces the deprecated
|
||||
\c{-r}.
|
||||
and the date on which it was compiled.
|
||||
|
||||
You will need the version number if you report a bug.
|
||||
|
||||
|
29
mkdep.pl
29
mkdep.pl
@ -93,7 +93,9 @@ sub insert_deps($) {
|
||||
my($line,$parm,$val);
|
||||
my($obj) = '.o'; # Defaults
|
||||
my($sep) = '/';
|
||||
my($cont) = "\\";
|
||||
my($maxline) = 78; # Seems like a reasonable default
|
||||
my @exclude = (); # Don't exclude anything
|
||||
|
||||
while ( defined($line = <IN>) ) {
|
||||
if ( $line =~ /^\s*\#\s*@([a-z0-9-]+):\s*\"([^\"]*)\"/ ) {
|
||||
@ -104,6 +106,10 @@ sub insert_deps($) {
|
||||
$sep = $val;
|
||||
} elsif ( $parm eq 'line-width' ) {
|
||||
$maxline = $val+0;
|
||||
} elsif ( $parm eq 'continuation' ) {
|
||||
$cont = $val;
|
||||
} elsif ( $parm eq 'exclude' ) {
|
||||
@exclude = split(/\,/, $val);
|
||||
}
|
||||
} elsif ( $line eq $barrier ) {
|
||||
last; # Stop reading input at barrier line
|
||||
@ -112,6 +118,11 @@ sub insert_deps($) {
|
||||
}
|
||||
close(IN);
|
||||
|
||||
my $e, %do_exclude;
|
||||
foreach $e (@exclude) {
|
||||
$do_exclude{$e} = 1;
|
||||
}
|
||||
|
||||
my $dfile, $ofile, $str, $sl, $len;
|
||||
my @deps, $dep;
|
||||
|
||||
@ -124,14 +135,16 @@ sub insert_deps($) {
|
||||
$len = length($str);
|
||||
print OUT $str;
|
||||
foreach $dep ($dfile, alldeps($dfile)) {
|
||||
$str = convert_file($dep,$sep);
|
||||
$sl = length($str)+1;
|
||||
if ( $len+$sl > $maxline-2 ) {
|
||||
print OUT " \\\n ", $str;
|
||||
$len = $sl;
|
||||
} else {
|
||||
print OUT ' ', $str;
|
||||
$len += $sl;
|
||||
unless ($do_exclude{$dep}) {
|
||||
$str = convert_file($dep,$sep);
|
||||
$sl = length($str)+1;
|
||||
if ( $len+$sl > $maxline-2 ) {
|
||||
print OUT ' ', $cont, "\n ", $str;
|
||||
$len = $sl;
|
||||
} else {
|
||||
print OUT ' ', $str;
|
||||
$len += $sl;
|
||||
}
|
||||
}
|
||||
}
|
||||
print OUT "\n";
|
||||
|
13
nasm.c
13
nasm.c
@ -383,11 +383,11 @@ static int process_arg(char *p, char *q)
|
||||
case 'i':
|
||||
case 'I':
|
||||
case 'l':
|
||||
case 'E':
|
||||
case 'F':
|
||||
case 'X':
|
||||
case 'u':
|
||||
case 'U':
|
||||
case 'Z':
|
||||
if (!(param = get_param(p, q, &advance)))
|
||||
break;
|
||||
if (p[1] == 'o') { /* output file */
|
||||
@ -441,7 +441,7 @@ static int process_arg(char *p, char *q)
|
||||
pp_include_path(param);
|
||||
} else if (p[1] == 'l') { /* listing file */
|
||||
strcpy(listname, param);
|
||||
} else if (p[1] == 'E') { /* error messages file */
|
||||
} else if (p[1] == 'Z') { /* error messages file */
|
||||
error_file = fopen(param, "w");
|
||||
if (!error_file) {
|
||||
error_file = stderr; /* Revert to default! */
|
||||
@ -476,16 +476,15 @@ static int process_arg(char *p, char *q)
|
||||
("usage: nasm [-@ response file] [-o outfile] [-f format] "
|
||||
"[-l listfile]\n"
|
||||
" [options...] [--] filename\n"
|
||||
" or nasm -r for version info (obsolete)\n"
|
||||
" or nasm -v for version info (preferred)\n\n"
|
||||
" or nasm -v for version info\n\n"
|
||||
" -t assemble in SciTech TASM compatible mode\n"
|
||||
" -g generate debug information in selected format.\n");
|
||||
printf
|
||||
(" -e preprocess only (writes output to stdout by default)\n"
|
||||
(" -E (or -e) preprocess only (writes output to stdout by default)\n"
|
||||
" -a don't preprocess (assemble only)\n"
|
||||
" -M generate Makefile dependencies on stdout\n"
|
||||
" -MG d:o, missing files assumed generated\n\n"
|
||||
" -E<file> redirect error messages to file\n"
|
||||
" -Z<file> redirect error messages to file\n"
|
||||
" -s redirect error messages to stdout\n\n"
|
||||
" -F format select a debugging format\n\n"
|
||||
" -I<path> adds a pathname to the include file path\n");
|
||||
@ -523,7 +522,6 @@ static int process_arg(char *p, char *q)
|
||||
case 't':
|
||||
tasm_compatible_mode = TRUE;
|
||||
break;
|
||||
case 'r':
|
||||
case 'v':
|
||||
{
|
||||
const char *nasm_version_string =
|
||||
@ -537,6 +535,7 @@ static int process_arg(char *p, char *q)
|
||||
}
|
||||
break;
|
||||
case 'e': /* preprocess only */
|
||||
case 'E':
|
||||
operating_mode = op_preprocess;
|
||||
break;
|
||||
case 'a': /* assemble only - don't preprocess */
|
||||
|
646
test/riprel.asm
646
test/riprel.asm
@ -1,99 +1,603 @@
|
||||
bits 64
|
||||
|
||||
default abs
|
||||
|
||||
|
||||
mov al,[foo]
|
||||
mov bl,[foo]
|
||||
mov ax,[foo]
|
||||
mov bx,[foo]
|
||||
mov eax,[foo]
|
||||
mov ebx,[foo]
|
||||
mov rax,[foo]
|
||||
mov rax,[123456789abcdef0h]
|
||||
mov rbx,[foo]
|
||||
mov al,[0xaaaaaaaaaaaaaaaa]
|
||||
mov bl,[0xaaaaaaaaaaaaaaaa]
|
||||
mov ax,[0xaaaaaaaaaaaaaaaa]
|
||||
mov bx,[0xaaaaaaaaaaaaaaaa]
|
||||
mov eax,[0xaaaaaaaaaaaaaaaa]
|
||||
mov ebx,[0xaaaaaaaaaaaaaaaa]
|
||||
mov rax,[0xaaaaaaaaaaaaaaaa]
|
||||
mov rbx,[0xaaaaaaaaaaaaaaaa]
|
||||
mov al,[0xbbbbbbbb]
|
||||
mov bl,[0xbbbbbbbb]
|
||||
mov ax,[0xbbbbbbbb]
|
||||
mov bx,[0xbbbbbbbb]
|
||||
mov eax,[0xbbbbbbbb]
|
||||
mov ebx,[0xbbbbbbbb]
|
||||
mov rax,[0xbbbbbbbb]
|
||||
mov rbx,[0xbbbbbbbb]
|
||||
mov al,[0xffffffffcccccccc]
|
||||
mov bl,[0xffffffffcccccccc]
|
||||
mov ax,[0xffffffffcccccccc]
|
||||
mov bx,[0xffffffffcccccccc]
|
||||
mov eax,[0xffffffffcccccccc]
|
||||
mov ebx,[0xffffffffcccccccc]
|
||||
mov rax,[0xffffffffcccccccc]
|
||||
mov rbx,[0xffffffffcccccccc]
|
||||
|
||||
mov al,[dword foo]
|
||||
mov bl,[dword foo]
|
||||
mov ax,[dword foo]
|
||||
mov bx,[dword foo]
|
||||
mov eax,[dword foo]
|
||||
mov ebx,[dword foo]
|
||||
mov rax,[dword foo]
|
||||
mov rbx,[dword foo]
|
||||
mov al,[dword 0xaaaaaaaaaaaaaaaa]
|
||||
mov bl,[dword 0xaaaaaaaaaaaaaaaa]
|
||||
mov ax,[dword 0xaaaaaaaaaaaaaaaa]
|
||||
mov bx,[dword 0xaaaaaaaaaaaaaaaa]
|
||||
mov eax,[dword 0xaaaaaaaaaaaaaaaa]
|
||||
mov ebx,[dword 0xaaaaaaaaaaaaaaaa]
|
||||
mov rax,[dword 0xaaaaaaaaaaaaaaaa]
|
||||
mov rbx,[dword 0xaaaaaaaaaaaaaaaa]
|
||||
mov al,[dword 0xbbbbbbbb]
|
||||
mov bl,[dword 0xbbbbbbbb]
|
||||
mov ax,[dword 0xbbbbbbbb]
|
||||
mov bx,[dword 0xbbbbbbbb]
|
||||
mov eax,[dword 0xbbbbbbbb]
|
||||
mov ebx,[dword 0xbbbbbbbb]
|
||||
mov rax,[dword 0xbbbbbbbb]
|
||||
mov rbx,[dword 0xbbbbbbbb]
|
||||
mov al,[dword 0xffffffffcccccccc]
|
||||
mov bl,[dword 0xffffffffcccccccc]
|
||||
mov ax,[dword 0xffffffffcccccccc]
|
||||
mov bx,[dword 0xffffffffcccccccc]
|
||||
mov eax,[dword 0xffffffffcccccccc]
|
||||
mov ebx,[dword 0xffffffffcccccccc]
|
||||
mov rax,[dword 0xffffffffcccccccc]
|
||||
mov rbx,[dword 0xffffffffcccccccc]
|
||||
|
||||
mov al,[qword foo]
|
||||
mov bl,[qword foo]
|
||||
mov ax,[qword foo]
|
||||
mov bx,[qword foo]
|
||||
mov eax,[qword foo]
|
||||
mov ebx,[qword foo]
|
||||
mov rax,[qword foo]
|
||||
mov rax,[rel foo]
|
||||
mov rbx,[rel foo]
|
||||
mov rax,[rel dword foo]
|
||||
mov rax,[rel qword foo]
|
||||
mov rbx,[qword foo]
|
||||
mov al,[qword 0xaaaaaaaaaaaaaaaa]
|
||||
mov bl,[qword 0xaaaaaaaaaaaaaaaa]
|
||||
mov ax,[qword 0xaaaaaaaaaaaaaaaa]
|
||||
mov bx,[qword 0xaaaaaaaaaaaaaaaa]
|
||||
mov eax,[qword 0xaaaaaaaaaaaaaaaa]
|
||||
mov ebx,[qword 0xaaaaaaaaaaaaaaaa]
|
||||
mov rax,[qword 0xaaaaaaaaaaaaaaaa]
|
||||
mov rbx,[qword 0xaaaaaaaaaaaaaaaa]
|
||||
mov al,[qword 0xbbbbbbbb]
|
||||
mov bl,[qword 0xbbbbbbbb]
|
||||
mov ax,[qword 0xbbbbbbbb]
|
||||
mov bx,[qword 0xbbbbbbbb]
|
||||
mov eax,[qword 0xbbbbbbbb]
|
||||
mov ebx,[qword 0xbbbbbbbb]
|
||||
mov rax,[qword 0xbbbbbbbb]
|
||||
mov rbx,[qword 0xbbbbbbbb]
|
||||
mov al,[qword 0xffffffffcccccccc]
|
||||
mov bl,[qword 0xffffffffcccccccc]
|
||||
mov ax,[qword 0xffffffffcccccccc]
|
||||
mov bx,[qword 0xffffffffcccccccc]
|
||||
mov eax,[qword 0xffffffffcccccccc]
|
||||
mov ebx,[qword 0xffffffffcccccccc]
|
||||
mov rax,[qword 0xffffffffcccccccc]
|
||||
mov rbx,[qword 0xffffffffcccccccc]
|
||||
|
||||
mov al,[abs foo]
|
||||
mov bl,[abs foo]
|
||||
mov ax,[abs foo]
|
||||
mov bx,[abs foo]
|
||||
mov eax,[abs foo]
|
||||
mov ebx,[abs foo]
|
||||
mov rax,[abs foo]
|
||||
mov rbx,[abs foo]
|
||||
mov al,[abs 0xaaaaaaaaaaaaaaaa]
|
||||
mov bl,[abs 0xaaaaaaaaaaaaaaaa]
|
||||
mov ax,[abs 0xaaaaaaaaaaaaaaaa]
|
||||
mov bx,[abs 0xaaaaaaaaaaaaaaaa]
|
||||
mov eax,[abs 0xaaaaaaaaaaaaaaaa]
|
||||
mov ebx,[abs 0xaaaaaaaaaaaaaaaa]
|
||||
mov rax,[abs 0xaaaaaaaaaaaaaaaa]
|
||||
mov rbx,[abs 0xaaaaaaaaaaaaaaaa]
|
||||
mov al,[abs 0xbbbbbbbb]
|
||||
mov bl,[abs 0xbbbbbbbb]
|
||||
mov ax,[abs 0xbbbbbbbb]
|
||||
mov bx,[abs 0xbbbbbbbb]
|
||||
mov eax,[abs 0xbbbbbbbb]
|
||||
mov ebx,[abs 0xbbbbbbbb]
|
||||
mov rax,[abs 0xbbbbbbbb]
|
||||
mov rbx,[abs 0xbbbbbbbb]
|
||||
mov al,[abs 0xffffffffcccccccc]
|
||||
mov bl,[abs 0xffffffffcccccccc]
|
||||
mov ax,[abs 0xffffffffcccccccc]
|
||||
mov bx,[abs 0xffffffffcccccccc]
|
||||
mov eax,[abs 0xffffffffcccccccc]
|
||||
mov ebx,[abs 0xffffffffcccccccc]
|
||||
mov rax,[abs 0xffffffffcccccccc]
|
||||
mov rbx,[abs 0xffffffffcccccccc]
|
||||
|
||||
mov al,[abs dword foo]
|
||||
mov bl,[abs dword foo]
|
||||
mov ax,[abs dword foo]
|
||||
mov bx,[abs dword foo]
|
||||
mov eax,[abs dword foo]
|
||||
mov ebx,[abs dword foo]
|
||||
mov rax,[abs dword foo]
|
||||
mov rbx,[abs dword foo]
|
||||
mov al,[abs dword 0xaaaaaaaaaaaaaaaa]
|
||||
mov bl,[abs dword 0xaaaaaaaaaaaaaaaa]
|
||||
mov ax,[abs dword 0xaaaaaaaaaaaaaaaa]
|
||||
mov bx,[abs dword 0xaaaaaaaaaaaaaaaa]
|
||||
mov eax,[abs dword 0xaaaaaaaaaaaaaaaa]
|
||||
mov ebx,[abs dword 0xaaaaaaaaaaaaaaaa]
|
||||
mov rax,[abs dword 0xaaaaaaaaaaaaaaaa]
|
||||
mov rbx,[abs dword 0xaaaaaaaaaaaaaaaa]
|
||||
mov al,[abs dword 0xbbbbbbbb]
|
||||
mov bl,[abs dword 0xbbbbbbbb]
|
||||
mov ax,[abs dword 0xbbbbbbbb]
|
||||
mov bx,[abs dword 0xbbbbbbbb]
|
||||
mov eax,[abs dword 0xbbbbbbbb]
|
||||
mov ebx,[abs dword 0xbbbbbbbb]
|
||||
mov rax,[abs dword 0xbbbbbbbb]
|
||||
mov rbx,[abs dword 0xbbbbbbbb]
|
||||
mov al,[abs dword 0xffffffffcccccccc]
|
||||
mov bl,[abs dword 0xffffffffcccccccc]
|
||||
mov ax,[abs dword 0xffffffffcccccccc]
|
||||
mov bx,[abs dword 0xffffffffcccccccc]
|
||||
mov eax,[abs dword 0xffffffffcccccccc]
|
||||
mov ebx,[abs dword 0xffffffffcccccccc]
|
||||
mov rax,[abs dword 0xffffffffcccccccc]
|
||||
mov rbx,[abs dword 0xffffffffcccccccc]
|
||||
|
||||
mov al,[abs qword foo]
|
||||
mov bl,[abs qword foo]
|
||||
mov ax,[abs qword foo]
|
||||
mov bx,[abs qword foo]
|
||||
mov eax,[abs qword foo]
|
||||
mov ebx,[abs qword foo]
|
||||
mov rax,[abs qword foo]
|
||||
mov rbx,[abs qword foo]
|
||||
mov al,[abs qword 0xaaaaaaaaaaaaaaaa]
|
||||
mov bl,[abs qword 0xaaaaaaaaaaaaaaaa]
|
||||
mov ax,[abs qword 0xaaaaaaaaaaaaaaaa]
|
||||
mov bx,[abs qword 0xaaaaaaaaaaaaaaaa]
|
||||
mov eax,[abs qword 0xaaaaaaaaaaaaaaaa]
|
||||
mov ebx,[abs qword 0xaaaaaaaaaaaaaaaa]
|
||||
mov rax,[abs qword 0xaaaaaaaaaaaaaaaa]
|
||||
mov rbx,[abs qword 0xaaaaaaaaaaaaaaaa]
|
||||
mov al,[abs qword 0xbbbbbbbb]
|
||||
mov bl,[abs qword 0xbbbbbbbb]
|
||||
mov ax,[abs qword 0xbbbbbbbb]
|
||||
mov bx,[abs qword 0xbbbbbbbb]
|
||||
mov eax,[abs qword 0xbbbbbbbb]
|
||||
mov ebx,[abs qword 0xbbbbbbbb]
|
||||
mov rax,[abs qword 0xbbbbbbbb]
|
||||
mov rbx,[abs qword 0xbbbbbbbb]
|
||||
mov al,[abs qword 0xffffffffcccccccc]
|
||||
mov bl,[abs qword 0xffffffffcccccccc]
|
||||
mov ax,[abs qword 0xffffffffcccccccc]
|
||||
mov bx,[abs qword 0xffffffffcccccccc]
|
||||
mov eax,[abs qword 0xffffffffcccccccc]
|
||||
mov ebx,[abs qword 0xffffffffcccccccc]
|
||||
mov rax,[abs qword 0xffffffffcccccccc]
|
||||
mov rbx,[abs qword 0xffffffffcccccccc]
|
||||
|
||||
mov rax,[es:foo]
|
||||
mov rax,[es:123456789abcdef0h]
|
||||
mov rbx,[es:foo]
|
||||
mov rax,[dword es:foo]
|
||||
mov rbx,[dword es:foo]
|
||||
mov rax,[qword es:foo]
|
||||
mov rax,[rel es:foo]
|
||||
mov rbx,[rel es:foo]
|
||||
mov rax,[rel dword es:foo]
|
||||
mov rax,[rel qword es:foo]
|
||||
mov rax,[abs es:foo]
|
||||
mov rbx,[abs es:foo]
|
||||
mov rax,[abs dword es:foo]
|
||||
mov rax,[abs qword es:foo]
|
||||
mov al,[rel foo]
|
||||
mov bl,[rel foo]
|
||||
mov ax,[rel foo]
|
||||
mov bx,[rel foo]
|
||||
mov eax,[rel foo]
|
||||
mov ebx,[rel foo]
|
||||
mov rax,[rel foo]
|
||||
mov rbx,[rel foo]
|
||||
mov al,[rel 0xaaaaaaaaaaaaaaaa]
|
||||
mov bl,[rel 0xaaaaaaaaaaaaaaaa]
|
||||
mov ax,[rel 0xaaaaaaaaaaaaaaaa]
|
||||
mov bx,[rel 0xaaaaaaaaaaaaaaaa]
|
||||
mov eax,[rel 0xaaaaaaaaaaaaaaaa]
|
||||
mov ebx,[rel 0xaaaaaaaaaaaaaaaa]
|
||||
mov rax,[rel 0xaaaaaaaaaaaaaaaa]
|
||||
mov rbx,[rel 0xaaaaaaaaaaaaaaaa]
|
||||
mov al,[rel 0xbbbbbbbb]
|
||||
mov bl,[rel 0xbbbbbbbb]
|
||||
mov ax,[rel 0xbbbbbbbb]
|
||||
mov bx,[rel 0xbbbbbbbb]
|
||||
mov eax,[rel 0xbbbbbbbb]
|
||||
mov ebx,[rel 0xbbbbbbbb]
|
||||
mov rax,[rel 0xbbbbbbbb]
|
||||
mov rbx,[rel 0xbbbbbbbb]
|
||||
mov al,[rel 0xffffffffcccccccc]
|
||||
mov bl,[rel 0xffffffffcccccccc]
|
||||
mov ax,[rel 0xffffffffcccccccc]
|
||||
mov bx,[rel 0xffffffffcccccccc]
|
||||
mov eax,[rel 0xffffffffcccccccc]
|
||||
mov ebx,[rel 0xffffffffcccccccc]
|
||||
mov rax,[rel 0xffffffffcccccccc]
|
||||
mov rbx,[rel 0xffffffffcccccccc]
|
||||
|
||||
mov al,[rel dword foo]
|
||||
mov bl,[rel dword foo]
|
||||
mov ax,[rel dword foo]
|
||||
mov bx,[rel dword foo]
|
||||
mov eax,[rel dword foo]
|
||||
mov ebx,[rel dword foo]
|
||||
mov rax,[rel dword foo]
|
||||
mov rbx,[rel dword foo]
|
||||
mov al,[rel dword 0xaaaaaaaaaaaaaaaa]
|
||||
mov bl,[rel dword 0xaaaaaaaaaaaaaaaa]
|
||||
mov ax,[rel dword 0xaaaaaaaaaaaaaaaa]
|
||||
mov bx,[rel dword 0xaaaaaaaaaaaaaaaa]
|
||||
mov eax,[rel dword 0xaaaaaaaaaaaaaaaa]
|
||||
mov ebx,[rel dword 0xaaaaaaaaaaaaaaaa]
|
||||
mov rax,[rel dword 0xaaaaaaaaaaaaaaaa]
|
||||
mov rbx,[rel dword 0xaaaaaaaaaaaaaaaa]
|
||||
mov al,[rel dword 0xbbbbbbbb]
|
||||
mov bl,[rel dword 0xbbbbbbbb]
|
||||
mov ax,[rel dword 0xbbbbbbbb]
|
||||
mov bx,[rel dword 0xbbbbbbbb]
|
||||
mov eax,[rel dword 0xbbbbbbbb]
|
||||
mov ebx,[rel dword 0xbbbbbbbb]
|
||||
mov rax,[rel dword 0xbbbbbbbb]
|
||||
mov rbx,[rel dword 0xbbbbbbbb]
|
||||
mov al,[rel dword 0xffffffffcccccccc]
|
||||
mov bl,[rel dword 0xffffffffcccccccc]
|
||||
mov ax,[rel dword 0xffffffffcccccccc]
|
||||
mov bx,[rel dword 0xffffffffcccccccc]
|
||||
mov eax,[rel dword 0xffffffffcccccccc]
|
||||
mov ebx,[rel dword 0xffffffffcccccccc]
|
||||
mov rax,[rel dword 0xffffffffcccccccc]
|
||||
mov rbx,[rel dword 0xffffffffcccccccc]
|
||||
|
||||
mov al,[rel qword foo]
|
||||
mov bl,[rel qword foo]
|
||||
mov ax,[rel qword foo]
|
||||
mov bx,[rel qword foo]
|
||||
mov eax,[rel qword foo]
|
||||
mov ebx,[rel qword foo]
|
||||
mov rax,[rel qword foo]
|
||||
mov rbx,[rel qword foo]
|
||||
mov al,[rel qword 0xaaaaaaaaaaaaaaaa]
|
||||
mov bl,[rel qword 0xaaaaaaaaaaaaaaaa]
|
||||
mov ax,[rel qword 0xaaaaaaaaaaaaaaaa]
|
||||
mov bx,[rel qword 0xaaaaaaaaaaaaaaaa]
|
||||
mov eax,[rel qword 0xaaaaaaaaaaaaaaaa]
|
||||
mov ebx,[rel qword 0xaaaaaaaaaaaaaaaa]
|
||||
mov rax,[rel qword 0xaaaaaaaaaaaaaaaa]
|
||||
mov rbx,[rel qword 0xaaaaaaaaaaaaaaaa]
|
||||
mov al,[rel qword 0xbbbbbbbb]
|
||||
mov bl,[rel qword 0xbbbbbbbb]
|
||||
mov ax,[rel qword 0xbbbbbbbb]
|
||||
mov bx,[rel qword 0xbbbbbbbb]
|
||||
mov eax,[rel qword 0xbbbbbbbb]
|
||||
mov ebx,[rel qword 0xbbbbbbbb]
|
||||
mov rax,[rel qword 0xbbbbbbbb]
|
||||
mov rbx,[rel qword 0xbbbbbbbb]
|
||||
mov al,[rel qword 0xffffffffcccccccc]
|
||||
mov bl,[rel qword 0xffffffffcccccccc]
|
||||
mov ax,[rel qword 0xffffffffcccccccc]
|
||||
mov bx,[rel qword 0xffffffffcccccccc]
|
||||
mov eax,[rel qword 0xffffffffcccccccc]
|
||||
mov ebx,[rel qword 0xffffffffcccccccc]
|
||||
mov rax,[rel qword 0xffffffffcccccccc]
|
||||
mov rbx,[rel qword 0xffffffffcccccccc]
|
||||
|
||||
mov rax,[fs:foo]
|
||||
mov rax,[fs:123456789abcdef0h]
|
||||
mov rbx,[fs:foo]
|
||||
mov rax,[dword fs:foo]
|
||||
mov rbx,[dword fs:foo]
|
||||
mov rax,[qword fs:foo]
|
||||
mov rax,[rel fs:foo]
|
||||
mov rbx,[rel fs:foo]
|
||||
mov rax,[rel dword fs:foo]
|
||||
mov rax,[rel qword fs:foo]
|
||||
mov rax,[abs fs:foo]
|
||||
mov rbx,[abs fs:foo]
|
||||
mov rax,[abs dword fs:foo]
|
||||
mov rax,[abs qword fs:foo]
|
||||
|
||||
default rel
|
||||
|
||||
|
||||
mov al,[foo]
|
||||
mov bl,[foo]
|
||||
mov ax,[foo]
|
||||
mov bx,[foo]
|
||||
mov eax,[foo]
|
||||
mov ebx,[foo]
|
||||
mov rax,[foo]
|
||||
mov rax,[123456789abcdef0h]
|
||||
mov rbx,[foo]
|
||||
mov al,[0xaaaaaaaaaaaaaaaa]
|
||||
mov bl,[0xaaaaaaaaaaaaaaaa]
|
||||
mov ax,[0xaaaaaaaaaaaaaaaa]
|
||||
mov bx,[0xaaaaaaaaaaaaaaaa]
|
||||
mov eax,[0xaaaaaaaaaaaaaaaa]
|
||||
mov ebx,[0xaaaaaaaaaaaaaaaa]
|
||||
mov rax,[0xaaaaaaaaaaaaaaaa]
|
||||
mov rbx,[0xaaaaaaaaaaaaaaaa]
|
||||
mov al,[0xbbbbbbbb]
|
||||
mov bl,[0xbbbbbbbb]
|
||||
mov ax,[0xbbbbbbbb]
|
||||
mov bx,[0xbbbbbbbb]
|
||||
mov eax,[0xbbbbbbbb]
|
||||
mov ebx,[0xbbbbbbbb]
|
||||
mov rax,[0xbbbbbbbb]
|
||||
mov rbx,[0xbbbbbbbb]
|
||||
mov al,[0xffffffffcccccccc]
|
||||
mov bl,[0xffffffffcccccccc]
|
||||
mov ax,[0xffffffffcccccccc]
|
||||
mov bx,[0xffffffffcccccccc]
|
||||
mov eax,[0xffffffffcccccccc]
|
||||
mov ebx,[0xffffffffcccccccc]
|
||||
mov rax,[0xffffffffcccccccc]
|
||||
mov rbx,[0xffffffffcccccccc]
|
||||
|
||||
mov al,[dword foo]
|
||||
mov bl,[dword foo]
|
||||
mov ax,[dword foo]
|
||||
mov bx,[dword foo]
|
||||
mov eax,[dword foo]
|
||||
mov ebx,[dword foo]
|
||||
mov rax,[dword foo]
|
||||
mov rbx,[dword foo]
|
||||
mov al,[dword 0xaaaaaaaaaaaaaaaa]
|
||||
mov bl,[dword 0xaaaaaaaaaaaaaaaa]
|
||||
mov ax,[dword 0xaaaaaaaaaaaaaaaa]
|
||||
mov bx,[dword 0xaaaaaaaaaaaaaaaa]
|
||||
mov eax,[dword 0xaaaaaaaaaaaaaaaa]
|
||||
mov ebx,[dword 0xaaaaaaaaaaaaaaaa]
|
||||
mov rax,[dword 0xaaaaaaaaaaaaaaaa]
|
||||
mov rbx,[dword 0xaaaaaaaaaaaaaaaa]
|
||||
mov al,[dword 0xbbbbbbbb]
|
||||
mov bl,[dword 0xbbbbbbbb]
|
||||
mov ax,[dword 0xbbbbbbbb]
|
||||
mov bx,[dword 0xbbbbbbbb]
|
||||
mov eax,[dword 0xbbbbbbbb]
|
||||
mov ebx,[dword 0xbbbbbbbb]
|
||||
mov rax,[dword 0xbbbbbbbb]
|
||||
mov rbx,[dword 0xbbbbbbbb]
|
||||
mov al,[dword 0xffffffffcccccccc]
|
||||
mov bl,[dword 0xffffffffcccccccc]
|
||||
mov ax,[dword 0xffffffffcccccccc]
|
||||
mov bx,[dword 0xffffffffcccccccc]
|
||||
mov eax,[dword 0xffffffffcccccccc]
|
||||
mov ebx,[dword 0xffffffffcccccccc]
|
||||
mov rax,[dword 0xffffffffcccccccc]
|
||||
mov rbx,[dword 0xffffffffcccccccc]
|
||||
|
||||
mov al,[qword foo]
|
||||
mov bl,[qword foo]
|
||||
mov ax,[qword foo]
|
||||
mov bx,[qword foo]
|
||||
mov eax,[qword foo]
|
||||
mov ebx,[qword foo]
|
||||
mov rax,[qword foo]
|
||||
mov rax,[rel foo]
|
||||
mov rbx,[rel foo]
|
||||
mov rax,[rel dword foo]
|
||||
mov rax,[rel qword foo]
|
||||
mov rbx,[qword foo]
|
||||
mov al,[qword 0xaaaaaaaaaaaaaaaa]
|
||||
mov bl,[qword 0xaaaaaaaaaaaaaaaa]
|
||||
mov ax,[qword 0xaaaaaaaaaaaaaaaa]
|
||||
mov bx,[qword 0xaaaaaaaaaaaaaaaa]
|
||||
mov eax,[qword 0xaaaaaaaaaaaaaaaa]
|
||||
mov ebx,[qword 0xaaaaaaaaaaaaaaaa]
|
||||
mov rax,[qword 0xaaaaaaaaaaaaaaaa]
|
||||
mov rbx,[qword 0xaaaaaaaaaaaaaaaa]
|
||||
mov al,[qword 0xbbbbbbbb]
|
||||
mov bl,[qword 0xbbbbbbbb]
|
||||
mov ax,[qword 0xbbbbbbbb]
|
||||
mov bx,[qword 0xbbbbbbbb]
|
||||
mov eax,[qword 0xbbbbbbbb]
|
||||
mov ebx,[qword 0xbbbbbbbb]
|
||||
mov rax,[qword 0xbbbbbbbb]
|
||||
mov rbx,[qword 0xbbbbbbbb]
|
||||
mov al,[qword 0xffffffffcccccccc]
|
||||
mov bl,[qword 0xffffffffcccccccc]
|
||||
mov ax,[qword 0xffffffffcccccccc]
|
||||
mov bx,[qword 0xffffffffcccccccc]
|
||||
mov eax,[qword 0xffffffffcccccccc]
|
||||
mov ebx,[qword 0xffffffffcccccccc]
|
||||
mov rax,[qword 0xffffffffcccccccc]
|
||||
mov rbx,[qword 0xffffffffcccccccc]
|
||||
|
||||
mov al,[abs foo]
|
||||
mov bl,[abs foo]
|
||||
mov ax,[abs foo]
|
||||
mov bx,[abs foo]
|
||||
mov eax,[abs foo]
|
||||
mov ebx,[abs foo]
|
||||
mov rax,[abs foo]
|
||||
mov rbx,[abs foo]
|
||||
mov al,[abs 0xaaaaaaaaaaaaaaaa]
|
||||
mov bl,[abs 0xaaaaaaaaaaaaaaaa]
|
||||
mov ax,[abs 0xaaaaaaaaaaaaaaaa]
|
||||
mov bx,[abs 0xaaaaaaaaaaaaaaaa]
|
||||
mov eax,[abs 0xaaaaaaaaaaaaaaaa]
|
||||
mov ebx,[abs 0xaaaaaaaaaaaaaaaa]
|
||||
mov rax,[abs 0xaaaaaaaaaaaaaaaa]
|
||||
mov rbx,[abs 0xaaaaaaaaaaaaaaaa]
|
||||
mov al,[abs 0xbbbbbbbb]
|
||||
mov bl,[abs 0xbbbbbbbb]
|
||||
mov ax,[abs 0xbbbbbbbb]
|
||||
mov bx,[abs 0xbbbbbbbb]
|
||||
mov eax,[abs 0xbbbbbbbb]
|
||||
mov ebx,[abs 0xbbbbbbbb]
|
||||
mov rax,[abs 0xbbbbbbbb]
|
||||
mov rbx,[abs 0xbbbbbbbb]
|
||||
mov al,[abs 0xffffffffcccccccc]
|
||||
mov bl,[abs 0xffffffffcccccccc]
|
||||
mov ax,[abs 0xffffffffcccccccc]
|
||||
mov bx,[abs 0xffffffffcccccccc]
|
||||
mov eax,[abs 0xffffffffcccccccc]
|
||||
mov ebx,[abs 0xffffffffcccccccc]
|
||||
mov rax,[abs 0xffffffffcccccccc]
|
||||
mov rbx,[abs 0xffffffffcccccccc]
|
||||
|
||||
mov al,[abs dword foo]
|
||||
mov bl,[abs dword foo]
|
||||
mov ax,[abs dword foo]
|
||||
mov bx,[abs dword foo]
|
||||
mov eax,[abs dword foo]
|
||||
mov ebx,[abs dword foo]
|
||||
mov rax,[abs dword foo]
|
||||
mov rbx,[abs dword foo]
|
||||
mov al,[abs dword 0xaaaaaaaaaaaaaaaa]
|
||||
mov bl,[abs dword 0xaaaaaaaaaaaaaaaa]
|
||||
mov ax,[abs dword 0xaaaaaaaaaaaaaaaa]
|
||||
mov bx,[abs dword 0xaaaaaaaaaaaaaaaa]
|
||||
mov eax,[abs dword 0xaaaaaaaaaaaaaaaa]
|
||||
mov ebx,[abs dword 0xaaaaaaaaaaaaaaaa]
|
||||
mov rax,[abs dword 0xaaaaaaaaaaaaaaaa]
|
||||
mov rbx,[abs dword 0xaaaaaaaaaaaaaaaa]
|
||||
mov al,[abs dword 0xbbbbbbbb]
|
||||
mov bl,[abs dword 0xbbbbbbbb]
|
||||
mov ax,[abs dword 0xbbbbbbbb]
|
||||
mov bx,[abs dword 0xbbbbbbbb]
|
||||
mov eax,[abs dword 0xbbbbbbbb]
|
||||
mov ebx,[abs dword 0xbbbbbbbb]
|
||||
mov rax,[abs dword 0xbbbbbbbb]
|
||||
mov rbx,[abs dword 0xbbbbbbbb]
|
||||
mov al,[abs dword 0xffffffffcccccccc]
|
||||
mov bl,[abs dword 0xffffffffcccccccc]
|
||||
mov ax,[abs dword 0xffffffffcccccccc]
|
||||
mov bx,[abs dword 0xffffffffcccccccc]
|
||||
mov eax,[abs dword 0xffffffffcccccccc]
|
||||
mov ebx,[abs dword 0xffffffffcccccccc]
|
||||
mov rax,[abs dword 0xffffffffcccccccc]
|
||||
mov rbx,[abs dword 0xffffffffcccccccc]
|
||||
|
||||
mov al,[abs qword foo]
|
||||
mov bl,[abs qword foo]
|
||||
mov ax,[abs qword foo]
|
||||
mov bx,[abs qword foo]
|
||||
mov eax,[abs qword foo]
|
||||
mov ebx,[abs qword foo]
|
||||
mov rax,[abs qword foo]
|
||||
mov rbx,[abs qword foo]
|
||||
mov al,[abs qword 0xaaaaaaaaaaaaaaaa]
|
||||
mov bl,[abs qword 0xaaaaaaaaaaaaaaaa]
|
||||
mov ax,[abs qword 0xaaaaaaaaaaaaaaaa]
|
||||
mov bx,[abs qword 0xaaaaaaaaaaaaaaaa]
|
||||
mov eax,[abs qword 0xaaaaaaaaaaaaaaaa]
|
||||
mov ebx,[abs qword 0xaaaaaaaaaaaaaaaa]
|
||||
mov rax,[abs qword 0xaaaaaaaaaaaaaaaa]
|
||||
mov rbx,[abs qword 0xaaaaaaaaaaaaaaaa]
|
||||
mov al,[abs qword 0xbbbbbbbb]
|
||||
mov bl,[abs qword 0xbbbbbbbb]
|
||||
mov ax,[abs qword 0xbbbbbbbb]
|
||||
mov bx,[abs qword 0xbbbbbbbb]
|
||||
mov eax,[abs qword 0xbbbbbbbb]
|
||||
mov ebx,[abs qword 0xbbbbbbbb]
|
||||
mov rax,[abs qword 0xbbbbbbbb]
|
||||
mov rbx,[abs qword 0xbbbbbbbb]
|
||||
mov al,[abs qword 0xffffffffcccccccc]
|
||||
mov bl,[abs qword 0xffffffffcccccccc]
|
||||
mov ax,[abs qword 0xffffffffcccccccc]
|
||||
mov bx,[abs qword 0xffffffffcccccccc]
|
||||
mov eax,[abs qword 0xffffffffcccccccc]
|
||||
mov ebx,[abs qword 0xffffffffcccccccc]
|
||||
mov rax,[abs qword 0xffffffffcccccccc]
|
||||
mov rbx,[abs qword 0xffffffffcccccccc]
|
||||
|
||||
mov rax,[es:foo]
|
||||
mov rax,[es:123456789abcdef0h]
|
||||
mov rbx,[es:foo]
|
||||
mov rax,[dword es:foo]
|
||||
mov rbx,[dword es:foo]
|
||||
mov rax,[qword es:foo]
|
||||
mov rax,[rel es:foo]
|
||||
mov rbx,[rel es:foo]
|
||||
mov rax,[rel dword es:foo]
|
||||
mov rax,[rel qword es:foo]
|
||||
mov rax,[abs es:foo]
|
||||
mov rbx,[abs es:foo]
|
||||
mov rax,[abs dword es:foo]
|
||||
mov rax,[abs qword es:foo]
|
||||
mov al,[rel foo]
|
||||
mov bl,[rel foo]
|
||||
mov ax,[rel foo]
|
||||
mov bx,[rel foo]
|
||||
mov eax,[rel foo]
|
||||
mov ebx,[rel foo]
|
||||
mov rax,[rel foo]
|
||||
mov rbx,[rel foo]
|
||||
mov al,[rel 0xaaaaaaaaaaaaaaaa]
|
||||
mov bl,[rel 0xaaaaaaaaaaaaaaaa]
|
||||
mov ax,[rel 0xaaaaaaaaaaaaaaaa]
|
||||
mov bx,[rel 0xaaaaaaaaaaaaaaaa]
|
||||
mov eax,[rel 0xaaaaaaaaaaaaaaaa]
|
||||
mov ebx,[rel 0xaaaaaaaaaaaaaaaa]
|
||||
mov rax,[rel 0xaaaaaaaaaaaaaaaa]
|
||||
mov rbx,[rel 0xaaaaaaaaaaaaaaaa]
|
||||
mov al,[rel 0xbbbbbbbb]
|
||||
mov bl,[rel 0xbbbbbbbb]
|
||||
mov ax,[rel 0xbbbbbbbb]
|
||||
mov bx,[rel 0xbbbbbbbb]
|
||||
mov eax,[rel 0xbbbbbbbb]
|
||||
mov ebx,[rel 0xbbbbbbbb]
|
||||
mov rax,[rel 0xbbbbbbbb]
|
||||
mov rbx,[rel 0xbbbbbbbb]
|
||||
mov al,[rel 0xffffffffcccccccc]
|
||||
mov bl,[rel 0xffffffffcccccccc]
|
||||
mov ax,[rel 0xffffffffcccccccc]
|
||||
mov bx,[rel 0xffffffffcccccccc]
|
||||
mov eax,[rel 0xffffffffcccccccc]
|
||||
mov ebx,[rel 0xffffffffcccccccc]
|
||||
mov rax,[rel 0xffffffffcccccccc]
|
||||
mov rbx,[rel 0xffffffffcccccccc]
|
||||
|
||||
mov rax,[fs:foo]
|
||||
mov rax,[fs:123456789abcdef0h]
|
||||
mov rbx,[fs:foo]
|
||||
mov rax,[dword fs:foo]
|
||||
mov rbx,[dword fs:foo]
|
||||
mov rax,[qword fs:foo]
|
||||
mov rax,[rel fs:foo]
|
||||
mov rbx,[rel fs:foo]
|
||||
mov rax,[rel dword fs:foo]
|
||||
mov rax,[rel qword fs:foo]
|
||||
mov rax,[abs fs:foo]
|
||||
mov rbx,[abs fs:foo]
|
||||
mov rax,[abs dword fs:foo]
|
||||
mov rax,[abs qword fs:foo]
|
||||
mov al,[rel dword foo]
|
||||
mov bl,[rel dword foo]
|
||||
mov ax,[rel dword foo]
|
||||
mov bx,[rel dword foo]
|
||||
mov eax,[rel dword foo]
|
||||
mov ebx,[rel dword foo]
|
||||
mov rax,[rel dword foo]
|
||||
mov rbx,[rel dword foo]
|
||||
mov al,[rel dword 0xaaaaaaaaaaaaaaaa]
|
||||
mov bl,[rel dword 0xaaaaaaaaaaaaaaaa]
|
||||
mov ax,[rel dword 0xaaaaaaaaaaaaaaaa]
|
||||
mov bx,[rel dword 0xaaaaaaaaaaaaaaaa]
|
||||
mov eax,[rel dword 0xaaaaaaaaaaaaaaaa]
|
||||
mov ebx,[rel dword 0xaaaaaaaaaaaaaaaa]
|
||||
mov rax,[rel dword 0xaaaaaaaaaaaaaaaa]
|
||||
mov rbx,[rel dword 0xaaaaaaaaaaaaaaaa]
|
||||
mov al,[rel dword 0xbbbbbbbb]
|
||||
mov bl,[rel dword 0xbbbbbbbb]
|
||||
mov ax,[rel dword 0xbbbbbbbb]
|
||||
mov bx,[rel dword 0xbbbbbbbb]
|
||||
mov eax,[rel dword 0xbbbbbbbb]
|
||||
mov ebx,[rel dword 0xbbbbbbbb]
|
||||
mov rax,[rel dword 0xbbbbbbbb]
|
||||
mov rbx,[rel dword 0xbbbbbbbb]
|
||||
mov al,[rel dword 0xffffffffcccccccc]
|
||||
mov bl,[rel dword 0xffffffffcccccccc]
|
||||
mov ax,[rel dword 0xffffffffcccccccc]
|
||||
mov bx,[rel dword 0xffffffffcccccccc]
|
||||
mov eax,[rel dword 0xffffffffcccccccc]
|
||||
mov ebx,[rel dword 0xffffffffcccccccc]
|
||||
mov rax,[rel dword 0xffffffffcccccccc]
|
||||
mov rbx,[rel dword 0xffffffffcccccccc]
|
||||
|
||||
section .data
|
||||
foo equ $
|
||||
|
||||
mov al,[rel qword foo]
|
||||
mov bl,[rel qword foo]
|
||||
mov ax,[rel qword foo]
|
||||
mov bx,[rel qword foo]
|
||||
mov eax,[rel qword foo]
|
||||
mov ebx,[rel qword foo]
|
||||
mov rax,[rel qword foo]
|
||||
mov rbx,[rel qword foo]
|
||||
mov al,[rel qword 0xaaaaaaaaaaaaaaaa]
|
||||
mov bl,[rel qword 0xaaaaaaaaaaaaaaaa]
|
||||
mov ax,[rel qword 0xaaaaaaaaaaaaaaaa]
|
||||
mov bx,[rel qword 0xaaaaaaaaaaaaaaaa]
|
||||
mov eax,[rel qword 0xaaaaaaaaaaaaaaaa]
|
||||
mov ebx,[rel qword 0xaaaaaaaaaaaaaaaa]
|
||||
mov rax,[rel qword 0xaaaaaaaaaaaaaaaa]
|
||||
mov rbx,[rel qword 0xaaaaaaaaaaaaaaaa]
|
||||
mov al,[rel qword 0xbbbbbbbb]
|
||||
mov bl,[rel qword 0xbbbbbbbb]
|
||||
mov ax,[rel qword 0xbbbbbbbb]
|
||||
mov bx,[rel qword 0xbbbbbbbb]
|
||||
mov eax,[rel qword 0xbbbbbbbb]
|
||||
mov ebx,[rel qword 0xbbbbbbbb]
|
||||
mov rax,[rel qword 0xbbbbbbbb]
|
||||
mov rbx,[rel qword 0xbbbbbbbb]
|
||||
mov al,[rel qword 0xffffffffcccccccc]
|
||||
mov bl,[rel qword 0xffffffffcccccccc]
|
||||
mov ax,[rel qword 0xffffffffcccccccc]
|
||||
mov bx,[rel qword 0xffffffffcccccccc]
|
||||
mov eax,[rel qword 0xffffffffcccccccc]
|
||||
mov ebx,[rel qword 0xffffffffcccccccc]
|
||||
mov rax,[rel qword 0xffffffffcccccccc]
|
||||
mov rbx,[rel qword 0xffffffffcccccccc]
|
||||
|
||||
|
||||
foo:
|
||||
|
23
test/riprel.pl
Normal file
23
test/riprel.pl
Normal file
@ -0,0 +1,23 @@
|
||||
#!/usr/bin/perl
|
||||
|
||||
print "\tbits 64\n";
|
||||
|
||||
foreach $mode ('abs', 'rel') {
|
||||
print "\n\tdefault $mode\n\n";
|
||||
|
||||
foreach $rq ('', 'abs ', 'rel ') {
|
||||
foreach $sq ('', 'dword ', 'qword ') {
|
||||
foreach $v ('foo', '0xaaaaaaaaaaaaaaaa', '0xbbbbbbbb',
|
||||
'0xffffffffcccccccc') {
|
||||
foreach $r ('al', 'bl', 'ax', 'bx', 'eax', 'ebx', 'rax', 'rbx') {
|
||||
print "\tmov $r,[$rq$sq$v]\n";
|
||||
}
|
||||
}
|
||||
print "\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
print "\nfoo:\n";
|
||||
|
||||
|
20
version.pl
20
version.pl
@ -8,7 +8,8 @@
|
||||
#
|
||||
# <major>.<minor>[.<subminor>][pl<patchlevel>]]<tail>
|
||||
#
|
||||
# ... where <tail> is not necessarily numeric.
|
||||
# ... where <tail> is not necessarily numeric, but if it is of the form
|
||||
# -<digits> it is assumed to be a snapshot release.
|
||||
#
|
||||
# This defines the following macros:
|
||||
#
|
||||
@ -17,6 +18,7 @@
|
||||
# NASM_MINOR_VER
|
||||
# NASM_SUBMINOR_VER -- this is zero if no subminor
|
||||
# NASM_PATCHLEVEL_VER -- this is zero is no patchlevel
|
||||
# NASM_SNAPSHOT -- if snapshot
|
||||
# NASM_VERSION_ID -- version number encoded
|
||||
# NASM_VER -- whole version number as a string
|
||||
#
|
||||
@ -25,6 +27,7 @@
|
||||
# __NASM_MINOR__
|
||||
# __NASM_SUBMINOR__
|
||||
# __NASM_PATCHLEVEL__
|
||||
# __NASM_SNAPSHOT__
|
||||
# __NASM_VERSION_ID__
|
||||
# __NASM_VER__
|
||||
#
|
||||
@ -57,6 +60,12 @@ if ( $line =~ /^([0-9]+)\.([0-9]+)(.*)$/ ) {
|
||||
die "$0: Invalid input format\n";
|
||||
}
|
||||
|
||||
if ($tail =~ /^\-([0-9]+)/) {
|
||||
$snapshot = $1;
|
||||
} else {
|
||||
undef $snapshot;
|
||||
}
|
||||
|
||||
$nmaj = $maj+0; $nmin = $min+0;
|
||||
$nsmin = $smin+0; $nplvl = $plvl+0;
|
||||
|
||||
@ -79,6 +88,8 @@ $nasm_id = ($nmaj << 24)+($nmin << 16)+($nsmin << 8)+$nplvl;
|
||||
|
||||
$mangled_ver = sprintf("%d.%02d.%02d", $nmaj, $nmin, $nsmin);
|
||||
$mangled_ver .= '.'.$nplvl if ($nplvl != 0);
|
||||
($mtail = $tail) =~ tr/-/./;
|
||||
$mangled_ver .= $mtail;
|
||||
|
||||
if ( $what eq 'h' ) {
|
||||
print "#ifndef NASM_VERSION_H\n";
|
||||
@ -87,6 +98,9 @@ if ( $what eq 'h' ) {
|
||||
printf "#define NASM_MINOR_VER %d\n", $nmin;
|
||||
printf "#define NASM_SUBMINOR_VER %d\n", $nsmin;
|
||||
printf "#define NASM_PATCHLEVEL_VER %d\n", $nplvl;
|
||||
if (defined($snapshot)) {
|
||||
printf "#define NASM_SNAPSHOT %d\n", $snapshot;
|
||||
}
|
||||
printf "#define NASM_VERSION_ID 0x%08x\n", $nasm_id;
|
||||
printf "#define NASM_VER \"%s\"\n", $line;
|
||||
print "#endif /* NASM_VERSION_H */\n";
|
||||
@ -95,6 +109,9 @@ if ( $what eq 'h' ) {
|
||||
printf "%%define __NASM_MINOR__ %d\n", $nmin;
|
||||
printf "%%define __NASM_SUBMINOR__ %d\n", $nsmin;
|
||||
printf "%%define __NASM_PATCHLEVEL__ %d\n", $nplvl;
|
||||
if (defined($snapshot)) {
|
||||
printf "%%define __NASM_SNAPSHOT__ %d\n", $snapshot;
|
||||
}
|
||||
printf "%%define __NASM_VERSION_ID__ 0%08Xh\n", $nasm_id;
|
||||
printf "%%define __NASM_VER__ \"%s\"\n", $line;
|
||||
} elsif ( $what eq 'sed' ) {
|
||||
@ -102,6 +119,7 @@ if ( $what eq 'h' ) {
|
||||
printf "s/\@\@NASM_MINOR\@\@/%d/g\n", $nmin;
|
||||
printf "s/\@\@NASM_SUBMINOR\@\@/%d/g\n", $nsmin;
|
||||
printf "s/\@\@NASM_PATCHLEVEL\@\@/%d/g\n", $nplvl;
|
||||
printf "s/\@\@NASM_SNAPSHOT\@\@/%d/g\n", $snapshot; # Possibly empty
|
||||
printf "s/\@\@NASM_VERSION_ID\@\@/%d/g\n", $nasm_id;
|
||||
printf "s/\@\@NASM_VERSION_XID\@\@/0x%08x/g\n", $nasm_id;
|
||||
printf "s/\@\@NASM_VER\@\@/%s/g\n", $line;
|
||||
|
Loading…
x
Reference in New Issue
Block a user