summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* NASM 2.13.02rc1nasm-2.13.02rc1H. Peter Anvin2017-08-161-1/+1
|
* doc: update for upcoming 2.13.02 releaseH. Peter Anvin2017-08-162-1/+25
| | | | | | Update release notes and documentation for 2.13.02. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* nasm: when using -MW, quote filenames containing &H. Peter Anvin2017-08-161-0/+1
| | | | | | When using the -MW option, double-quote filenames containing &. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* nasm: when using -MW, enclose whitespace in double quotesH. Peter Anvin2017-08-162-1/+25
| | | | | | | | When using the -MW option, enclose whitespace-containing filenames in double quotes. There are probably quite a few other things we ought to know how to do... Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* nasm: when generating null targets for WMAKE, add %nullH. Peter Anvin2017-08-161-4/+6
| | | | | | WMAKE wants an explicit %null directive; empty is not ok. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* BR 3392421: consider mode decorators in instruction matchingH. Peter Anvin2017-08-161-0/+7
| | | | | | | | We have to consider mode decorators when considering instruction matching, otherwise we end up falling back to VEX encoding if it is available, losing the decorator. See BR 3392421. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* nasmdoc: the dbg output format is compiled in by defaultH. Peter Anvin2017-08-161-3/+2
| | | | | | These days, the dbg output format is compiled in by default, too. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* nasm: new option -MW to emit Watcom-style Makefile rulesH. Peter Anvin2017-08-163-13/+98
| | | | | | | Allow NASM to generate Watcom-style Makefile dependencies, in addition to the default POSIX-style Makefile dependencies. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* doc/rdsrc: don't treat \# as a comment marker if preceeded by \H. Peter Anvin2017-08-161-1/+1
| | | | | | | We need to be able to let \\# represent a literal \#, rather than be \ followed by a comment. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* test/Makefile: output dependency information filesH. Peter Anvin2017-08-161-20/+20
| | | | | | | Generate dependency information files as output to make sure we really do the right thing. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* asm/preproc.c: use nasm_add_string_to_strlist()H. Peter Anvin2017-08-161-6/+1
| | | | | | | | Use nasm_add_string_to_strlist() to avoid a memory leak. nasm_add_to_strlist() requires that the caller manages the string being added or not. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* misc/omfdump.c: expand dDEPFILE COMENT recordsH. Peter Anvin2017-08-161-1/+29
| | | | | | Expand dDEPFILE COMENT records. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* outobj: emit file dependency informationH. Peter Anvin2017-08-167-54/+397
| | | | | | | | | Some OMF toolchain can make use of file dependency information embedded in the object files. As implemented here, we don't try to absolutize the filenames, as that prevents moving around trees and is OS-dependent. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* preproc: Add found files to the list of dependencies even when cachedMartin Storsjö2017-08-161-0/+8
| | | | | | | | | | | | | This fixes the dependency listings as generated with -MD (if assembling runs in multiple passes). https://bugzilla.nasm.us/show_bug.cgi?id=3392420 gorcunov@: add missing zero byte Signed-off-by: Martin Storsjö <martin@martin.st> Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com> Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* configure: Add --enable-gdb optionCyrill Gorcunov2017-08-161-0/+6
| | | | | | | When one needs to run nasm under GDB Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com> Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* preproc: Free token's text if only it has been modifiedCyrill Gorcunov2017-08-161-1/+1
| | | | | | | https://bugzilla.nasm.us/show_bug.cgi?id=3392414 Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com> Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* preproc: Workaround a usage after free bugAdam Majer2017-08-161-1/+11
| | | | | | | | | | | | | | | In some circumstantes this free is incorrect resulting in usage after-free. Workaround it by not freeing memory here. https://bugzilla.nasm.us/show_bug.cgi?id=3392414 gorcunov@: - slightly tuneup the comment Signed-off-by: Adam Majer <amajer@suse.de> Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com> Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* preproc: Only concat tok->text if we accounted for its sizeAdam Majer2017-08-161-2/+8
| | | | | | | | https://bugzilla.nasm.us/show_bug.cgi?id=3392415 Signed-off-by: Adam Majer <amajer@suse.de> Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com> Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* timestamp: centralize handing of compilation timestampH. Peter Anvin2017-08-023-57/+84
| | | | | | | Do all the generation and conversion of the compiler timestamp in one place and make it available to modules. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* nasmlib/md5c: Fix typo in WORDS_LITTLEENDIANCyrill Gorcunov2017-06-251-1/+1
| | | | | | https://bugzilla.nasm.us/show_bug.cgi?id=3392416 Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
* test/Makefile: separate NASM and NASMDEPH. Peter Anvin2017-06-251-17/+18
| | | | | | | Separate out the NASM and NASMDEP variables, in case one wants to override the former. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* saa: fix typo: LITTEENDIAN -> LITTLEENDIANH. Peter Anvin2017-06-231-1/+1
| | | | Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* outmacho: always use symbol-relative relocations for MachO64H. Peter Anvin2017-06-221-30/+52
| | | | | | | | | | It seems that the MachO64 linker really doesn't like segment-relative relocations under certain circumstances, so force relocations to be converted to "external" (symbol-relative); error out if no symbol is available (if this is a problem, we can consider inserting a synthetic symbol if necessary.) Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* outdbg: make the output for relative relocations more clearH. Peter Anvin2017-06-221-3/+3
| | | | | | | Make the output for relative relocations more clear, so it can be actually comprehended. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* test/reldef.asm: add some global symbolsH. Peter Anvin2017-06-221-0/+3
| | | | | | Make some symbols global for more testing. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* reldef.asm: add more test cases for referenceH. Peter Anvin2017-06-221-8/+16
| | | | Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* reldef.asm: more comprehensive testH. Peter Anvin2017-06-221-4/+41
| | | | | | More testing of various relative operations. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* BR 3392409: idata_bytes() and resv_bytes() don't match their prototypessezeroz2017-06-011-2/+2
| | | | | | | | | https://bugzilla.nasm.us/show_bug.cgi?id=3392409 idata_bytes() and resv_bytes() don't match their prototypes in common.c which leads to a build error with watcom. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* nasmdoc.css: add more space between columns and a column separatorH. Peter Anvin2017-05-021-0/+10
| | | | | | | The columns were rather crammed together; add more space around them and add a column separator bar. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* Document/update dependencies for the documentationH. Peter Anvin2017-05-022-0/+23
| | | | Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* NASM 2.13.01nasm-2.13.01H. Peter Anvin2017-05-011-1/+1
|
* insns.h: change ITEMPLATE_END to not warn on some compilersH. Peter Anvin2017-05-011-1/+1
| | | | | | | | | | | | The use of negative numbers for some fields in ITEMPLATE_END triggers a nuisance warning at least with Sun CC. There is no reason for it: the only thing that matters in this template is I_none, so declare it that way. See BR 3392372. Reported-by: <noloader@gmail.com> Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* doc/changes.src: update with the latest changesH. Peter Anvin2017-05-011-0/+5
| | | | Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* a) Fix handling of DZ/ZWORD; b) don't crash on TIMES JMPH. Peter Anvin2017-05-0111-179/+216
| | | | | | | | | | | | | | | a) Fix a number of missing instances of DZ and ZWORD. b) NASM would crash if TIMES was used on an instruction which varies in size, e.g. JMP. Fix this by moving the handling of TIMES at a higher level, so we generate the instruction "de novo" for each iteration. The exception is INCBIN, so we can avoid reading the included file over and over. c) When using the RESx instructions, just fold TIMES into the reserved space size; there is absolutely no point to iterate over it. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* listing: fix base address for TIMESH. Peter Anvin2017-05-011-3/+4
| | | | | | | | A simpler, and actually correct fix for the listing address for TIMES. The listing interface is quite frankly insane, but it probably is better to fix it in 2.14+ and not in the maintenance branch. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* Revert "asm/assemble.c: correct the listing address for TIMES"H. Peter Anvin2017-05-011-13/+10
| | | | | | | | | This reverts commit 440ba7e13eeb02c441e75e62e2daa91085c113ce. The fix is wrong; it causes the listing file to *only* show <rept>, without showing the first iteration. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* doc/changes.src: document the changes to the 2.13 maint branch so farH. Peter Anvin2017-05-011-0/+9
| | | | | | Current changes scheduled for 2.13.01. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* asm/assemble.c: correct the listing address for TIMESH. Peter Anvin2017-05-011-10/+13
| | | | | | | | | We need to set the listing offset before calling LIST_TIMES, but we had already advanced data.offset by calling out(). Move the call to lfmt->set_offset() and lfmt->uplevel() to the top and out of the loop; there is no reason for it to be in the loop in the first place. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* listing.c: show [ssss] for a segment instead of a bogus addressH. Peter Anvin2017-05-011-2/+9
| | | | | | | | There is no point in showing a number of a relative segment, so just show [ssss]; even if there is a possible segment offset it is linker-dependent and output format dependent. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* output/legacy.c: OUT_SEGMENT -> OUT_ADDRESS with a zero addendH. Peter Anvin2017-05-012-2/+4
| | | | | | | | | | | The legacy output doesn't distinguish between segments and other addresses, so we need to force the offset to zero before passing it down to the output layer. This addresses BR 3392406. Reported-by: <rugxulo@gmail.com> Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* test/Makefile: add a rule to run omfdump on an .obj fileH. Peter Anvin2017-05-011-0/+3
| | | | | | | omfdump is really useful while debugging obj output, so add an explicit rule to generate omfdump output. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* changes.src: we managed to implement a few %pragmas before 2.13...H. Peter Anvin2017-04-291-3/+1
| | | | | | | Minor change to the release notes for 2.13: we did end up with a few actually implemented %pragmas. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* NASM 2.13nasm-2.13H. Peter Anvin2017-04-291-1/+1
|
* nasmlib/ilog2.c: force the shift in ROUND() to be an uint32_tH. Peter Anvin2017-04-291-7/+7
| | | | | | | Some compilers apparently warn on 1 << w for w == 31; fix it by explicitly making it UINT32_C(1). Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* changes.src: definitely making 2.13 nextH. Peter Anvin2017-04-291-8/+4
| | | | | | About to release 2.13 for real. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* NASM 2.13rc23nasm-2.13rc23H. Peter Anvin2017-04-271-1/+1
|
* outmacho: fix dwarf line number information (debug_line section)Chang S. Bae2017-04-271-4/+11
| | | | | | | | | | Create directory table in prologue and file name indicates index of the table for its directory Now bring back included file names Signedoff-by: Chang S. Bae <chang.seok.bae@intel.com> Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* outmacho: add dir listChang S. Bae2017-04-271-20/+65
| | | | | | | | Separate dir info from the file list to align with dwarf format in debug_line section Signedoff-by: Chang S. Bae <chang.seok.bae@intel.com> Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* Mkfiles/README: add a blank lineH. Peter Anvin2017-04-261-0/+1
| | | | | | Trivial formatting fix: add a blank line for readability. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* Makefile.in: better filter for Perl dependenciesH. Peter Anvin2017-04-261-2/+2
| | | | | | Be a bit smarter about what to require and what to ignore. Signed-off-by: H. Peter Anvin <hpa@zytor.com>