summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
* 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>
* doc: fix spelling of "compatibility"H. Peter Anvin2010-10-061-1/+1
| | | | Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* 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>
* 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>
* 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>
* 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>
* doc: document the %use fp macro packagenasm-2.09H. Peter Anvin2010-08-242-0/+26
| | | | | | Documentation for %use fp was missing... Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* NASM 2.09H. Peter Anvin2010-08-241-1/+1
|
* insns.pl: make insnsd.c a bit easier to readH. Peter Anvin2010-08-191-11/+8
| | | | | | | Formatting changes (no object code difference) to insnsd.c for readability. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* ndisasm: handle VEX.LIGH. Peter Anvin2010-08-193-8/+8
| | | | | | | | A lot of instructions ignore the L bit in the VEX prefix, just like a lot of instructions ignore the W bit, so don't use them in the sub-table select. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* ndisasm: unify VEX handlingH. Peter Anvin2010-08-191-34/+6
| | | | | | Unify VEX handling between the 026x and 0270 bytecodes. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* ndisasm: fix handing of byte codes 250-253, 324H. Peter Anvin2010-08-161-2/+12
| | | | | | | Fix handling of byte codes 250-253 (sign-extended 32-bit immediate, extended to 64 bits) and 324 (instruction must have osize 64). Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* NASM 2.09rc7nasm-2.09rc7H. Peter Anvin2010-08-161-1/+1
|
* test/avx: remove deleted instructionsH. Peter Anvin2010-08-161-7/+0
| | | | | | Remove the deleted VPERMIL2 instructions. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* insns.dat: permit contracted forms for VBLENDVPH. Peter Anvin2010-08-161-4/+4
| | | | | | | Allow implicit operands for VBLENDVP, just as for other instructions, since the semi-legacy forms now are removed. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* assmemble.c: fix VEX.W logicH. Peter Anvin2010-08-161-2/+2
| | | | | | | Fix the generation logic for VEX.W, which unfortunately got the wrong constants. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* insns.dat: fix encoding of VCVTSD2SSH. Peter Anvin2010-08-161-1/+1
| | | | | | Fix typo in the definition of VCVTSD2SS. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* insns.dat: SSE encoding of VBLEND with VEX prefix is forbiddenH. Peter Anvin2010-08-161-4/+0
| | | | | | | | Version 7 of the AVX spec specifically forbids (#UD) using the 66 0F 38 14/15 forms of the BLENDV instructions with a VEX prefix; those encodings are strictly legacy SSE 4.1. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* insns.dat: updates from AVX v7H. Peter Anvin2010-08-161-184/+235
| | | | | | | | | | Updates from the AVX version 7 specification: mostly tightening of the rules for VEX.L and VEX.W, but remove the VPERMIL2 instructions. Also encode all the full-length forms of the VCMP instructions and prefer those for the disassembly. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* assemble: handle vex.ligH. Peter Anvin2010-08-163-11/+19
| | | | | | | AVX version 7 introduces the concept of .lig, meaning VEX.L is ignored. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* vex: change .wx to .wig to match the latest AVX specH. Peter Anvin2010-08-162-5/+5
| | | | | | | | Change the .wx (ignore the W field) to .wig, to match the latest version of the AVX specification. This is not a functional change, but just makes instruction patterns a little easier to write. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* doc: Update -O option descriptionCyrill Gorcunov2010-08-161-4/+0
| | | | | | | | We use -Ox by default since Nasm-2.09 so "-O0" is not longer "default" option. But first paragraph still has the reference which confuses people. Get rid of it. Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
* doc: Fix typo in changes.srcCyrill Gorcunov2010-08-161-1/+1
| | | | | Reported-by: Frank Kotler <fbkotler@zytor.com> Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
* preproc.c: revamped context-local fall-through warning messageKeith Kanios2010-08-141-5/+6
|
* doc/nasmdoc.src: revamped context fall-through entryKeith Kanios2010-08-141-10/+26
|
* doc: Describe context-through lookupCyrill Gorcunov2010-08-131-0/+38
| | | | | | | | | | Feel free to update this text as well, and check it please for being more/less readable. CC: Keith Kanios <keith@kanios.net> CC: "H. Peter Anvin" <hpa@zytor.com> Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
* LICENSE: update yearH. Peter Anvin2010-08-121-1/+1
| | | | Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* sectalign: Implement on/off modeCyrill Gorcunov2010-08-122-10/+30
| | | | | | | | And describe it in documentation. We've introduced sectalign in 2.09rc series and have to provide an ability to steer this feature. Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
* standart.mac: Style nitfixCyrill Gorcunov2010-08-121-75/+84
| | | | Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
* preproc.c: Context-through single macros expansion is deprecatedCyrill Gorcunov2010-08-111-10/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | For now we inform users about their sources need to be updated and also since _all_ context case are legit for single macros only we split lookup into two phases: 1) Lookup in active context, which is perfectly valid 2) Lookup in external contexts, which will be deprecated soon. If (2) happens we yield warning. A typical testcase is --- %macro one 0 %push %$a: %assign %$b 12 %push mov eax, %$a mov eax, %$b ; hit -- context through %pop %pop %endmacro one --- Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
* preproc.c: modified deprecation warning for context-local label fallthroughKeith Kanios2010-08-101-8/+9
|
* preproc.c: Fix error message typoCyrill Gorcunov2010-08-091-1/+1
| | | | Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
* test: Add br3041451 testcaseCyrill Gorcunov2010-08-091-0/+59
| | | | Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>