summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* make: Lift up openwcom.mak for build on FreeDOSowcAnthony Williams2010-10-301-2/+2
| | | | | Signed-off-by: Anthony Williams <rugxulo@gmail.com> Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
* make: Add "test" target into .PHONYCyrill Gorcunov2010-10-291-1/+1
| | | | | | | | | | | | Michael proposed to run | sed -i -e '/^.PHONY: all/s/$/ test/' Makefile.in since we have test/ directory. Good idea. Reported-by: Michael Sterrett Patch-by: Michael Sterrett Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
* Merge branch 'nasm-2.09.xx'Cyrill Gorcunov2010-10-271-0/+15
|\ | | | | | | | | | | | | Conflicts: version Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
| * NASM 2.09.03nasm-2.09.03Cyrill Gorcunov2010-10-271-1/+1
| | | | | | | | Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
| * doc: Update changes for 2.09.03Cyrill Gorcunov2010-10-271-0/+15
| | | | | | | | Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
| * preproc.c: Restore concat rules on context local variablesCyrill Gorcunov2010-10-271-89/+95
| | | | | | | | | | | | | | | | | | This is a backport of commits 8dcbbd7af0d6d07b455de0b6460dca6db6113553 575d4289c9b1fb47774cb79764a24899a69a8d52 Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
| * preproc: Issue warning on unterminated %{ constructCyrill Gorcunov2010-10-271-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As being pointed by "matching braces" topic on [ http://forum.nasm.us/index.php?topic=905.0 ] we don't issue warning on missed match for "{" brace opened. Strictly speaking we should issue error instead and force user to fix asm source code but since it's here for a long time already -- lets be "admissive". Reported-by: Klod CC: Frank Kotler <fbkotler@zytor.com> Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
| * BR3079777: Explain %00 in documentationFrank Kotler2010-10-271-0/+7
| | | | | | | | | | Signed-off-by: Frank Kotler <fbkotler@zytor.com> Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
| * BR3079550: NASM crash on run-time for OMF output formatCyrill Gorcunov2010-10-272-4/+4
| | | | | | | | | | | | | | | | | | We could have accessed malloc'ed data on external symbols in obj and ieee output formats. Fix it by using nasm_zalloc. Reported-by: Jiri Malak Patch-by: Jiri Malak Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
| * BR3074517: Print %macro name inside %rep blocksCyrill Gorcunov2010-10-271-3/+13
| | | | | | | | | | | | | | | | If we're to print inside %rep block we should find out which %macro it belongs. Reported-by: Rob Neff Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
* | preproc: Issue warning on unterminated %{ constructCyrill Gorcunov2010-10-071-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As being pointed by "matching braces" topic on [ http://forum.nasm.us/index.php?topic=905.0 ] we don't issue warning on missed match for "{" brace opened. Strictly speaking we should issue error instead and force user to fix asm source code but since it's here for a long time already -- lets be "admissive". Reported-by: Klod CC: Frank Kotler <fbkotler@zytor.com> Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
* | Merge branch 'nasm-2.09.xx'H. Peter Anvin2010-10-061-1/+1
|\ \ | |/
| * doc: fix spelling of "compatibility"H. Peter Anvin2010-10-061-1/+1
| | | | | | | | Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* | preproc.c: Support multiple matches in paste_tokensCyrill Gorcunov2010-10-071-48/+69
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In mmacro params head TOK_NUM should be concat'ed with tail TOK_NUM only, otherwise the weird construction like %define id1 1 %define idid1 2 %define TOK_NUM 1 %define TOK_ID id %macro m 2 mov eax, 1%1id%2 ; this expands to 1idid1 ; where idid1 expands to 2 ; and then to 12 %endmacro m TOK_ID, TOK_NUM issue error. N.B. I've checked nasm-0.98.39 and it compiles this macro perfectly well, for the record. Reported-by: nasm64developer@users.sf.net Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
* | BR3079777: Explain %00 in documentationFrank Kotler2010-10-051-0/+7
| | | | | | | | | | Signed-off-by: Frank Kotler <fbkotler@zytor.com> Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
* | Add SubmittingPatches fileCyrill Gorcunov2010-10-031-0/+116
| | | | | | | | | | | | Adopted from Linux's Documentation/SubmittingPatches Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
* | BR3079550: NASM crash on run-time for OMF output formatCyrill Gorcunov2010-10-022-4/+4
| | | | | | | | | | | | | | | | | | We could have accessed malloc'ed data on external symbols in obj and ieee output formats. Fix it by using nasm_zalloc. Reported-by: Jiri Malak Patch-by: Jiri Malak Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
* | NASM 2.10rc1nasm-2.10rc1Cyrill Gorcunov2010-09-301-1/+1
| | | | | | | | Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
* | BR30730640: Restore preprocessor token concatenation rulesCyrill Gorcunov2010-09-301-88/+73
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | During nasm-2.06 development we broke the rules for concatenation of preprocessor tokens (d784a083a3f1). The former candidates for concatenation were (in terms of RE) expand_smacro [(TOK_ID|TOK_PREPROC_ID)][(TOK_ID|TOK_PREPROC_ID|TOK_NUMBER)] expand_mmac_params [(TOK_ID|TOK_NUMBER|TOK_FLOAT)][(TOK_ID|TOK_NUMBER|TOK_FLOAT|TOK_OTHER)] [ nb: review commits ec88c1beac00 , 20a94ad7fe41 and 984279b1dde9 if you going to change this one ] Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
* | More tests automationCyrill Gorcunov2010-09-3010-1/+25
| | | | | | | | | | | | Not all covered but still worth to put in Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
* | test: Add br3074517.asmCyrill Gorcunov2010-09-241-0/+12
| | | | | | | | Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
* | BR3074517: Print %macro name inside %rep blocksCyrill Gorcunov2010-09-241-3/+13
| | | | | | | | | | | | | | | | If we're to print inside %rep block we should find out which %macro it belongs. Reported-by: Rob Neff Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
* | phash: move sample function to the sample fileH. Peter Anvin2010-09-222-26/+26
| | | | | | | | | | | | | | read_input() shouldn't be part of the phash.ph module; instead it should go into the sample usage file phash.pl. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* | Merge branch 'nasm-2.09.xx'Cyrill Gorcunov2010-09-184-1/+103
|\ \ | |/
| * NASM 2.09.02nasm-2.09.02Cyrill Gorcunov2010-09-181-1/+1
| | | | | | | | Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
| * doc/changes.src: Describe changesCyrill Gorcunov2010-09-181-0/+4
| | | | | | | | Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
| * Add test-case for BR3066383Cyrill Gorcunov2010-09-181-0/+68
| | | | | | | | Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
| * BR3066383: Restore backward compatibility with token pastingCyrill Gorcunov2010-09-181-0/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It seems to be a bit long story for the reason if this bug. But lets be verbose and describe all byte-to-byte. And it is all about preprocessor code, in particular paste_tokens and expand_mmac_params. Initially the problem (not the same but similar) was noticed and fixed in commit ec88c1be. The problem reveals itself with code snippets like | %macro m 1 | %push | %define %$arg %1 | %%top_%$arg: | resb ($ - %%top_%$arg) | %pop | %endmacro So with commits ec88c1be, 51fd86e0, 1f6741fc, 985d880c we did expand local single macro before processing tokens pasting unconditionally. But then it being found that such approach breaks %assign directive. The snippets like below didn't work | %macro m 1 | %push | %assign %$arg %1 | %assign %$arg %1+%$arg | %pop | %endmacro So all these commits were reverted and we just stop pasting tokens in paste_tokens() after TOK_PREPROC_ID (commit 20a94ad7). Unfortunately this breaks %assign with compound preproc id | %macro m3 1 | %push | %assign %$_uses 0 | %rep 4 | %assign %$_ur%$_uses %$_uses | mov ecx, %$_ur%$_uses | %assign %$_uses %$_uses+1 | %endrep | %pop | %endmacro To fix this bug we have to combine two approaches at once, we should continue pasting after TOK_PREPROC_ID and expand sequential TOK_PREPROC_IDs except first one. Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
* | Merge branch 'nasm-2.09.xx'Cyrill Gorcunov2010-09-151-0/+6
|\ \ | |/
| * changes.src: Describe changes for 2.09.02Cyrill Gorcunov2010-09-151-0/+6
| | | | | | | | Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
| * BR3064376: ndisasm crashCyrill Gorcunov2010-09-151-1/+1
| | | | | | | | | | | | ndisasm may crash due to lack of check of VEX table index. Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
| * BR3064459: Missing %endif doesn't always cause errorCyrill Gorcunov2010-09-151-3/+5
| | | | | | | | | | | | | | | | error() routine is conditional dependent so we should use nasm_error instead to yield message unconditionally. Reported-by: Christian Masloch Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
| * doc/nasmdoc.src: Fix octal number prefix misprintCyrill Gorcunov2010-09-151-1/+1
| | | | | | | | | | Reported-by: Anthony <anthony@cloudnet.com> Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
* | Merge branch 'nasm-2.09.xx'H. Peter Anvin2010-09-152-1/+29
|\ \ | |/
| * changes: document fixed token reversal for %deftokH. Peter Anvin2010-09-151-0/+5
| | | | | | | | Signed-off-by: H. Peter Anvin <hpa@zytor.com>
| * preproc: reverse the order of the tokens in %deftokH. Peter Anvin2010-09-151-1/+24
| | | | | | | | | | | | | | Smacros are apparently stored with the token stream reversed, so make sure %deftok matches that sense of relatity. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* | preproc.c: Get rid of new TABs brought in recentlyCyrill Gorcunov2010-09-121-58/+57
| | | | | | | | Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
* | BR3064376: ndisasm crashCyrill Gorcunov2010-09-121-1/+1
| | | | | | | | | | | | ndisasm may crash due to lack of check of VEX table index. Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
* | BR3064459: Missing %endif doesn't always cause errorCyrill Gorcunov2010-09-121-3/+5
| | | | | | | | | | | | | | | | error() routine is conditional dependent so we should use nasm_error instead to yield message unconditionally. Reported-by: Christian Masloch Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
* | doc/nasmdoc.src: Fix octal number prefix misprintCyrill Gorcunov2010-09-101-1/+1
| | | | | | | | | | Reported-by: Anthony <anthony@cloudnet.com> Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
* | eval.c: Use OPFLAG_FORWARD instead of opencoded numberCyrill Gorcunov2010-09-101-1/+1
| | | | | | | | Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
* | Merge branches 'master' and 'nasm-2.09.xx'Cyrill Gorcunov2010-09-072-1/+8
|\ \ | |/
| * NASM 2.09.01nasm-2.09.01Cyrill Gorcunov2010-09-071-1/+1
| | | | | | | | | | | | | | A couple of NULL dereferences fixed. See NASM version history in documentation. Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
| * changes.src: Describe changes for 2.09.01Cyrill Gorcunov2010-09-071-0/+7
| | | | | | | | Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
| * preproc.c: Make %substr robustCyrill Gorcunov2010-09-071-4/+5
| | | | | | | | | | | | | | | | Make %substr robust to handle -1,-1 parameters and restore old behavior when number of characters in substring is greater then length of string itself. Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
| * Handle %substr invalid parameters preventing NULL dereferenceCyrill Gorcunov2010-09-071-9/+14
| | | | | | | | Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
| * nasm_quote: Use memcpy only if length providedCyrill Gorcunov2010-09-071-1/+2
| | | | | | | | | | | | No need to call memcpy on empty strings Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
| * Fix NULL dereferences on %substr missing operandsCyrill Gorcunov2010-09-071-2/+3
| | | | | | | | | | | | %substr with dangling id issues SIGSEV. Fix it. Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
| * BR3060469: Fix SIGSEV on missed %deftok second parameterCyrill Gorcunov2010-09-061-1/+1
| | | | | | | | | | | | | | | | In case if a second parameter of %deftok is missed we hit NULL dereference. Fix it. Reported-by: Christian Masloch Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
* | preproc.c: Make %substr robustCyrill Gorcunov2010-09-071-4/+5
| | | | | | | | | | | | | | | | Make %substr robust to handle -1,-1 parameters and restore old behavior when number of characters in substring is greater then length of string itself. Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>