summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* assemble.c: only warn for an absolute address on pass 2nasm-2.12.xxH. Peter Anvin2017-02-201-2/+2
| | | | | | | | | A forward symbol may appear absolute in pass 1, so defer this warning to pass 2. This addresses BR 3392361. Note: this fix is already in the master branch. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* doc/changes.src: document the RDPID instructionH. Peter Anvin2016-11-151-0/+2
| | | | | | Add RDPID to changes.src. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* Add rdpid instructionH. Peter Anvin2016-11-152-0/+26
| | | | | | Add the RDPID instruction, documented in the Intel SDM October 2016. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* output: outelf,dwarf -- Add missing DW_LNS_copyCyrill Gorcunov2016-11-062-0/+2
| | | | | | | | Backport of master commit ed347369aeeb6ff7338249a967bd292ee78debc5 https://bugzilla.nasm.us/show_bug.cgi?id=3392325 Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
* x86/insns.dat -- Fix typo in VMOVDQA instructionCyrill Gorcunov2016-11-051-1/+1
| | | | | | | https://bugzilla.nasm.us/show_bug.cgi?id=3392369 Reported-by: Agner <agner@agner.org> Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
* preproc: add dummy %pragma directiveH. Peter Anvin2016-10-043-1/+14
| | | | | | | In future versions of NASM we will presumably have "real" pragmas; add dummy support for the %pragma directive for forward compatibility. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* ldrdf: Remove output file if there are any errorsDaniel Lundqvist2016-10-041-1/+3
| | | | | | | | If there are any errors while linking, we should not create an output file. Signed-off-by: Daniel Lundqvist <daniel@malarhojden.nu> Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* changes.src: typographical adjustmentH. Peter Anvin2016-10-041-1/+1
| | | | | | Extremely minor typographical fix. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* NASM 2.12.03rc1nasm-2.12.03rc1H. Peter Anvin2016-10-031-1/+1
|
* changes.src: document CLWB and PCOMMITH. Peter Anvin2016-10-031-0/+5
| | | | Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* insns: add OBSOLETE flag for instructions removed from architectureH. Peter Anvin2016-10-032-17/+18
| | | | | | | | There aren't that many instructions which have been rmeoved from the x86 architecture, but there is a handful. Flag those with an OBSOLETE flag. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* Add the CLWB and (already deprecated) PCOMMIT instructionsH. Peter Anvin2016-10-031-2/+4
| | | | | | Add the CLWB and PCOMMIT instructions. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* changes.src: update for a 2.12.03 releaseH. Peter Anvin2016-10-031-0/+23
| | | | | | | We seem to have accumulated enough fixes that it ought to be time for a 2.12.03 release. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* assemble: avoid redundant repetition in RESx warning messageH. Peter Anvin2016-10-031-1/+1
| | | | | | | Clean up the language in this warning message, so as not be so unnecessarily repetitive. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* assemble: print a warning on a forward reference in RESxH. Peter Anvin2016-10-031-0/+3
| | | | | | | Print a warning on a forward reference in RESx. This really should have been a critical expression, and a forward reference should have been an error, but it wasn't implemented that way and as such we can't just randomly break people's code, even if it is dangerous.
* Correct /is4 encoding for EVEX instructionsH. Peter Anvin2016-09-201-18/+19
| | | | | | | | For EVEX instructions, /is4 can contain a fifth register bit, encoded in bit 3 of the imm8. Properly generate this case, and simplifiy the /is4 generation code somewhat. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* insns.dat: Enable contracted forms for additional instructionsHenrik Gramner2016-08-251-516/+516
| | | | | | | | | | | | | | | | | | | Improve consistency by allowing contracted forms for EVEX-encoded instructions when it's allowed for similar VEX-encoded instructions. Previously the behavior would change depending on the vector size or the register number which could be somewhat confusing: vaddps xmm0, xmm1 ; ok vaddps ymm0, ymm1 ; ok vaddps zmm0, zmm1 ; error vaddps xmm0, xmm16 ; error Also allow contracted forms for a few additional older AVX instructions where it makes sense. Signed-off-by: Henrik Gramner <henrik@gramner.com> Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
* insns.dat: Fix EVEX vpbroadcast(b|w), vpextr(b|w), and vpinsr(b|w)Henrik Gramner2016-08-251-19/+19
| | | | | | | | | | Use the correct T1S compressed displacements. https://bugzilla.nasm.us/show_bug.cgi?id=3392302 https://bugzilla.nasm.us/show_bug.cgi?id=3392314 Signed-off-by: Henrik Gramner <henrik@gramner.com> Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
* Run make alldepsH. Peter Anvin2016-08-165-13/+13
|
* codeview: Fix ill-formed "S_COMPILE2" record.Fabian Giesen2016-07-271-8/+16
| | | | | | | | | | | | | | write_symbolinfo_properties didn't match the S_COMPILE2 record it's supposed to be writing (the "compiler version" string was emitted starting in the final "version" field); fix that. Write version 8.0.50727; the Windows App Certification Kit (WACK) checks compiler versions as given in app debug info and complains when the toolchain is too old. 8.0.50727 is the lowest permitted "MASM" version for WACK to be happy, so that's what we write. Signed-off-by: Fabian Giesen <fabiang@radgametools.com> Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
* rdoff: Add rdf2bin input dependencyFabian Giesen2016-07-271-4/+4
| | | | | | | | | | On host platforms where $(LN_S) is cp, need to make sure to link rdf2bin first. Backport of 6d67dbfa95 Signed-off-by: Fabian Giesen <fabiang@radgametools.com> Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
* labels: Warn if new label created on pass twoCyrill Gorcunov2016-07-181-9/+18
| | | | | | | | | | When symbols are created turing non-first pass we should at least warn a user since it's a sign of potential problem. http://bugzilla.nasm.us/show_bug.cgi?id=3392358 Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
* Add explicit void parameter to newmembuf() function declaration.bcallah@devio.us2016-07-141-1/+1
| | | | | | | | | | | In rdoff/rdoff.c, the function declaration for newmembuf is written: static memorybuf *newmembuf() The attached diff adds an explicit void parameter. It seems like it would be nicer with an explicit void parameter especially since the -Werror build options seem to want to find such things. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* compiler.h: always undefine __STRICT_ANSI__ for gccH. Peter Anvin2016-07-141-2/+5
| | | | | | | | | | | | It is not just DJGPP which has broken header files if __STRICT_ANSI__ is defined. Cygwin has also been confirmed to have problems. It would be somewhat different if configure didn't still detect those functions. Undefine __STRICT_ANSI__ for all gcc platforms. If this breaks then, well, we'll have to really narrow down the problems. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* NASM 2.12.02nasm-2.12.02H. Peter Anvin2016-07-061-1/+1
|
* Don't suppress ERR_DEBUG messages from the list fileH. Peter Anvin2016-07-061-2/+1
| | | | | | | In some cases, debug messages in the list file can be enormously powerful for finding problems. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* preproc: Fix accessing OOM addressCyrill Gorcunov2016-06-191-3/+7
| | | | | | | | | | | In case if there is no environment variable present we allocated empty string but when working with tokens we test for second byte for special symbols, accessing out of memory address (->text[1] for the reference). http://bugzilla.nasm.us/show_bug.cgi?id=3392333 Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
* NASM 2.12.02rc9nasm-2.12.02rc9H. Peter Anvin2016-06-161-1/+1
|
* preproc.c: fix assignment incorrectly coded as ==H. Peter Anvin2016-06-161-1/+1
| | | | | | Assignment is = not ==. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* NASM 2.12.02rc8nasm-2.12.02rc8H. Peter Anvin2016-06-161-1/+1
|
* preproc: for include files, include correct path in filenameJim Kukunas2016-06-161-7/+23
| | | | | | | | | | | | The codeview backend needs to be able to open each source file passed in so that it can calculate its checksum. In order to take into account include paths, this patch updates the filename to include the path where the file was found. Signed-off-by: Jim Kukunas <james.t.kukunas@linux.intel.com> Signed-off-by: H. Peter Anvin <hpa@linux.intel.com> [ hpa: resolved one conflict in preproc.c ]
* outmacho: Fix relative relocations for 32-bit Mach-O (fix typo)H. Peter Anvin2016-06-141-1/+1
| | | | | | | | | | | This unbreaks checkin 84f6860ed53492976c9d79e9a8a0bdc60da78bc6, which was broken due to a transcription error of mine. Zenith432 was faultless in this case. This fixes bug report 3392355. Reported-by: Zenith432 <zenith432@users.sourceforge.net> Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* NASM 2.12.02rc7nasm-2.12.02rc7H. Peter Anvin2016-06-031-1/+1
|
* outobj.c: Fix for RIP relative addressing relocation.knut st. osmundsen2016-06-031-2/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | For 16-bit and 32-bit x86 code, the size and realsize() always matches as only jumps, calls and loops uses PC relative addressing and the address isn't followed by any other opcode bytes. In 64-bit mode there is RIP relative addressing which means the fixup location can be followed by an immediate value, meaning that size > realsize(). When the CPU is calculating the effective address, it takes the RIP at the end of the instruction and adds the fixed up relative address value to it. The linker's point of reference is the end of the fixup location (which is the end of the instruction for Jcc, CALL, LOOP[cc]). It is calculating distance between the target symbol and the end of the fixup location, and add this to the displacement value we are calculating here and storing at the fixup location. To get the right effect, we need to _reduce_ the displacement value by the number of bytes following the fixup. Example: data at address 0x100; REL4ADR at 0x050, 4 byte immediate, end of fixup at 0x054, end of instruction at 0x058. => size = 8. => realsize() -> 4 => CPU needs a value of: 0x100 - 0x058 = 0x0a8 => linker/loader will add: 0x100 - 0x054 = 0x0ac => We must add an addend of -4. => realsize() - size = -4. The code used to do size - realsize() at least since v0.90, probably because it wasn't needed... Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* NASM 2.12.02rc6nasm-2.12.02rc6H. Peter Anvin2016-05-251-1/+1
|
* codeview: use nasm_realpath() to find the canonical name of the outfileH. Peter Anvin2016-05-241-21/+18
| | | | | | | | | Concatenating the cwd with the name of the output file is incorrect for filenames which are specified as absolute. We already have nasm_realpath() for this purpose, use it. Cc: Jim Kukunas <james.t.kukunas@intel.com> Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* NASM 2.12.02rc5nasm-2.12.02rc5H. Peter Anvin2016-05-241-1/+1
|
* ifunc.mac: the ilog2 warning may want to be both ceil and floorH. Peter Anvin2016-05-243-8/+14
| | | | | | | | | There is no reason why the warning-generating ilog2 has to be only the floor variant. However, I am pretty sure we can simply implement the ilog2cw() as a macro only; we can always fix that if that turns out to be incorrect. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* codeview: don't walk the file list for every lineH. Peter Anvin2016-05-241-43/+54
| | | | | | | | | Instead of walking a linear list of files for every line, make a simple comparison for the common case of the same file, and otherwise use a hash table. Cc: Jim Kukunas <james.t.kukunas@intel.com> Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* codeview.c: register all filenamesJim Kukunas2016-05-171-2/+2
| | | | | | | | | This essentially reverts 6503051dcc360172c49311d586f2b9cf4ab2ea81 since that workaround is no longer needed thanks to support for multiple source files Signed-off-by: Jim Kukunas <james.t.kukunas@linux.intel.com> Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* codeview.c: Add support for multiple source filesJim Kukunas2016-05-171-34/+120
| | | | | | | | Handle the existence of multiple source files, as is normal when using include files. Signed-of-by: Jim Kukunas <james.t.kukunas@linux.intel.com> Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* configure: correctly discover -W options for clangH. Peter Anvin2016-05-161-0/+4
| | | | | | | | clang doesn't error out on unknown -W options unless -Werror=unknown-warning-option is specified first, so do that so the configure script can do its job. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* doc: remove obsolete referencesH. Peter Anvin2016-05-161-5/+0
| | | | | | We don't use comp.lang.asm.x86 or freshmeat for announements anymore. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* Fix building in a separate directory from the source codeH. Peter Anvin2016-05-169-117/+98
| | | | | | | | The code to handle building in a separate directory had seriously bitrotted. This contains a number of fixes to make it possible, including bits like the documentation which never worked in the past. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* Unbreak building in a separate object directoryH. Peter Anvin2016-05-166-7/+7
| | | | | | Fix bitrot in building in a separate object directory. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* autogen.sh: remove configure-generated filesH. Peter Anvin2016-05-161-0/+1
| | | | | | Remove files generated by configure when running autogen.sh. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* codeview: use nasm_free() instead of plain free()H. Peter Anvin2016-05-101-3/+3
| | | | | | | We want to consistently use our allocator wrapper functions whereever possible. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* preproc: Don't dereference nil @istkCyrill Gorcunov2016-05-101-1/+2
| | | | | | If not input was specified istk = NULL, so don't dereference it. Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
* srcfile.c: remove unnecessary #include'sH. Peter Anvin2016-05-101-4/+0
| | | | | | | Remove #include's inherited from nasmlib.c which aren't needed in this file. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* NASM 2.12.02rc4nasm-2.12.02rc4H. Peter Anvin2016-05-101-1/+1
|