With warnings disaggregated, there is no reason to play games with not
updating the output timestamp. Always write the files as usual.
Remove unnecessary Makefile rules.
Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
1# Please enter the commit message for your changes. Lines starting
The idea of putting the warnings in the source code was a nice one,
really, but it ended up being a nightmare from the perspective of
build dependencies. Disaggregate them, and tweak the documentation for
easier reading.
Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
- Add an option to use "make install" to install .pdf.xz
- Fix RPM spec file to put the documentation in doc/nasm instead of
doc/nasm-doc.
- RPM doesn't like unversioned Obsoletes; set a valid cutoff.
- Make nasm-doc depend on nasm.
- Add zlib-devel as a build dependency.
- Add EXTRA_CFLAGS and EXTRA_LDFLAGS for some automated platforms.
Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
Move the editor help files (currently nasmtok.el) to the editors/
subdirectory in anticipation of having more such files.
Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
The .time trick doesn't seem to work in general, and auxiliary
Makefiles aren't guaranteed to build modified sources anyway.
Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
Define macros for generating an empty file and for a dummy (side
effect) target.
Tweak MSVC compiler options.
Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
- Fix additional broken rules
- Add some more files to WARNOBJ
- $^ is not supported by POSIX, apparently
- Update warnings.pl to *actually* use the srcdir and list of
passed-in files.
Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
It isn't actually required to have $(PERLREQ) to run syncfiles,
so factor it out into a separate target.
Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
Using '' filename protects break the generated alternative makefiles,
but it is also largely useless -- building in relative paths which
require escaping breaks anyway as make and the shell would require
different escaping.
Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
When using the internal zlib, need to make sure to add the appropriate
-I option for the header...
Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
There are currently six variations of each conditionals, and there may
be more in the future (e.g. %while). Stop trying to enumerate them all
everywhere.
Add support for index copying in the document processor.
Have pptok.pl auto-generate index metadata for conditional
preprocessor directives.
Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
Make it a little easier to run bench tests which include multiple bit
sizes, and add the SRC define to make SRC/BIN tests easier to run on
the bench.
Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
Along with C and other languages, the current trend is to be able to
probe for features rather than relying on version numbers. This is
motivated in part by the intent of bumping the major version number to
3.
Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
- Add improvements to omfdump from Bernd Böckmann.
- Add misc/Makefile with option to install omfdump and auxiliary NASM
data files.
- Use compiler.h and friends in the misc directory.
- Use -std=c23 if the C compiler supports it.
Cc: Bernd Boeckmann <bernd-github@boeckmann.io>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
- Significantly overhauled the disassembler internals to make
better use of the information already in the instruction template
and to reduce the implementation differences with the assembler
- Add APX support to the disassembler
- Fix problem with disassembler truncating addresses of jumps
- Fix generation of invalid EAs in 16-bit mode
- Fix array overrun for types in a few modules
- Fix invalid ND flag on near JMP
Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
Factor the objects ONLY needed for the disassembler into a
separate library. This allows building the assembler even while
the disassembler is not yet buildable; this makes working on
the disassembler easier.
Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
The very simple compression scheme used for the builtin macro sets no
longer works adequately, and in fact it generates incorrect output
now.
Drop the whole idea of an ad hoc compression scheme and just use
zlib. For the case where there is no system zlib available, include a
(subset of) the zlib distribution. The configure script can be set to
force this included zlib if desired (e.g. for testing.)
Unfortunately this turned out to be a pretty painful can of worms in
terms of complexity. On the other hand having zlib available might be
useful at some point in the future.
Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
Remove the legacy output entry point. It has proven impossible to find
the time to completely port the backends all at once.
Instead, always generate the legacy output data, but put them into the
out_data structure. Then add a macro to explode these arguments into
separate variables, equivalent to the old function arguments. This
also centralizes the type definitions for these variables.
Most importantly, it means that the entire struct out_data is now
always available, which means that backends that need the additional
information available in that structure, such as the specific
instruction template, can access that information without needing to
revamp the entire backend code all at once.
Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
The former addflags.pl now does more general preprocessing, so rename
it from addflags.pl to preinsns.pl.
To generate the instruction list in the documentation, use the
post-preprocessed insns.xda file.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
.dat versus .dax is annoying for tab completion, change the extension
for the preprocessed insns.dat to .xda.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
These are mostly structured. Leave this as an explicit processing
step, at least until the correctness of these flags have been fully
verified; perhaps after that as well.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Merge a bunch of common code in the handling of modr/m
generation. Make the handing of compressed disp8 simpler and more
transparent by exporting a the shift factor for the compressed
immediate in ea_data. For the case of no compression, the shift factor
is simply 0; there is no need to distinguish "compressed" from
"uncompressed".
The tidied up version of the disp8 code is simple enough that it makes
more sense to inline it.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
a
Support generating code for APX instruction and add support for the
{nf} prefix.
No disassembler support yet, and only a handful instructions encoded.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Update and improve the build from source documentation, including add
an auto-generated list of Perl build dependencies.
Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
Assume module names (for "use") always start with a capital letter,
and that anything that doesn't is a pragma.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Don't break Makefile.dep generation if run from a separate build
directory.
config/unconfig.h is a bit special; it is kept in the repository for
the benefit of non-configure users. Therefore, don't have "make
spotless" delete it.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Try to better sort out the necessary dependencies for warning
generation.
Fix regex for cleaning up nasmdoc markup: nasmdoc markup does not
nest, although it may include \} sequences.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Without a manifest, Windows applications force a fixed PATH_MAX limit
to any pathname; this is unnecessary.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Add the %map() function which can apply arguments to a macro from a
list.
Allow the user to specify the desired radix for an evaluated
parameter. It doesn't make any direct difference, but can be nice for
debugging or turning into strings.
As part of this, split expand_one_smacro() into two parts: parameter
parsing and macro expansion. This is a very straightforward splitting
of two mostly unrelated pieces of functionality.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
The dependency on the warning files breaks when we are building in a
directory *and* the files already exist from being shipped with the
distribution tarballs. The make VPATH simply isn't sophisticated
enough to deal with it, so let the C compiler handle it by #including
the generated file from a dummy C file.
Reported-by: Rudi Heitbaum <rudi@heitbaum.com>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Things used by "make dist" haven't been updated for a while, it seems;
in particular have not kept up with the existence of autogen.sh.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Include the version number in the output (misc/nasmtok.el) and add a
rule for generating it to the Makefiles.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Instead of handling conditional instructions ad hoc, generate
individual instruction patterns as normal. This simplifies the code
and makes CMPccXADD support simpler (otherwise it would be necessary
to hack in the handling of a condition code in the middle of an
instruction.)
Signed-off-by: H. Peter Anvin <hpa@zytor.com>