H. Peter Anvin
6686fc627e
Introduce cold function attribute
...
Attribute to deemphasize certain code paths.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2018-02-22 14:52:50 -08:00
H. Peter Anvin
6feef84f25
outbin: check the status of lookup_label()
...
Make sure we actually found the label we looked at, to avoid undefined
behavior.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2018-02-22 14:51:59 -08:00
H. Peter Anvin
7418883b62
outelf: fix possibly uninitialized variable
...
Fix possibly uninitialized variable "currfile".
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2018-02-22 14:51:26 -08:00
H. Peter Anvin
4dbf3a96a4
Merge remote-tracking branch 'origin/nasm-2.13.xx'
...
Resolved Conflicts:
version
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
2018-02-20 12:40:11 -08:00
H. Peter Anvin
99d45c850e
Fix problem with C99 inlines and -Werror=missing-prototypes
...
Some older versions of gcc (gcc 4.2.1 at least) produce a warning,
promoted to error, on C99 inlines. Do some work to figure out if we
need to fall back to GNU inline syntax.
Fix some issues with GNU inline syntax.
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
2018-02-20 12:34:17 -08:00
H. Peter Anvin
f71820d605
version: bump to 2.13.04rc0 until we have an actual -rc
...
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
2018-02-14 11:13:05 -08:00
H. Peter Anvin
8524e16303
insns.dat: add aliases of the RET instruction with explicit operand size
...
Make it possible to generate variants of RET(F) with explicit operand
size specified without having to use o16/o32/o64.
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
2018-02-14 11:09:07 -08:00
Cyrill Gorcunov
53371ddd17
Merge branch 'nasm-2.13.xx'
...
* nasm-2.13.xx:
nasmlib: Drop pure_func attrib from seg_alloc
nasmlib: Drop unused seg_init
2018-02-10 00:44:07 +03:00
Cyrill Gorcunov
9f45a77f46
nasmlib: Drop pure_func attrib from seg_alloc
...
It not only reads static variable but writes it back as well.
https://bugzilla.nasm.us/show_bug.cgi?id=3392461
Reported-by: Michael Šimáček <msimacek@redhat.com>
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2018-02-10 00:40:46 +03:00
Cyrill Gorcunov
5eb1838b4d
nasmlib: Drop unused seg_init
...
The helper has been eliminated in 2c4a4d5810
https://bugzilla.nasm.us/show_bug.cgi?id=3392461
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2018-02-10 00:34:10 +03:00
H. Peter Anvin
3366e31b8a
asm: allow abort on panic to be specified at runtime
...
New option --abort-on-panic to make debugging easier.
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
2018-02-07 14:14:36 -08:00
H. Peter Anvin
1b53750430
Merge tag 'nasm-2.13.03'
...
NASM 2.13.03
Resolved Conflicts:
include/iflag.h
version
x86/insns-iflags.ph
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
2018-02-07 13:51:54 -08:00
H. Peter Anvin
ef7d18bfbb
NASM 2.13.03
2018-02-07 13:38:58 -08:00
H. Peter Anvin
cb7b097b3e
doc: some more documentation on 64-bit programming
...
Some more information about 64-bit programming and its quirks.
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
2018-02-07 12:28:42 -08:00
H. Peter Anvin
ddea5fc0cd
doc: clarify need for ABS QWORD to do a 64-bit absolute load
...
The rarely used 64-bit absolute load instruction (what gas calls
movabsq) needs to be declared ABS if we are in relative mode, which is
normally the case.
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
2018-02-07 11:19:26 -08:00
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
Cyrill Gorcunov
70c439b8de
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-01-28 00:56:18 +03:00
H. Peter Anvin
2f47c3c229
Merge tag 'nasm-2.13.03rc1'
...
NASM 2.13.03rc1
Resolved Conflicts:
version
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2018-01-08 13:01:27 -08: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
Tomasz Kantecki
c90d99a655
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>
2017-12-29 17:20:33 +03:00
Cyrill Gorcunov
f1f8ef48f4
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>
2017-12-29 17:20:29 +03:00
Cyrill Gorcunov
0ba95b7767
insns.dat: Move VAES instructions to AES group
...
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2017-12-29 17:20:25 +03:00
Tomasz Kantecki
3a6c71f931
insns.dat: Add VAESENC, VAESENCLAST instructions
...
Signed-off-by: Tomasz Kantecki <tomasz.kantecki@intel.com>
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
2017-12-29 17:20:21 +03:00
Cyrill Gorcunov
73ab510c71
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>
2017-12-29 17:20:17 +03:00
H. Peter Anvin
81b62b9f54
Eliminate filename length restrictions, remote ofmt->filename()
...
Get rid of remaining dependencies on FILENAME_MAX, which ought to have
been removed a long time ago.
Remove ofmt->filename(); all implementations pretty much do the same
thing and there is absolutely no reason to duplicate that
functionality all over the place.
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
2017-12-20 13:38:20 -08:00
H. Peter Anvin
dcbaf677d4
error: add --enable-panic-abort config options
...
For debugging purposes, make it possible to force calling abort() on
ERR_PANIC.
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
2017-12-20 12:10:33 -08:00
H. Peter Anvin
7a6bf74d02
error: add ERR_TOPFILE
...
Add ERR_TOPFILE, for cases where displaying the current file and line
are completely inappropriate. Instead, display the main input file,
or, if not available, the output file.
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
2017-12-20 12:10:13 -08:00
H. Peter Anvin
883985def5
nasm.c: better handling of errors without a file without ERR_NOFILE
...
We have hardcoded ERR_NOFILE in a number of places which really should
not need them, and it represents loss of information. Instead, be
robust in the handling either of no filename or no line number.
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
2017-12-20 11:32:39 -08:00
H. Peter Anvin
29dff5a29e
saa.c: unify the various saa_write*() routines
...
Use cpu_to_le*() to unify the various saa_write*() routines.
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
2017-11-29 17:31:14 -08:00
H. Peter Anvin
f52ea70dd1
bytesex.h: more simplifications and add const
...
Add more simplifications where it is practical; unify WRITECHAR() as
it has no need for byte swapping in any way.
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
2017-11-29 17:19:27 -08:00