aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Merge remote-tracking branch 'github/nasm-2.16.xx'HEADmasterH. Peter Anvin2022-12-214-54/+70
|\ | | | | | | | | | | | | Resolved Conflicts: doc/changes.src Signed-off-by: H. Peter Anvin <hpa@zytor.com>
| * .gitignore: add misc/nasmtok.el, make whole rdoff directory ignoredH. Peter Anvin2022-12-211-10/+2
| | | | | | | | | | | | | | | | misc/nasmtok.el is a generated file. The whole rdoff directory is obsolete; if someone still has it it can be ignored. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
| * NASM 2.16.01nasm-2.16.01H. Peter Anvin2022-12-211-1/+1
| |
| * doc: html: add Chapter 1 to navbar in the TOCH. Peter Anvin2022-12-211-11/+17
| | | | | | | | | | | | | | Add Chapter 1 to the navbar for the table of contents, for ease of sequentially reading the whole document. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
| * doc: fix HTML table of contents generationH. Peter Anvin2022-12-212-31/+46
| | | | | | | | | | | | Fix the HTML table of contents being completely broken. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
| * autoconf, doc: fix comment in header to pa_have_func.m4H. Peter Anvin2022-12-211-2/+2
| | | | | | | | | | | | Comment change only Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* | version: this is now the 2.17 development branchH. Peter Anvin2022-12-202-1/+6
|/ | | | | | | 2.16 has been released, this is now officially the 2.17 development branch. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* NASM 2.16nasm-2.16H. Peter Anvin2022-12-201-1/+1
|
* Merge branch 'master' of ssh://github.com/netwide-assembler/nasmH. Peter Anvin2022-12-2016-134/+339
|\
| * NASM 2.16rc12nasm-2.16rc12H. Peter Anvin2022-12-071-1/+1
| |
| * doc/changes.src: document obj segment fixH. Peter Anvin2022-12-071-0/+4
| | | | | | | | Signed-off-by: H. Peter Anvin <hpa@zytor.com>
| * output: when converting OUT_SEGMENT to legacy, don't lose the addendH. Peter Anvin2022-12-071-4/+2
| | | | | | | | | | | | | | | | | | | | When converting an OUT_SEGMENT relocation to legacy, the addend is still significant, as it would represent an explicit addend to the segment number. Fixes: https://bugzilla.nasm.us/show_bug.cgi?id=3392783 Reported-by: David Fifield <david@bamsoftware.com> Signed-off-by: H. Peter Anvin <hpa@zytor.com>
| * outieee: fix segfault on empty inputH. Peter Anvin2022-12-071-4/+4
| | | | | | | | | | | | Fix the IEEE backend crashing if the input file is empty. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
| * Document CPU LATEVEX, add CPU EVEX and CPU VEX flagsH. Peter Anvin2022-12-075-39/+145
| | | | | | | | | | | | | | | | | | Document CPU LATEVEX and the associated prefixes; add CPU EVEX and CPU VEX flags to further control encodings. Fix the error message for invalid encodings due to flags. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
| * travis: fix the masmdisp travis testH. Peter Anvin2022-12-072-10/+5
| | | | | | | | | | | | | | | | | | | | The masmdisp travis test incorrectly contained an expectation of error, from the bug fixed in checkin e0959432fe24c597e0bfb07412276f622d93a4b9. Fix the test to contain the actually expected output. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
| * NASM 2.16rc11nasm-2.16rc11H. Peter Anvin2022-12-061-1/+1
| |
| * latevex: add test fileH. Peter Anvin2022-12-061-0/+33
| | | | | | | | Signed-off-by: H. Peter Anvin <hpa@zytor.com>
| * insns: handle late-introduced VEX encoded instructionsH. Peter Anvin2022-12-068-81/+150
| | | | | | | | | | | | | | | | For VEX instructions created *after* the corresponding EVEX instructions, we need the user to either explicitly declare them {vex} or specifying "cpu latevex". Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* | Merge remote-tracking branch 'github/emacs'H. Peter Anvin2022-11-234-0/+233
|\ \ | |/ |/|
| * misc/emacstbl.pl: add NASM version to output, add to MakefileemacsH. Peter Anvin2022-11-174-2/+46
| | | | | | | | | | | | | | Include the version number in the output (misc/nasmtok.el) and add a rule for generating it to the Makefiles. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
| * misc/emacstbl.el: script to produce token lists for an emacs modeH. Peter Anvin2022-11-171-0/+189
| | | | | | | | | | | | | | | | | | | | | | | | | | Add a simple script to auto-generate token lists for an emacs major mode, e.g. https://github.com/skeeto/nasm-mode It is recommended to use "require" this file separately from the main code, so it can be automatically kept up to date. If this ends up being used, I will include the generated result in the NASM release distribution. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* | doc: bring doc/changes.src up to dateH. Peter Anvin2022-11-231-3/+52
| | | | | | | | | | | | | | | | | | Bring doc/changes.src up to date with the current status of tree in preparation for the 2.16 release. Note that no 2.15.06 release ever was produced. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* | NASM 2.16rc10nasm-2.16rc10H. Peter Anvin2022-11-211-1/+1
| |
* | preproc: fix memory leak in %[...] processingH. Peter Anvin2022-11-211-2/+16
| | | | | | | | | | | | | | | | | | | | | | "Why dup_tlist() here? We should own it." Yes, we own it, but we still need to advance the tail pointer. Create steal_tlist() for this purpose. Fixes: https://bugzilla.nasm.us/show_bug.cgi?id=3392774 Reported-and-Debugged-by: C. Masloch <pushbx@ulukai.org> Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* | preproc: avoid crashing on %exitmacro in broken nestingH. Peter Anvin2022-11-211-0/+4
| | | | | | | | | | | | | | | | Broken %if, %rep and %macro nesting can result in the %exitmacro unwind overrunning the condition stack. Fix. Fixes: https://bugzilla.nasm.us/show_bug.cgi?id=3392796 Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* | preproc: fix incorrect use of nasm_new() in alloc_Token()C. Masloch2022-11-211-1/+1
| | | | | | | | | | | | | | | | The argument to nasm_new() is the pointer, not the indirection from the pointer. This code is only relevant when compiled without token recycling (TOKEN_BLOCKSIZE not set), but it is still wrong... Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* | preproc: fix the expansion of %00 (token type change)C. Masloch2022-11-211-1/+1
| | | | | | | | | | | | | | | | Fix the expansion of the %00 mmacro parameter; broken due to a missing change of the token type. Fixes: https://bugzilla.nasm.us/show_bug.cgi?id=3392803 Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* | preproc: add conditional-string smacro parameters; simplify functionsH. Peter Anvin2022-11-212-87/+110
| | | | | | | | | | | | | | | | | | | | | | Add the option of having strings only conditionally quoted (&&) -- do not quote an already quoted string again -- as opposed to always quoting a string. This makes a lot of the string functions way simpler to implement, and removes the need to share ad hoc parsing code with directives. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* | NASM 2.16rc9nasm-2.16rc9H. Peter Anvin2022-11-171-1/+1
| |
* | preproc: add %abs(), modify %num(), refactorH. Peter Anvin2022-11-174-81/+202
|/ | | | | | | | | | | | | Add the %abs() function, to produce the absolute value as an always-positive decimal constant. Change the order of the arguments for %num(). Refactor the handling of optional arguments, to reduce the amount of redundant code. This is currently only used for builtin functions, but might be extended in the future. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* doc: document the %num() functionH. Peter Anvin2022-11-151-4/+31
| | | | | | Add documentation for the %num() preprocessor function. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* preproc: add %num() to format a number in an arbitrary baseH. Peter Anvin2022-11-151-0/+82
| | | | | | | | | | Add the %num() preprocessor function, which returns a quoted string with a number formatted in any base between 2 and 64 (using bash encoding with '@' for 62 and '_' for 63.) It can specify a fixed number of digits with or without truncation. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* insns: fix instruction flags for the ENQCMD instructionsH. Peter Anvin2022-11-141-8/+8
| | | | | | Set a more complete set of flags for the ENQCMD family instructions. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* insns: add HRESET instructionH. Peter Anvin2022-11-142-1/+5
| | | | | | Add the HRESET instruction Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* NASM 2.16rc8nasm-2.16rc8H. Peter Anvin2022-11-141-1/+1
|
* insns: add vector instructions from ISE 046, Sept 2022H. Peter Anvin2022-11-142-0/+39
| | | | | | | | | | Add vector instructions from the Intel Instruction Set Extensions document, version 046, September 2022. Still need to check for missing instructions that have already passed through the ISE into the SDM. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* NASM 2.16rc7nasm-2.16rc7H. Peter Anvin2022-11-141-1/+1
|
* preproc: classify warnings, move into common pp-* namespaceH. Peter Anvin2022-11-146-101/+221
| | | | | | | | | | | | Classify all remaining WARN_OTHER warnings in the preprocessor. Move all preprocessor warnings except "user" under a common pp-* prefix. Warn for an out-of-range argument to the %sel() function. Finally, use "dname" in additional places for consistency and future ease of use. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* preproc: add %count() functionH. Peter Anvin2022-11-142-4/+30
| | | | | | Add %count(), giving a count of the number of arguments. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* NASM 2.16rc6nasm-2.16rc6H. Peter Anvin2022-11-131-1/+1
|
* doc: add clarification to %sel()H. Peter Anvin2022-11-131-0/+2
| | | | | | | Add clarification that %sel(), like %cond(), never expands non-selected arguments. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* preproc: implement the %cond() and %sel() functions; fix memory leakH. Peter Anvin2022-11-132-22/+130
| | | | | | | | | | Implement the %cond() and %sel() functions that expand to a specific one of the arguments. %cond(x,y,z) is basically a shorthand for %sel(2-!(x),y,z) used when x is a boolean condition. Fix a memory leak in %strcat and %strlen. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* doc: replace %define with %xdefine in some preproc function examplesH. Peter Anvin2022-11-131-12/+12
| | | | | | | | In some of the preprocessor function examples, actually enforce equivalence by using %xdefine in the function examples so the expansion is at definition time. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* preproc: allow preprocessor function expansion to recurseH. Peter Anvin2022-11-131-8/+16
| | | | | | | | | Allow preprocessor function expansion to recurse. Nearly all the machinery for recursive smacros was already in place; this merely activates it for the specific case of preprocessor functions. Making it a general facility should be deferred to a later relese, though. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* x86/insns.dat: non-vector instructions from ISE 319433-046 2022-09H. Peter Anvin2022-11-122-4/+35
| | | | | | | Additional nonvector instructions from the Intel Instruction Set Extensions document 319433-046 September 2022. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* x86/insns.pl: sort conditional instructions alphabeticallyH. Peter Anvin2022-11-121-2/+5
| | | | | | Makes the build a bit more predictable and debuggable. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* insns: drop special handling of conditional instructionsH. Peter Anvin2022-11-1210-188/+176
| | | | | | | | | | Instead of handling conditional instructions ad hoc, generate individual instruction patterns as normal. This simplifies the code and makes CMPccXADD support simpler (otherwise it would be necessary to hack in the handling of a condition code in the middle of an instruction.) Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* NASM 2.16rc5nasm-2.16rc5H. Peter Anvin2022-11-111-1/+1
|
* doc: document preprocessor functionsH. Peter Anvin2022-11-112-17/+289
| | | | | | | Add documentation for preprocessor functions, as well as the flow of preprocessor expansion. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* preproc: distinguish between directives and functionsH. Peter Anvin2022-11-112-7/+25
| | | | | | | | | | | Some preprocessor functions have the same name as directives. In those cases, they should be expanded as functions if and only if they are followed by a left parenthesis. Although it is not inherently true that either preprocessor functions require a paren nor that directives cannot start with one, but it is true and will remain true for all cases where there is a namespace collision. Signed-off-by: H. Peter Anvin <hpa@zytor.com>