OpenWatcom 1.8 has a C99 mode, which implements _Bool and
<stdbool.h>. Unfortunately the implementation is broken, and doesn't
let _Bool be implicitly converted to integer (as required by the C99
spec). Detect this case in autoconf.
Optimize displacements, don't pessimize them. When running in the
optimizer, we always keep track of when a reference is forward. That
doesn't mean it is unknown.
Only be optimistic about the reachability of a symbol with NO_SEG if
we are truly in pass 1, i.e. it could possibly be just a forward
reference. After we have done a single pass, if it is still NO_SEG,
then it is an absolute symbol and need to be treated as such.
Fix the disassembly of the alternate forms of register-register
MOVAPD, MOVDQA, MOVDQU, MOVQ, MOVSD, and MOVUPD.
NASM never generates these, but they would be disassembled
incorrectly.
WAIT is technically an instruction, but from an assembler standpoint
it behaves as if it had been a prefix. In particular, it has to be
ordered *before* any real hardware prefixes.
The documentation says that constructs with %$...$foo can be used
to access macros from deeper in the context stack. From what
I can tell, that has never actually worked, since we'd enter names
like %$foo into the context-local macro name table. Instead, only
insert the tail of the macro name into the context-local table;
expand get_ctx to also return a pointer to the macro name proper;
this is rather straightforward since we'd usually save away that
name at the point get_ctx is called anyway.
We have a number of all-zero buffers in the code. Put a single
all-zero buffer in nasmlib.c. Additionally, add fwritezero()
which can be used to write an arbitrary number of all-zero bytes;
this prevents the situation where the all-zero buffer is simply
too small.
When a section other than .text has a start < origin, we would
segfault; fix that.
Furthermore, at bin_cleanup() we don't have usable file/line
information, so pass ERR_NOFILE to the error() function. Perhaps less
than ideal, but better than printing a null pointer.
Update the VFMA* instructions to match the AVX spec version 5.
Since these are highly regular, use a small Perl script to generate
the instruction patterns.
Checkin 4b9358928b changed the version
message from stdout to stderr, but:
a) doesn't motivate the change in the commit log;
b) bundles that with other changes;
c) is inconsistent with other programs;
d) was done by me and I can't remember any reason for it.
Hence conclude it was unintentional and therefore a bug. Since this
commit was done after 2.05.01 no stable release has been affected.
Module labels.c has code to issue error message when global
directive appears after symbol definition, but the test condition
was incorrectly punctuated.
I realized that a documentation change is required to inform users about the
addition of entry point support for the as86 format. The following produces
reasonable output for .txt output, but I am blind and so can't check the
other formats as readily.
Previously, the ELF backends silently ignored incorrect or unknown
attributes on section declarations, and therefore used default values
in cases where the user had make an error in attempting to specify
custom values.