error() routine is conditional dependent so we should
use nasm_error instead to yield message unconditionally.
Reported-by: Christian Masloch
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
Make %substr robust to handle -1,-1 parameters
and restore old behavior when number of characters
in substring is greater then length of string itself.
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
Make %substr robust to handle -1,-1 parameters
and restore old behavior when number of characters
in substring is greater then length of string itself.
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
In case if a second parameter of %deftok is missed we hit
NULL dereference. Fix it.
Reported-by: Christian Masloch
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
In case if a second parameter of %deftok is missed we hit
NULL dereference. Fix it.
Reported-by: Christian Masloch
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
For big numbers it's easier to estimate bytes count
if they are written in hex notation. Let it be so.
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
Handle immediate-size optimization for "mov r64,imm" -- reduce it to
"mov r32,imm32" or "mov r64,imm32" as appropriate.
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
A lot of instructions ignore the L bit in the VEX prefix, just like
a lot of instructions ignore the W bit, so don't use them in the
sub-table select.
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Fix handling of byte codes 250-253 (sign-extended 32-bit immediate,
extended to 64 bits) and 324 (instruction must have osize 64).
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Allow implicit operands for VBLENDVP, just as for other instructions,
since the semi-legacy forms now are removed.
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Version 7 of the AVX spec specifically forbids (#UD) using the
66 0F 38 14/15 forms of the BLENDV instructions with a VEX prefix;
those encodings are strictly legacy SSE 4.1.
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Updates from the AVX version 7 specification: mostly tightening of the
rules for VEX.L and VEX.W, but remove the VPERMIL2 instructions.
Also encode all the full-length forms of the VCMP instructions and
prefer those for the disassembly.
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Change the .wx (ignore the W field) to .wig, to match the latest
version of the AVX specification. This is not a functional change,
but just makes instruction patterns a little easier to write.
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
We use -Ox by default since Nasm-2.09 so "-O0" is not
longer "default" option. But first paragraph still has
the reference which confuses people. Get rid of it.
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
Feel free to update this text as well,
and check it please for being more/less
readable.
CC: Keith Kanios <keith@kanios.net>
CC: "H. Peter Anvin" <hpa@zytor.com>
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
And describe it in documentation. We've introduced
sectalign in 2.09rc series and have to provide an
ability to steer this feature.
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
For now we inform users about their sources need to be
updated and also since _all_ context case are legit
for single macros only we split lookup into two phases:
1) Lookup in active context, which is perfectly valid
2) Lookup in external contexts, which will be deprecated soon.
If (2) happens we yield warning.
A typical testcase is
---
%macro one 0
%push
%$a:
%assign %$b 12
%push
mov eax, %$a
mov eax, %$b ; hit -- context through
%pop
%pop
%endmacro
one
---
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>