Nothing wrong, but the text of the warning message has changed after
subordinating it to another warning.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
NASM would try to "eat the comma token" in db expressions, even for
cases where the token was not a comma. Fix that and error out
properly.
To give better error messages, track where in the input string a token
starts or ends. This information is only valid as long as the input
string is kept, but that is just fine for error messages during
parsing.
Reported-by: Peter Cordes <pcordes@gmail.com>
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
The masmdisp travis test incorrectly contained an expectation of
error, from the bug fixed in checkin
e0959432fe.
Fix the test to contain the actually expected output.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Classify all remaining WARN_OTHER warnings in the preprocessor. Move
all preprocessor warnings except "user" under a common pp-* prefix.
Warn for an out-of-range argument to the %sel() function.
Finally, use "dname" in additional places for consistency and future
ease of use.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
The instruction supports two forms with [f2] and [f3].
I guess we might add aliases as VMGEXIT2 and VMGEXIT3.
For now simly leave a second form for ndisasm sake.
https://bugzilla.nasm.us/show_bug.cgi?id=3392755
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
Add a {rex} prefix to force REX encoding (typically a redundant 40h
prefix).
For prefix parsing, we can use t_inttwo to encode the prefix slot
number.
Give more verbose error messages for encoding mismatches.
If macro is undefined while it's being expanded, use after free occurs,
since the MMacro instance is released, but it is still used to proceed
the expansion.
This change forbids macro undefinition: non-fatal error is raised and
the MMacro instance is not released if it is being processed by NASM
preprocessor.
Consider the following example:
| $ cat test.asm
| %macro m 0
| %unmacro m 0
| %endmacro
| m
| $ ./nasm test.asm
| test.asm:4: error: `%unmacro' can't undefine the macro being expanded
| test.asm:2: ... from macro `m' defined here
Fixes BR3392531 and BR3392716.
Signed-off-by: Igor Munkin <imun@cpan.org>
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
Lets run it as win32 since they are sharing
backends in most places but win32 is a way
more widely used.
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
It is failing right now so I'm not sure if
masm test is correct one. Lets merge it in
this form and update if needed.
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
Currently we strip newlines from files on read and write
procedures for better diff output, but as being pointed
by hpa@ this makes quite inconvenient to work with tests
in a manual mode.
Thus lets left outputs as is. We have to update all tests
with template outputs since by default output streams are
ending with newline.
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>