summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* rbtree: add rb_search_exact()HEADmasterH. Peter Anvin (Intel)2020-07-082-0/+13
| | | | | | | | Sometimes we want to search for an exact key only, and reject the case when tree->key < key. Add rb_search_exact() for this purpose, rather than forcing the caller to perform the comparison in open code. Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
* rbtree: implement rb_first(), rb_last() operationsH. Peter Anvin (Intel)2020-07-082-11/+48
| | | | | | | | | | | | | | | | | | Add operations to get the first and last entry in the tree, respectively. Searching for 0 or ~UINT64_C(0) is not sufficient in the presence of duplicated keys, and is more inefficient anyway. rb_first() followed by rb_next() until NULL, or equivalently rb_last() followed by rb_prev() until NULL, can be used to walk the tree in key order (ascending or descending), including all duplicate key entries. Since this is a *threaded* tree now, this walk can safely free entires as it goes along, as long as the whole tree is destroyed; once any one entry has been freed, the tree is no longer valid for anything other than proceeding with the same tree walk. Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
* Merge remote-tracking branch 'github/nasm-2.15.xx'H. Peter Anvin2020-07-051-8/+6
|\
| * travis: weirdpaste.i now has better line directivesH. Peter Anvin2020-07-051-8/+6
| | | | | | | | | | | | | | | | The %line directives in weirdpaste.i now better reflect the actual lines of the source code, just as we would have for debugging output. Update the reference version of weirdpaste.i accordingly. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* | Merge remote-tracking branch 'github/nasm-2.15.xx'H. Peter Anvin2020-07-058-190/+303
|\ \ | |/
| * preproc: handle %+ pasting after empty expansionsH. Peter Anvin (Intel)2020-07-051-20/+16
| | | | | | | | | | | | | | | | | | %+ tokens can end up next to each other, or at the beginning or the end of an expansion if we try to paste the output of empty macros. This is perhaps particularly likely to happen in %[] expressions. Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
| * Make debug info and error messages correctly reflect macros and repsH. Peter Anvin (Intel)2020-07-057-164/+260
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1. Error messages would issue with the line number of %endrep. 2. Debug line information would ignore both macros and reps. This is doubly wrong; macros are semantically equivalent to inline functions, and it is expected that debuggers trace into these functions. These changes finishes the last parts of moving all responsibility for the listing enable/disable into the preprocessor, so remove the way over-complicated macro inhibit facility from the listing module entirely. Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
| * BR 3392691: errors: issue ERR_PASS2 messages in preproc-only modeH. Peter Anvin (Intel)2020-07-032-4/+25
| | | | | | | | | | | | | | | | | | In preproc-only mode, we only ever execute a single pass, so we need to still issue error messages created during that pass, otherwise we don't even generate %warning or %error messages... Reported-by: Jason Hood <jadoxa@yahoo.com.au> Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
| * doc: swap 'hyphen' and 'minus' in PostScript definitionH. Peter Anvin (Intel)2020-07-021-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | It appears that at least with the Adobe Source fonts: 'hyphen' -> U+002D (ASCII) 'minus' -> U+2212 This is ugly for cut & paste purposes. Reported-by: C. Masloch <pushbx@ulukai.org> Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
* | travis/test: Update version testCyrill Gorcunov2020-07-031-1/+1
| | | | | | | | | | | | Just to eliminate warning, nothing serious. Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
* | outlib: Make ol_add_sym_to being staticCyrill Gorcunov2020-07-031-2/+2
| | | | | | | | | | | | | | | | | | | | Otherwise getting building problem > output/outlib.c:197:6: error: no previous prototype for ‘ol_add_sym_to’ [-Werror=missing-prototypes] > 197 | void ol_add_sym_to(struct ol_symlist *syml, struct ol_symhead *head, > | ^~~~~~~~~~~~~ Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
* | outlib: fix infinite recursion due to incorrect wrappingH. Peter Anvin (Intel)2020-07-021-1/+1
| | | | | | | | | | | | | | | | | | recursion: see recursion. A wrapper function needs to call the function being wrapped, not itself. Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
* | Merge remote-tracking branch 'github/nasm-2.15.xx'H. Peter Anvin (Intel)2020-07-027-28/+7
|\ \ | |/
| * doc: remove references to sourceforgeJasper Lievisse Adriaanse2020-07-011-2/+0
| | | | | | | | | | | | | | The mailinglists have been migrated to lists.nasm.us Signed-off-by: Jasper Lievisse Adriaanse <j@jasper.la> Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
| * NASM 2.15.02H. Peter Anvin (Intel)2020-07-011-1/+1
| |
| * changes.src: fixed Mkfiles/msvc.makH. Peter Anvin (Intel)2020-07-011-0/+2
| | | | | | | | Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
| * msvc.mak: fix syntax for excluding config.hH. Peter Anvin (Intel)2020-07-011-1/+1
| | | | | | | | | | | | mkdep.pl wants a / regardless of what the target path separator is. Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
| * strlist.h: move safe_alloc declarationH. Peter Anvin (Intel)2020-07-011-1/+1
| | | | | | | | | | | | | | | | Move the safe_alloc declaration after the * symbol to be consistent with all other functions with this attribute. Just in case it matters somewhere... Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
| * Change unused -> unused_func to remove special caseH. Peter Anvin (Intel)2020-07-013-24/+3
| | | | | | | | | | | | | | | | | | The autoconf process automatically generates macros for function attributes, including empty placeholders. Said empty placeholders also propagate automatically into config/unconfig.h for the compilers which don't support autoconf. Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
* | Merge tag 'nasm-2.15.02rc2'H. Peter Anvin (Intel)2020-06-301-1/+1
|\ \ | |/ | | | | NASM 2.15.02rc2
| * NASM 2.15.02rc2H. Peter Anvin (Intel)2020-06-301-1/+1
| |
| * preproc: expand_mmac_param_range() should be staticH. Peter Anvin (Intel)2020-06-301-1/+1
| | | | | | | | | | | | | | expand_mmac_params_range() lost its "static" in checkin e99a946390e561804bf624a1e67f25ae34b13dfd. Put it back. Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
* | Merge remote-tracking branch 'github/nasm-2.15.xx'H. Peter Anvin (Intel)2020-06-3023-244/+514
|\ \ | |/ | | | | | | | | | | Resolved Conflicts: version Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
| * NASM 2.15.02rc1H. Peter Anvin (Intel)2020-06-301-1/+1
| |
| * doc: index cleanupsH. Peter Anvin (Intel)2020-06-301-107/+117
| | | | | | | | Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
| * gitattributes: don't try to merge the version fileH. Peter Anvin (Intel)2020-06-301-0/+1
| | | | | | | | | | | | | | Don't try to merge the version file... if there is a conflict, keep the current version. Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
| * doc: document(!) documentation build requirementsH. Peter Anvin (Intel)2020-06-301-2/+11
| | | | | | | | | | | | The tools we need to build the documentation. Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
| * doc: slight cleanup of MASM compatibility package informationH. Peter Anvin (Intel)2020-06-301-5/+9
| | | | | | | | | | | | | | Note that the extended DB syntax is also available, regardless of if %use masm is used or not. Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
| * emptyarg.asm: add expansion test for a range with a single parameterH. Peter Anvin (Intel)2020-06-301-0/+8
| | | | | | | | | | | | Add a test for %{1:1}, as reported in BR 3392611. Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
| * changes.src: document %{:} macro parameter range fixH. Peter Anvin (Intel)2020-06-301-0/+3
| | | | | | | | Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
| * preproc: fix %{:} macro operand rangesH. Peter Anvin (Intel)2020-06-302-63/+164
| | | | | | | | | | | | | | | | | | | | | | | | | | Fix the handling of %{:} macro operands. Use the same code for expanding the subarguments as for normal arguments. This (hopefully) resolves the following bug reports: BR 3392611, BR 3392686, BR 3392688 Reported-by: <coconutfaistoslimeregistry@gmail.com> Reported-by: Jasper Lievisse Adriaanse <r+nasm@jasper.la> Reported-by: Jason Hood <jadoxa@yahoo.com.au> Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
| * changes.src: update changes for 2.15.02 (so far)H. Peter Anvin (Intel)2020-06-301-0/+8
| | | | | | | | | | | | Begin the release note list for 2.15.02. Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
| * doc: incbin: no need to mention an ancient Amiga assemblerH. Peter Anvin (Intel)2020-06-301-5/+4
| | | | | | | | | | | | | | | | There is no reason to mention an ancient Amiga assembler as the source for INCBIN, especially since it is supported by quite a few other assemblers. Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
| * Make empty db statement a suppressable warningH. Peter Anvin (Intel)2020-06-301-2/+9
| | | | | | | | | | | | Add a "db-empty" warning class to allow suppressing warnings. Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
| * clang: mark inline functions unused and add warning optionsH. Peter Anvin (Intel)2020-06-306-22/+88
| | | | | | | | | | | | | | | | | | | | | | | | | | clang, unlike gcc, will warn on inline functions which are unused. This can happen if a function is either intended to be used in the future, or it is only used under certain config options. Mark those functions with the "unused" attribute; not only does it quiet the warning, but it also documents it for the user. Shuffle around the warning options in configure and add a few more that are specific to clang. Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
| * BR 3392687: clang miscompiles offsetin() for uninitialized pointerH. Peter Anvin (Intel)2020-06-301-2/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The actual pointer value in offsetin() cancels out, but clang still miscompiles offsetin() for an uninitialized pointer, considering the value to be completely undefined. Initialize pointer being passed to offsetin() to make clang happy; both the gcc and clang optimizers discover later in the code that the initialization is unused and removes it from the code. Although technically undefined behavior, this is in my opinion a severe quality of implementation bug in clang, and I will file a bug report accordingly. Reported-by: Jasper Lievisse Adriaanse <r+nasm@jasper.la> Reported-by: David Bohman <debohman@gmail.com> Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
| * hash generators: rename UNUSED to UNUSED_HASH_ENTRYH. Peter Anvin (Intel)2020-06-304-12/+12
| | | | | | | | | | | | | | | | The name UNUSED is too generic and may conflict with future macro definitions. This is machine-generated code anyway, so rename UNUSED to UNUSED_HASH_ENTRY. Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
| * listing: list short reserved blocks as ?? instead of <res ...>H. Peter Anvin (Intel)2020-06-272-2/+22
| | | | | | | | | | | | | | | | | | | | | | <res ...> can get rather annoying when mixed in with data, as can happen with the MASM-like db syntax. List shorter blocks (8 bytes or less) as ?? instead; 8 bytes avoids line breaks for a single statement. This is probably more readable anyway... Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
| * nasmdoc.css: use a relative size for code/preH. Peter Anvin (Intel)2020-06-271-1/+1
| | | | | | | | | | | | | | Use a percentage size modifier for code/pre, which hopefully should allow it to respect enclosing size modifications (for headings.) Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
| * nasmdoc.css: use a smaller font size for code textH. Peter Anvin (Intel)2020-06-271-0/+1
| | | | | | | | | | | | Use a smaller font size for code text, just as for ps/pdf. Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
| * doc: actually *use* the smaller code font size...H. Peter Anvin (Intel)2020-06-272-6/+6
| | | | | | | | | | | | Helps to actually use what is intended. Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
| * doc: for ps/pdf, use a smaller font for codeH. Peter Anvin (Intel)2020-06-271-13/+34
| | | | | | | | | | | | | | The text looks better using a smaller font for both inline code and code paragraphs. Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
| * doc: clean up warnings formattingH. Peter Anvin (Intel)2020-06-273-3/+14
| | | | | | | | | | | | | | | | | | | | When a warning documentation message contains more than one paragraph, we have to indent the subsequent paragraphs using \> unless they are a code paragraph (\c). Improve a few warnings doc messages. Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
* | rbtree: implement a "threaded LLRB tree"H. Peter Anvin (Intel)2020-06-292-57/+204
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Change the left-leaning red-black (LLRB) trees into left-leaning threaded red-black trees. Instead of NULL pointers at leaf nodes, use the otherwise unused field as a pointer to the lexical predecessor (left) or successor (right). This allows fast previous/next interator operation without needing to keep track of the root of the tree at all times. The additional metadata that needs to be kept can be done for "free" simply by changing "bool red" into a flag field. Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
* | outlib: add infrastructure for common section and symbol handlingH. Peter Anvin (Intel)2020-06-272-8/+522
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Pretty much all the backends have to do the same gymnastics to handle symbols and sections. In the future, this should be done by the assembly core, but in order to prepare the ground and get the performance benefits as soon as possible, implement a library of functions which can manage symbols and sections and their respective hashes, trees, and tables. This infrastructure is not yet used by any backend, that porting work has to come next. Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
* | Merge remote-tracking branch 'origin/nasm-2.15.xx'H. Peter Anvin (Intel)2020-06-278-30/+88
|\ \ | |/ | | | | | | | | | | Resolved Conflicts: version Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
| * doc: some more cleanups and detailed specificationsH. Peter Anvin (Intel)2020-06-271-10/+19
| | | | | | | | | | | | Some more mostly editorial changes. Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
| * doc: editorial cleanupsH. Peter Anvin (Intel)2020-06-271-15/+37
| | | | | | | | | | | | | | Clean up the language of a few sections, add a few examples, and better document %pragma limit. Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>
| * NASM 2.15.01nasm-2.15.01H. Peter Anvin (Intel)2020-06-271-1/+1
| |
| * changes.src: update for 2.15.01H. Peter Anvin (Intel)2020-06-271-0/+9
| | | | | | | | Signed-off-by: H. Peter Anvin (Intel) <hpa@zytor.com>