summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
...
* | 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>
* | parser.c: Drop space line and use hex notationCyrill Gorcunov2010-08-271-3/+2
| | | | | | | | | | | | | | For big numbers it's easier to estimate bytes count if they are written in hex notation. Let it be so. Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
* | BR 3052618: handle segment register operations in 64-bit modeH. Peter Anvin2010-08-242-4/+75
| | | | | | | | | | | | | | Handle segment register operations in 64-bit mode, and add a few optimization patterns. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* | doc: untabifyH. Peter Anvin2010-08-241-3/+3
| | | | | | | | | | | | Fix tab-related problems Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* | doc: override optimization with STRICTH. Peter Anvin2010-08-241-0/+2
| | | | | | | | Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* | doc: document imm64 optimizationH. Peter Anvin2010-08-241-0/+9
| | | | | | | | Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* | Optimize mov r64,immH. Peter Anvin2010-08-246-10/+70
| | | | | | | | | | | | | | Handle immediate-size optimization for "mov r64,imm" -- reduce it to "mov r32,imm32" or "mov r64,imm32" as appropriate. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* | assemble: add an OPT instruction flags for optimizing assembly onlyH. Peter Anvin2010-08-242-1/+8
|/ | | | | | Add an OPT flag to only use a pattern for optimizing assembly only. Signed-off-by: H. Peter Anvin <hpa@linux.intel.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>
* BR3041451: Implement upper bound for %rep counterCyrill Gorcunov2010-08-093-1/+15
| | | | | | | | | | Since %rep counter is a 64 bit signed integer we have to use some "maximum possible value" limit (upper bound) otherwise there may be a situation when %rep counter is 0 or even negative while user has been passing big positive integer value. Reported-by: nasm64developer Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
* preproc.c: added deprecation warning for context-local label fallthroughKeith Kanios2010-08-091-1/+7
|
* NASM 2.09rc6nasm-2.09rc6Cyrill Gorcunov2010-08-061-1/+1
| | | | | | | | It likely to be the last -rc before final relase. Give it a good testing. We should be in pretty good shape. Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
* test: Add automatizing annotations to imm64.asmCyrill Gorcunov2010-08-041-0/+4
| | | | | | | | | | | | H. Peter Anvin pointed | | Btw, test/imm64.asm needs test engine annotations. | Make it so. Reported-by: "H. Peter Anvin" <hpa@zytor.com> Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
* insns.dat: unbreak test/imm64.binH. Peter Anvin2010-08-021-1/+1
| | | | | | | | Unbreak the following subtest in test/imm64.bin: mov qword [rax],dword 11223344h Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* elf: Move stabs symbol table format into outelf.hCyrill Gorcunov2010-07-303-16/+9
| | | | | | Get rid of code duplication Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
* nasmlib.c: fix typo in nasm_init_malloc_errorCyrill Gorcunov2010-07-291-1/+1
| | | | | | | | Typo happened in 9b603082 so -DLOGALLOC gets broken. Not that important since this is a developer oriented feature but should be fixed anyway. Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
* 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>