summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* 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>
* insns: add FXSAVE64/FXRSTOR64, drop np prefixH. Peter Anvin2010-07-071-7/+9
| | | | | | | | Add FXSAVE64 and FXRSTOR64; drop the np prefix on 0F AE instructions: none of the rest of the 0F AE instructions have them, and there are no conflicts. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* Merge branch 'master' of ssh://repo.or.cz/srv/git/nasmH. Peter Anvin2010-07-071-14/+26
|\
| * insns.dat: add XSAVE/XRSTOR64, XSAVEOPT, VCVTPH2PS/VCVTPS2PHH. Peter Anvin2010-07-071-14/+26
| | | | | | | | | | | | | | Add XSAVE64/XRSTOR64 (previously missing), XSAVEOPT/XSAVEOPT64 (per AVX 007 spec), and VCVTPH2PS/VCVTPS2PH (per AVX 007) spec. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* | insns.dat: remove VCVTPH2PS/VCVTPS2PH as AMD instructionsH. Peter Anvin2010-07-061-10/+2
|/ | | | | | | Remove VCVTPH2PS/VCVTPS2PH as AMD instructions based on version 3.04 of the AMD spec. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* NASM 2.09rc2nasm-2.09rc2H. Peter Anvin2010-07-061-1/+1
|
* doc: Update changes.srcCyrill Gorcunov2010-07-071-0/+34
| | | | | | Before soon-coming 2.09rc2. Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
* insns.dat: fix CPU flags for new instructionsH. Peter Anvin2010-07-061-9/+9
| | | | | | | | FUTURE is a CPU level flag, and cannot be combined with X64 (which is shorthand for X86_64,LONG). Also, make sure we add LONG annotations to everything that is 64-bit mode only. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* Add RD*SBASE, WR*SBASE, RDRAND from AVX v7H. Peter Anvin2010-07-062-0/+35
| | | | | | | Add the RD*SBASE, WR*SBASE and RDRAND instructions from version 7 of the AVX specification, Intel document 319433-007. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* outbin: Cleanup bin_cleanupCyrill Gorcunov2010-07-061-5/+7
| | | | | | No need for 'q' variable. Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
* outbin: Simplify reverse address computingCyrill Gorcunov2010-07-061-2/+2
| | | | Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
* BR3025702: outbin -- Fix byte orderingCyrill Gorcunov2010-07-061-2/+2
| | | | | | | In commit 55ae12052cd1 we occasionally broke byte ordering. Fix it. Note that current stable version 2.08.01 is not affected by this bug. Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
* doc: inslist.src is an intermediate file, move to "make clean"H. Peter Anvin2010-06-251-1/+2
| | | | | | | inslist.src is an intermediate file, it should be in "make clean" rather than "make spotless"; otherwise it ends up in the xdoc tarball. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* BR 3020760: insns.dat -- confirm push imm32 on x86-64 explicitlyCyrill Gorcunov2010-06-251-0/+1
| | | | | | | | | | | | | | | | PUSH imm64 confuses ones who is trying to find this instruction in processor programming manuals. Actually it was introduced in a sake of "push `size' imm" consistency. In other words -- to allow users to state "PUSH qword imm32" in 64bit code, though on byte level (ie generated) code it still has a correct and valid sign-extended "PUSH imm32" instruction. To get rid of this ambiguie bite we make explicit "PUSH imm32" being valid in 64bit code. This also makes "PUSH dword imm32" valid in 64bit code as well. Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
* preproc.c: Get rid of signed/unsigned comparison warningCyrill Gorcunov2010-06-201-2/+2
| | | | | | | | | We need mac->nparam being explicictly int'fied otherwise compiler issue a warning. Note that we might have been using unsigned int but it would break an ability to pass negative indices. Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
* BR 3018233: handle LFS, LGS and LSS with a 64-bit registerH. Peter Anvin2010-06-181-1/+4
| | | | | | | LFS, LGS and LSS are valid in 64-bit mode and have 64-bit (REX.W) forms. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* openwcom.mak: drop /f from delete commandsH. Peter Anvin2010-06-151-30/+30
| | | | | | Classic DOS doesn't have del /f, and we don't really need it. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* Rename filenames to 8.3 formatH. Peter Anvin2010-06-1511-324/+316
| | | | | | | Apparently some people still care about compiling native on MS-DOS, and we don't have a significant number of files which need adjustment. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* expand_mmac_params: Expand local single macros unconditionallyCyrill Gorcunov2010-06-081-8/+1
| | | | | | | | Peter proposed to expand local single macros unconditionally. This should not hurt but give us more cleaner code in result. Reported-by: "H. Peter Anvin" <hpa@zytor.com> Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
* expand_mmac_params: Expand local single macros unconditionallyCyrill Gorcunov2010-06-081-6/+1
| | | | | | | | Peter proposed to expand local single macros unconditionally. This should not hurt but give us more cleaner code in result. Reported-by: "H. Peter Anvin" <hpa@zytor.com> Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
* outobj: handle compilers without 64-bit switch() supportH. Peter Anvin2010-06-071-1/+5
| | | | | | | OpenWatcom, in particular, doesn't handle switch() statements with 64-bit expressions, sigh. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* outelf32: handle compilers without 64-bit switch() supportH. Peter Anvin2010-06-071-14/+22
| | | | | | | OpenWatcom, in particular, doesn't handle switch() statements with 64-bit expressions, sigh. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* NASM 2.09rc1nasm-2.09rc1Cyrill Gorcunov2010-06-061-1/+1
|
* nasmdoc: Document macro parameters rangeCyrill Gorcunov2010-06-051-1/+43
| | | | Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
* expand_mmac_params_range: Simplify conditionCyrill Gorcunov2010-06-051-4/+2
| | | | Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
* preproc.c: Fix argument indices checking in parameters rangeCyrill Gorcunov2010-06-051-2/+4
| | | | | | Otherwise %{-1:-1} fails. Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>