summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* 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
|
* stdscan: put some error message strings in quotesH. Peter Anvin2016-05-101-2/+2
| | | | | | | Put some error message strings inside `...' quotes to match existing usage. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* Use a hash to keep exactly one copy of each filename aroundH. Peter Anvin2016-05-1012-87/+180
| | | | | | | | | | | | | | | The old code for keeping track of source file name and line was confused as hell about ownership of the strings, and it is pretty clear we leaked that information all over the place. Instead, use a hash table to keep a copy of each string as necessary, and simply make references to a string pool that we keep until the end of the assembly session. This pool probably should be unified with the list of dependency files, and so on, but that is for the development branch. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* quote: make the input argument to nasm_quote() constH. Peter Anvin2016-05-102-3/+4
| | | | | | | | | Whereas nasm_unquote() unquotes the argument in place, nasm_quote() has to allocate a new string (since the new string will *always* be longer than the old string!) Make the old string const since we're making a copy anyway. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* codeview: Call register_file only when producing line numbersFabian Giesen2016-05-101-3/+3
| | | | | | | | | | | | | Previously, debug info would refer to the first file seen, even when it did not actually generate line numbers (e.g. segto=-1). Fix it so we only lock in the file name the first time we actually produce a line number record. Not as good as proper support for debug info referencing multiple source files but much more useful than the current behavior. Signed-off-by: Fabian Giesen <fabiang@radgametools.com> Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
* codeview: Make md5sum calc read file in 'binary' modeFabian Giesen2016-05-103-8/+8
| | | | | | | | | When assembling on Windows machines with CRLF line endings, computing the MD5 hash from the file read in "text" mode (transforms CRLF->LF) gives incorrect results. Signed-off-by: Fabian Giesen <fabiang@radgametools.com> Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
* codeview: Look up %include path when determining files to hash.Fabian Giesen2016-05-103-1/+22
| | | | | | | | | | | | | | The hash calculation in calc_md5 tries to open the source file via "filename" again. For %includes, this is the file name that was specified in the %include directive, not the actual name of the file that was opened by the preprocessor. In other words, this fails if the include file is not in the current working directory. Add pp_input_fopen that uses the preprocessor include path lookup code to resolve a file name and open it, and use that in codeview.c. Signed-off-by: Fabian Giesen <fabiang@radgametools.com> Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
* NASM 2.12.02rc3nasm-2.12.02rc3H. Peter Anvin2016-05-091-1/+1
|
* doc: document warning improvementsH. Peter Anvin2016-05-092-2/+16
| | | | Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* .gitignore: add .s and .i filesH. Peter Anvin2016-05-091-1/+3
| | | | | | .s and .i files can be generated during debugging. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* Fix and clean up listing of macro expansionH. Peter Anvin2016-05-092-8/+17
| | | | | | | | | | | | | | Fix the printing of the macro stack: we need to follow the mstk->next_active list, not mstk->next, and we need to reverse the order so that the highest-level inclusion comes first. Since this should be a rare or at least performance-insensitive operation, do it using simple function recursion. Finally, add an ellipsis before the "from macro" message; it greatly enhances readability. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* Show the expanded macro stack when displaying diagnosticsH. Peter Anvin2016-05-098-13/+78
| | | | | | | | | It can be hard to find errors inside potentially nested macros. Show the mmacro expansion stack when printing diagnostics. Note that a list file doesn't help for errors that are detected before the code-generation pass. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* Ignore unrecognized warning namesH. Peter Anvin2016-05-091-5/+2
| | | | | | | | | If we get an invalid warning name passed to the -w/-W option or the [warning] directive, ignore it. This may be a warning name enabled in a future version of NASM, and it is rather pointless to error out on it. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* doc/changes.src: document PTR warningH. Peter Anvin2016-05-091-0/+4
| | | | Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* Specifically if we encounter the PTR keywordH. Peter Anvin2016-05-096-4/+18
| | | | | | | | | | Issue a specific suppressible warning if we encounter the PTR keyword. This usually indicates someone mistakenly using MASM syntax in NASM. This introduces a generic infrastructure for issuing warnings for such keywords. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* Fix the handling of pass1 warnings, display control option for warningsH. Peter Anvin2016-05-091-7/+15
| | | | | | | | | Fix pass1 warnings so they actually display. When issuing suppressible warnings, display the option that controls them, as gcc has been doing for a while. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* outmacho: Fix missing braceH. Peter Anvin2016-05-091-1/+1
| | | | | | | | | Fix a missing brace introduced in checkin 84f6860ed53492976c9d79e9a8a0bdc60da78bc6. This was a transcription error of mine; Zenith432's original patch was correct. Cc: Zenith432 <zenith432@users.sourceforge.net> Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* NASM 2.12.02rc2nasm-2.12.02rc2H. Peter Anvin2016-05-091-1/+1
|
* changes.src: update as of the current timeH. Peter Anvin2016-05-091-0/+5
| | | | Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* outmacho: Fix relative relocations for 32-bit Mach-OZenith4322016-05-091-0/+4
| | | | | | | | | IP-relative relocations were broken for 32-bit Mach-O when referencing external symbols after the Mach-O backends were merged. This fixes bug reports 3392348, 3392352, and 3392346. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* NASM 2.12.02rc1nasm-2.12.02rc1H. Peter Anvin2016-04-051-1/+1
|
* changes.src: document %if error fixH. Peter Anvin2016-04-051-0/+5
| | | | | | Document the fix for errors inside live %if branches. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* preproc: correct the logic in the suppression of preproc errorsH. Peter Anvin2016-04-051-1/+1
| | | | | | | | The logic for suppressing preprocessor errors was missing an !, which was present before checkin 215186fe82c461bc1ccef7bed5c1a1a0253bfcc9. Reported-by: Knut St. Osmundsen <bird-nasm@anduin.net> Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* changes.src: fix old typoH. Peter Anvin2016-04-051-1/+1
| | | | | | arror -> error Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* insns.dat: Bring back rax for 64 bit mode of MONITORXCyrill Gorcunov2016-03-271-0/+1
| | | | | | | | | | | Previously in d3be3380170 i ripped off @rax but this is due to misinterpretation of https://sourceware.org/ml/binutils/2015-06/msg00041/mwaitx.patch so move it back. Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
* insns.dat: Fix monitorx instructionCyrill Gorcunov2016-03-271-1/+2
| | | | | | It accepts rax|ax registers instead of rax. Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
* insns.dat: Allow MONITORX, MWAITX and CLZERO in 32bit mode as wellCyrill Gorcunov2016-03-231-5/+5
| | | | | Reported-by: Paul Blinzer <apblinzer@gmail.com> Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
* NASM 2.12.01nasm-2.12.01H. Peter Anvin2016-03-171-1/+1
|
* msvc.mak: /Ox and /Oy are redundant with /O2H. Peter Anvin2016-03-081-1/+4
| | | | | | | Per the MSVC++ docs, /Ox and /Oy are redundant with /O2, and the docs recommend that they do not be used together. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* nasmdoc.src: remove unimplemented %comment directiveH. Peter Anvin2016-03-071-11/+0
| | | | | | | %comment..%endcomment were never implemented, remove from the documentation. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* Makefiles: run "make alldeps"H. Peter Anvin2016-03-075-11/+11
| | | | | | Automatic update of dependencies. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* Defer debug format search until after command line parsingH. Peter Anvin2016-03-074-17/+28
| | | | | | | | Avoid funnies with ordering of debug format selection by deferring debug format search until after command line processing. Also permit the -gformat syntax used by many C compilers. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* ofmt: get rid of the debuginfo parameter to ofmt->cleanup()H. Peter Anvin2016-03-0714-68/+43
| | | | | | | | | | Get rid of the completely pointless "debuginfo" parameter to ofmt->cleanup(). Most backends completely ignore it, and the two that care (obj, ieee) can simply test dfmt instead. Also, dfmt is never NULL, so any test for a NULL dfmt is bogus. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* NASM 2.12.01rc2nasm-2.12.01rc2H. Peter Anvin2016-03-071-1/+1
|
* doc: document fix to the codeview output formatH. Peter Anvin2016-03-071-0/+3
| | | | | | | | Document the label fix; although a global error, it was user-visible in the Codeview backend so document it as such. Signed-off-by: H. Peter Anvin <hpa@zytor.com> Cc: Jim Kukunas <james.t.kukunas@linux.intel.com>