Commit Graph

3635 Commits

Author SHA1 Message Date
H. Peter Anvin
f53c9778cd doc: add a bit more text about 64-bit immediates and pointers
There are some gotchas in how immediates and pointers are loaded in
64-bit mode and how they interact with optimization.  Document those
cases.

Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
2018-02-07 11:16:20 -08:00
H. Peter Anvin
22d3a2b601 NASM 2.13.03rc6 2018-02-07 10:54:08 -08:00
H. Peter Anvin
73c804c31e doc/changes.src: add missing blank line between bullet points
Bullet points are considered paragraphs, so our documentation compiler
require an empty line between them.

Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
2018-02-07 10:52:50 -08:00
H. Peter Anvin
75b35503fa vaesenc.asm: add a few more test cases
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
2018-02-07 10:48:13 -08:00
H. Peter Anvin
7514970ffe NASM 2.13.03rc5 2018-02-06 14:52:02 -08:00
H. Peter Anvin
d08b1c4370 Merge remote-tracking branch 'origin/nasm-2.13.xx' into nasm-2.13.xx
Resolved Conflicts:
	include/iflag.h

Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
2018-02-06 14:50:08 -08:00
H. Peter Anvin
a7ecf2646d iflag: automatically assign values, saner handling of CPU levels
Automatically assign values to the instruction flags; we ended up with
a case where pushing flags into the next dword caused comparison
failures due to other places in the code explicitly comparing
field[3].

This creates necessary defines for this not to happen; it also cleans
up a fair bit of the iflag code.

This resolves BR 3392454.

Reported-by: Thomasz Kantecki <tomasz.kantecki@intel.com>
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
2018-02-06 14:43:07 -08:00
Cyrill Gorcunov
7c640b7579 NASM 2.13.03rc4
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2018-02-07 00:06:47 +03:00
Cyrill Gorcunov
91f8aa7118 iflag: Fix iflag_cmp_cpu_level
In commit a8f3698cf3
the iflag_cmp_cpu_level escaped updating. Fix it.

Reported-by: Tomasz Kantecki <tomasz.kantecki@intel.com>
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2018-02-06 23:04:58 +03:00
Cyrill Gorcunov
4d7e680cb0 NASM 2.13.03rc3
Need a new version due to occasional merge,
see da1cb0e000

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2018-02-05 20:23:47 +03:00
Cyrill Gorcunov
da1cb0e000 Revert "insns.dat: Add VAESENC, VAESENCLAST instructions"
This reverts commit d625f85cd2.

Occasionally merged in from the master, while it was here
already in different form.
2018-02-05 20:20:48 +03:00
Cyrill Gorcunov
d287398b8d NASM 2.13.03rc2
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2018-02-05 20:14:25 +03:00
Cyrill Gorcunov
9254323fdf changes.doc: document dwarf issue
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2018-02-05 20:13:44 +03:00
Cyrill Gorcunov
e0ff7b025b output: elf -- Add missing dwarf loc section
Lost during elf engine unification in
4670887c4d

https://bugzilla.nasm.us/show_bug.cgi?id=3392459

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2018-02-05 20:08:10 +03:00
Tomasz Kantecki
d625f85cd2 insns.dat: Add VAESENC, VAESENCLAST instructions
Signed-off-by: Tomasz Kantecki <tomasz.kantecki@intel.com>
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2018-02-05 20:04:52 +03:00
H. Peter Anvin
2eb00b5fe1 NASM 2.13.03rc1 2018-01-08 13:00:22 -08:00
H. Peter Anvin
0c2da082ee changes.doc: document VAES* and VPCLMULQDQ
Document new instruction support.

Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2018-01-08 12:59:26 -08:00
Tomasz Kantecki
4764dfaa51 insns.dat: Add VPCLMULQDQ instruictions
https://bugzilla.nasm.us/show_bug.cgi?id=3392455

Signed-off-by: Tomasz Kantecki <tomasz.kantecki@intel.com>
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2018-01-08 12:53:48 -08:00
Cyrill Gorcunov
7680602f86 insns-flags: Add VPCLMULQDQ flag
In sake of https://bugzilla.nasm.us/show_bug.cgi?id=3392455

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2018-01-08 12:53:41 -08:00
Cyrill Gorcunov
581fc6899b insns.dat: Move VAES instructions to AES group
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2018-01-08 12:53:32 -08:00
Tomasz Kantecki
1aebcc76e3 insns.dat: Add VAESENC, VAESENCLAST instructions
Signed-off-by: Tomasz Kantecki <tomasz.kantecki@intel.com>
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2018-01-08 12:53:26 -08:00
Cyrill Gorcunov
a8f3698cf3 insns-iflags: Add AES, VAES flags
In sake of https://bugzilla.nasm.us/show_bug.cgi?id=3392454

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2018-01-08 12:53:19 -08:00
H. Peter Anvin
fe2f6de2ee NASM 2.13.02 2017-11-29 11:29:38 -08:00
H. Peter Anvin
075ebe7f66 doc: clean up 2.13.02 release notes, document MachO debug option
Clean up the 2.13.02 release notes: we don't need to list every single
subcase where we would crash, as it is not really relevant to the
user.

Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
2017-11-29 11:25:24 -08:00
H. Peter Anvin
23b971d993 doc: clarify the BITS issue for 2.13.02.
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
2017-11-29 11:05:02 -08:00
Cyrill Gorcunov
d44a7c0a7c NASM 2.13.02rc3 2017-11-26 00:36:49 +03:00
Cyrill Gorcunov
8e2307caca docs: changes -- Drop leftover
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2017-11-25 17:42:45 +03:00
Cyrill Gorcunov
4c171ce268 doc: Update changes for 2.13.02
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2017-11-25 17:41:38 +03:00
Cyrill Gorcunov
9b7ee09abf prepoc: Fix heap-buffer-overflow in detoken
Just make sure we've a data to process.

https://bugzilla.nasm.us/show_bug.cgi?id=3392424

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2017-10-22 21:42:59 +03:00
Cyrill Gorcunov
6f8109ebf1 preproc: Fix SIGSEGV if not data provided for implicit pasting
https://bugzilla.nasm.us/show_bug.cgi?id=3392423

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2017-10-22 21:26:36 +03:00
Cyrill Gorcunov
7524cfd914 preproc: Fix sigsegv in find_cc
For specially formed code we can have skip_white_
to end up with nil pointer which should be taken
into account.

https://bugzilla.nasm.us/show_bug.cgi?id=3392435

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2017-10-22 19:01:16 +03:00
Cyrill Gorcunov
59ce1c67b1 peproc: Fix sigsevg in smacro expansion
In case if smacro is called with inapropriate
number of arguments exit early. Actually we have
to handle this situation more gracefully but
this requires a way more efforts than two
line patches (need to refactor macro expansion).

https://bugzilla.nasm.us/show_bug.cgi?id=3392431

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2017-10-22 18:54:20 +03:00
Cyrill Gorcunov
c9244eaadd prepoc: mmacro -- Don't left nparam_max less than nparam_min
Otherwise we hit nil dereference in best case.

https://bugzilla.nasm.us/show_bug.cgi?id=3392436

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2017-10-22 15:25:48 +03:00
Cyrill Gorcunov
3144e84add preproc: Don't access offsting byte on unterminated strings
https://bugzilla.nasm.us/show_bug.cgi?id=3392446

Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2017-10-22 10:50:55 +03:00
H. Peter Anvin
53259e8aaf configure.ac: more debugging options
Make -O0 imply -fno-omit-frame-pointer
Add options to compile/link with AddressSanitizer and
UndefinedSanitizer.

Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
2017-10-11 16:47:59 -07:00
H. Peter Anvin
89215e9e37 Remove duplicate warnings for immediate overflow
For immediates, we had one overflow test in the bytecode interpreter
(in most cases via warn_overflow_opd()) and one in out(); this meant
we got two warnings instead of one every time.  Replace with only the
one in out().

Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
2017-10-11 13:14:01 -07:00
H. Peter Anvin
aaefc7fe6b BR 3392442: correct vmin in overflow_general()
The calculation of vmin in overflow_general() was bogus, causing
silliness like ~80h being warned about in a byte context.

Reported-by: C. Masloch <pushbx@38.de>
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
2017-10-11 13:12:17 -07:00
H. Peter Anvin
9e08075278 NASM 2.13.02rc2 2017-09-27 15:58:49 -07:00
H. Peter Anvin
81fd01f9d0 BR 3392362: generate RMI versions of PEXTRW when possible
We could generate the MRI version (SSE 4.1) instead of the RMI
(SSE 2) version of these instructions if a 64-bit register was given
as the destination.

Reported-by: Vasiliy Olekhov <olekhov@gmail.com>
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
2017-09-27 15:55:57 -07:00
H. Peter Anvin
59d5291a3a test: add Makefile target for RDOFF files
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
2017-09-27 15:53:48 -07:00
H. Peter Anvin
e580466254 .gitignore: add more test file extensions
More file extensions used in the test directory to be ignored.

Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
2017-09-27 15:32:37 -07:00
H. Peter Anvin
e38654a24e BR 3392411: smartalign: make sure we always define the end symbol
We need to always define the end symbol, otherwise we might find
ourselves in a situation where the alignment code grows (common!) and
then the symbol is defined late.

Reported-by: ig <glucksmann@avast.com>
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
2017-09-27 15:29:01 -07:00
H. Peter Anvin
94ead27971 BR 3392437: Fix diagnostic for negative value in TIMES
Issue a diagnostic and don't panic for invalid TIMES values.

Reported-by: C. Masloch <pushbx@38.de>
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
2017-09-27 15:22:23 -07:00
H. Peter Anvin
230db148a3 outelf.c: fix a typo in previous commit
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
2017-09-27 15:12:03 -07:00
H. Peter Anvin
e4303ee7f1 BR 3392417: always end the DWARF .debug_abbrev section with a null
The DWARF spec specifies that the .debug_abbrev section always should
end with a null byte.  Existing tools don't seem to care, but some
issue a warning, and it is invalid according to spec.

Reported-by: Darren Sylvain <sylvaindarren@gmail.com>
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
2017-09-27 15:05:03 -07:00
H. Peter Anvin
f91dc2033d .gitignore: add .mo and .mo64 as generated file extensions
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
2017-09-27 14:43:43 -07:00
H. Peter Anvin
621603da26 BR 3392418: MachO: support 16-character section names, debug flag
Support 16-character section names, and support the debug section
flag.

Reported-by: Andrey Timofeyev <timofeyev@bk.ru>
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
2017-09-27 14:42:08 -07:00
H. Peter Anvin
72a85f146e .gitignore: ignore *.dep
*.dep are automatically generated dependency files; ignore them.

Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
2017-09-27 14:26:33 -07:00
H. Peter Anvin
d5e7c072bd test: add test code for BR 3392439
Bug report BR 3392439 test code.

Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
2017-09-27 14:25:44 -07:00
H. Peter Anvin
e800127a46 BR3392439: make sure to update globalbits if appropriate
For some output types, the bit size, globalbits, follow the section
(segment); make sure we actually update it!

Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
2017-09-27 14:22:16 -07:00