It is disabled by now -- we need to teach nasm-t to
skip some parts of output (due to format specifics).
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
The warning files are generated by a script, but the scripts is fast
enough run every time a C file is updated. To prevent having to
rebuild every file, however, make the generation script only actually
modify the file if it has changed.
Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
The warning output by obj symbol truncation has been changed, update
the travis reference accordingly.
Cc: Cyrill Gorcunov <gorcunov@gmail.com>
Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
I believe "truncating" is the more common terminology in this case, so
change to it for aestetic reasons only.
Cc: Cyrill Gorcunov <gorcunov@gmail.com>
Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
The case where we warn for excessive length should presumably have
been %.nnns which means limit length to nnn characters, rather than
%nnns which means left-pad with spaces to nnn bytes if possible. Also
change the limit from 128 to 64, to make it more likely to not line
break.
Cc: Cyrill Gorcunov <gorcunov@gmail.com>
Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
When we encode a name we put its length before it, the
storage is one byte width so the name can't be more
than UINT8_MAX (ie 255) bytes length.
Moreover if one provide a name more than RECORD_MAX then
we simply overwrite random memory.
Thus lets do as in other obj_check calls -- shrink the
size we gonna use. But unlike oter code lets yield a
warning as well.
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
The mempcpy helper returns *last* byte pointer thus when
we call set_text_free we have to pass a pointer to the
start of the string.
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
The RDOFF backend has been broken since at least NASM 2.14, throwing
an immediate assert. Since only one person appears to have even
noticed, and fixing it properly looks like it would take quite a bit
of work, disable this back end and document its deprecation.
Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
$ in data expressions is hazardous. A proper fix for this turns out to
be quite complex, as it requires the expression engine to propagate
additional data. For now, just put it into the documentation.
Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
Make sure the data being freed get double
freed after -- the pointers must be zapped
(actually nasm_free and free_tlist support
being called with NULL pointer as an argument).
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
BNDMK, BNDLDX, and BNDSTX are split-SIB (MIB) instructions, but do
*not* require a SIB encoding. However, TILELOAD* and TILESTORE* *do*
require a SIB in all cases. Split the MIB flag into MIB (split
address) and SIB (SIB required) flags.
This fixes travis test mpx.
Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
We need to add the byte offset into the floating-point value to get
the correct result for these floating point to integer conversions.
Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
Add a configure option to enable suggestion warnings, currently a set
of -Wsuggest-attribute=* warnings.
Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
Add a new macro vprintf_func() for vprintf-style functions, and add
printf_func() and vprintf_func() attribute arguments whereever
meaningful.
Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
Using list_for_each() is by definition not safe when freeing the
members of the list, use list_for_each_free() instead.
Also, use nasm_new() and nasm_free() where appropriate.
This was discovered as a downstream bug from BR 3392707.
Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
The VPCMP instructions are controlled by an immediate byte, but there
is also a set of SSE-derived legacy opcodes for VPCMPEQ and
VPCMPGT. For the specific cases of VPCMPEQ and VPCMPGT, prefer those
opcodes since they are one byte shorter.
Reported-by: ig <glucksmann@avast.com>
Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
After issuing an error message for a missing %stacksize argument, need
to quit rather than continuing to try to access the pointer.
Fold uses of tok_text() while we are at it.
Reported-by: Suhwan <prada960808@gmail.com>
Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
An eop may have a data buffer associated with it as part of the same
memory allocation. Therefore, we need to move "subexpr" up instead of
merging it into "eop".
This *partially* resolves BR 3392707, but that test case still
triggers a violation when using -gcv8.
Reported-by: Suhwan <prada960808@gmail.com>
Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
-Lw really is only useful to debug NASM crashes, and can hugely slow
down the assembler. Make -L+ simply imply full verbosity; if NASM
crashes use -Lw+ instead.
Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
Break the instruction processing if there are impossible combinations
of Sx flags and operand sizes. If the intent is to always require
explicit sizes, use the SX flag.
The INSERTPS instruction pattern was explicitly wrong, the rest of
these are nuisance fixes.
TODO: fix the disassembler to be able to exclude patterns where these
bits don't matter.
Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
MOVHPD takes a mem64, but was incorrectly tagged SO - an impossible
combination.
The Sx tags really are a problem and should be removed in the future
whereever possible, presumably in the master branch.
Reported-by: Lukas Hönig <lukashoenig@icloud.com>
Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
Set the hash size scaling constant to 1.6, signifying 3.2 times the
hash load. This both reduces the convergence time and makes it less
likely (< 25%) that a non-entry will require a secondary comparison,
and after all, in most of our use cases non-entries are by far the
more common.
Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
Most SSE instructions were missing memory operand sizes, resulting in
error if a memory operand was specified with explicit size.
Reported-by: <nemeth.marton@hotmail.com>
Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>