summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* NASM 2.09rc5nasm-2.09rc5Cyrill Gorcunov2010-07-281-1/+1
|
* doc: Updates on macro rangesCyrill Gorcunov2010-07-281-4/+4
| | | | Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
* labels.c: cleanupCyrill Gorcunov2010-07-282-91/+78
| | | | Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
* Get rid of misc/altreg.incCyrill Gorcunov2010-07-281-72/+0
| | | | | | It's the same as macros/altreg.mac which is already included. Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
* doc: Explain SECTALIGNCyrill Gorcunov2010-07-282-1/+21
| | | | Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
* doc: Fix ..sym section name misprintCyrill Gorcunov2010-07-271-1/+1
| | | | Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
* assemble.c: Style nitfixCyrill Gorcunov2010-07-261-915/+916
| | | | | | Various tabs/space mixture cleaned and some more. Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
* Revert "Improve process_ea and introduce -OL"H. Peter Anvin2010-07-257-143/+72
| | | | | | | | | | This reverts commit ac732cb6a599836bf4c988e59ac6de4498758c72. Resolved Conflicts: doc/nasmdoc.src Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* nasm.h: move "regs.h" to top; make is_register() a boolH. Peter Anvin2010-07-251-5/+3
| | | | | | | Move the #include of regs.h to the top with the other includes, and make is_register() -- being a boolean predicate -- return bool. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* move is_register helper to nasm.hCyrill Gorcunov2010-07-252-7/+6
| | | | | | | | | | | | | | | H. Peter Anvin noted: | | Could we avoid putting static code that has no dynamic content in | dynamically generated files... it just complicates things unnecessarily. | | The above can move into nasm.h for example. | Good idea. CC: "H. Peter Anvin" <hpa@zytor.com> Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
* Use is_register helperCyrill Gorcunov2010-07-251-14/+8
| | | | | | Save us some line of code Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
* regs.pl: Introduce is_register() helperCyrill Gorcunov2010-07-251-0/+7
| | | | | | Instead of opencoded check use inline helper. Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
* Remove redundant sentence in docsVictor van den Elzen2010-07-241-2/+1
|
* Improve process_ea and introduce -OLVictor van den Elzen2010-07-247-72/+144
| | | | | | | | | | | | | | | | | | | Two fixes: 1. Optimization of [bx+0xFFFF] etc 0xFFFF is an sbyte under 16-bit semantics, so make sure to check it right. 2. Don't optimize displacements in -O0 Displacements that fit into an sbyte or can be removed should *not* be optimized in -O0. Implicit zero displacements are still optimized, e.g.: [eax] -> 0 bit displacement, [ebp] -> 8 bit displacement. However explicit displacements are not optimized: [eax+0] -> 32 bit displacement, [ebp+0] -> 32 bit displacement. Because #2 breaks compatibility with 0.98, I introduced a new optimization level: -OL, legacy.
* doc: Update changes.srcCyrill Gorcunov2010-07-231-0/+3
| | | | Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
* preproc.: Fix NULL dereference on broken %strlen argumentCyrill Gorcunov2010-07-232-1/+6
| | | | | | | | | Under particular circumstances %strlen may cause SIGSEG. A typical example is %strlen with nonexistent macro argument. [ Testcase test/strlen.asm ] Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
* preproc: allow non-identifier character in environment variablesH. Peter Anvin2010-07-204-35/+125
| | | | | | | | Allow non-identifier characters in the name of environment variables, by surrounding them with string quotes (subject to ordinary string-quoting rules.) Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* changes.src: Fix misprint in "instructions" word.Cyrill Gorcunov2010-07-171-1/+1
| | | | Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
* nasmdoc: we still miss Chuck, but...H. Peter Anvin2010-07-151-1/+0
| | | | | | | | | We still miss Chuck, but I don't think we can really say anymore we're doing this particular release in his memory. Requiescat in pace, our friend. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* Merge branch 'nasm-2.08.xx'H. Peter Anvin2010-07-151-0/+10
|\ | | | | | | | | | | | | Resolved Conflicts: version Signed-off-by: H. Peter Anvin <hpa@zytor.com>
| * changes.src: update with the 2.08.xx changesnasm-2.08.xxH. Peter Anvin2010-07-151-0/+10
| | | | | | | | | | | | Patchlevels should be documented, too... Signed-off-by: H. Peter Anvin <hpa@zytor.com>
| * NASM 2.08.02nasm-2.08.02Cyrill Gorcunov2010-07-101-1/+1
| |
| * preproc.c: Fix NULL deref on token pastingCyrill Gorcunov2010-07-101-1/+3
| | | | | | | | | | | | | | | | | | | | | | In case if there is a whitespace before 'paste' token we may reach NULL dereference in strlen since paste_head will point to TOK_WHITESPACE. Fix it. [mainstream adabc1576b957fc7d929d2c7e749b4f45f7293aa] Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
| * NASM 2.08.01nasm-2.08.01Victor van den Elzen2010-03-101-1/+1
| |
* | NASM 2.09rc4nasm-2.09rc4H. Peter Anvin2010-07-151-1/+1
| |
* | Make -Ox the defaultpreproc-paste-fixH. Peter Anvin2010-07-153-6/+19
| | | | | | | | | | | | | | | | Make -Ox the default; it's the optimization level expected by most users, and it is clearly still causing confusion that it has to be specified manually. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* | Documentation: describe %ifenv and friendsBryant Keller2010-07-132-0/+11
| | | | | | | | | | Signed-off-by: Bryant Keller <bkeller@assembly.ath.cx> Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
* | preproc: add %ifenvH. Peter Anvin2010-07-132-1/+23
| | | | | | | | | | | | | | Add %ifenv to test for the presence of an environment variable. The environment variable can, but does not have to be, prefixed with %!. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* | BR3028880: Revert to nonfatal, better error message, cleanupH. Peter Anvin2010-07-131-4/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Revert to issuing a nonfatal error (it makes no sense to make it a fatal error, but it probably makes sense for it to be an error instead of a warning, especially since a lot of prior versions would crash and apparently noone noticed.) We might have to revisit this based on user requirements, and/or provide a method for the user to detect an existing environment variable (%ifenv?). Issue a better error message, indicating the nature of the failure. Simplify the code by just updating the string in "p". Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* | Update changes.srcCyrill Gorcunov2010-07-131-0/+2
| | | | | | | | Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
* | BR3028880: Make nonexistent environment variable being fatal errorCyrill Gorcunov2010-07-131-5/+3
| | | | | | | | | | | | | | | | Frank suggested to just print out an error if environment variable is not there. Agreed. Suggested-by: Frank Kotler <fbkotler@zytor.com> Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
* | Check in test for BR3028880Cyrill Gorcunov2010-07-131-0/+6
| | | | | | | | Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
* | BR3028880: Fix NULL dereference on nonexistent environment variableCyrill Gorcunov2010-07-131-4/+7
| | | | | | | | | | | | | | | | | | Frank reported we hit NULL dereference on nonexistent environment variables. Fix it by leaving empty string in text field of such token and yielding warning. Reported-by: Frank Kotler <fbkotler@zytor.com> Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
* | tokenize: Fix wrong string index in indirect stringsCyrill Gorcunov2010-07-131-1/+1
| | | | | | | | | | | | | | | | At moment of calling the nasm_skip_string the string pointer is already incremented which makes tokenize fail on correct indirect strings. Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
* | preproc: Extract reading line from predefined macros from read_lineCyrill Gorcunov2010-07-131-60/+83
| | | | | | | | | | | | It makes read_line less complex Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
* | Documentation updatesCyrill Gorcunov2010-07-132-11/+16
| | | | | | | | | | | | Various small fixes. Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
* | No need for \n at __OUTPUT_FORMAT__ macro endCyrill Gorcunov2010-07-131-1/+1
| | | | | | | | Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
* | Merge branches 'master' and 'preproc-paste-fix'Cyrill Gorcunov2010-07-133-18/+16
|\ \
| * | BR3026808: Assign to local preprocessor variable does not work in 2.09Cyrill Gorcunov2010-07-131-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The commits 20a94ad7fe41c82f77fb670abb68f0de40d2b3e5 29c96651de1c43e59b7db58a4f06ff21dc854125 13dbfad76b4d3dbf27ef41761873584c6bd9fd7f 6f5f7ef417c37c154d10c2b3813808ad3fa65fd7 ddd08c3cccb4b68ecdb24d7a92eab6b2b82e8c68 seems to do the tricks we need. Eventually get rid of commented "case". Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
| * | NASM 2.09rc3nasm-2.09rc3H. Peter Anvin2010-07-091-1/+1
| | |
| * | preproc.c: Fix NULL deref on token pastingCyrill Gorcunov2010-07-101-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In case if there is a whitespace before 'paste' token we may reach NULL dereference in strlen since paste_head will point to TOK_WHITESPACE. Fix it. [test: paste.asm] Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
| * | preproc: add another test caseCyrill Gorcunov2010-07-091-0/+12
| | | | | | | | | | | | | | | | | | Add another test case for preprocessor token pasting. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
| * | preproc: don't paste TOK_PREPROC_IDH. Peter Anvin2010-07-081-1/+1
| | | | | | | | | | | | | | | | | | | | | Trying to deal with bug reports 3005117 and 3026808: don't paste after TOK_PREPROC_ID. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
| * | Revert "BR3005117: Expland local single macro before pasting tokens"H. Peter Anvin2010-07-081-26/+0
| | | | | | | | | | | | | | | | | | | | | | | | This reverts commit ec88c1beac003bd6660037da3cef3aebeee7af20. Revert due to BR 3026808. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
| * | Revert "expand_mmac_params: Don't forget to handle TOK_OTHER"H. Peter Anvin2010-07-081-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 51fd86e0fed8f5162f8c1e45e4ceaf237d6e5539. Revert due to BR 3026808. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
| * | Revert "expand_mmac_params: Expand local single macros unconditionally"H. Peter Anvin2010-07-081-1/+6
| | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 1f6741fc78413236816c42d26b34134ab18ba4f1. Revert due to BR 3026808. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
| * | Revert "expand_mmac_params: Expand local single macros unconditionally"H. Peter Anvin2010-07-081-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 985d880c15a5b26e59cdcec4af2eba0748ecfe1f. Revert due to BR 3026808. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* | | nasmdoc: remove obsolete Sourceforge referencesH. Peter Anvin2010-07-091-3/+3
|/ / | | | | | | | | | | Remove obsolete Sourceforge references, replace with nasm.us. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* | Check in test case from bug report br3005117H. Peter Anvin2010-07-081-0/+24
| | | | | | | | Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* | br3026808: add test caseH. Peter Anvin2010-07-081-0/+18
| | | | | | | | | | | | Add test case for BR 3026808 (%assign %$local). Signed-off-by: H. Peter Anvin <hpa@zytor.com>