summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* insns: Fixup MOV[APS|UPS] for xmmrm casesinsnsCyrill Gorcunov2010-11-231-2/+2
| | | | | | | | | | | | | | | | | | | In fact it was written as MOVAPS xmmreg,xmmreg \360\2\x0F\x28\110 KATMAI,SSE MOVAPS xmmreg,xmmreg \360\2\x0F\x29\101 KATMAI,SSE in first place MOVUPS xmmreg,xmmreg \360\2\x0F\x10\110 KATMAI,SSE MOVUPS xmmreg,xmmreg \360\2\x0F\x11\101 KATMAI,SSE and for example x28 stands for xmmrm128,xmmreg and x1 for xmmrm128,xmmreg. TODO: Inspect and fix WILLAMETTE instructions. Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
* insns: Implement size bits on KATMAICyrill Gorcunov2010-11-231-69/+63
| | | | | | Perhaps not all of them are coevered yet, but mostly. Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
* insns.pl: Clear tabs/space messCyrill Gorcunov2010-11-231-520/+520
| | | | Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
* make: Lift up openwcom.mak for build on FreeDOSAnthony Williams2010-11-231-2/+2
| | | | | Signed-off-by: Anthony Williams <rugxulo@gmail.com> Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
* NASM 2.09.04nasm-2.09.04Cyrill Gorcunov2010-11-211-1/+1
| | | | | | | | | | | | Some important fixes: - Fix incorrect labels offset for VEX intructions - Eliminate bogus warning on implicit operand size override. - %if term could not handle 64 bit numbers. - The COFF backend was limiting relocations number to 16 bits even if in real there were a way more relocations. Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
* Changes for 2.09.04Cyrill Gorcunov2010-11-211-0/+12
| | | | Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
* BR3104852: only warn once for repeated prefixesVictor van den Elzen2010-11-211-1/+1
|
* BR3058845: mostly fix bogus warning with implicit operand size overrideVictor van den Elzen2010-11-212-6/+30
| | | | | | | | The implicit operand size override code didn't set the operand size prefix, which confused the size calculation code for the range check. The BITS 64 operand size calculation is still off, but "fixing" it by making it 32-bit unless REX.W is set breaks PUSH and maybe others.
* misc: Enhance tag-releaseCyrill Gorcunov2010-11-211-14/+34
| | | | | | It remains backward compatible Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
* eval: rexp3 should operate with 64bit numbersCyrill Gorcunov2010-11-201-1/+1
| | | | | | | | | | | reloc_value returns 64bit numbers but we strip it down to 'int' which causes problems if the former value is big enough to overflow 'int'. Fix it. [ BR3104312 ] Reported-by: Christian Masloch Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
* Fix autoconf 2.68 warning.Victor van den Elzen2010-11-201-3/+2
| | | | | The first argument of AC_COMPILE_IFELSE needs to be wrapped with AC_LANG_SOURCE.
* coff: Handle massive relocationsCyrill Gorcunov2010-11-202-3/+44
| | | | | | | | | | | | | | The backport of 4db724fdd76e3a6cd0f5124ef86de976c495d666 359b63f8976375f071edc33092daea57efa768fb 01102ee8e6a967830bcd6f0134efe8976f473121 2672af737954fb17ec0ebf17e787219a504c4400 so coff output target to be able to handle massive relocations. Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
* BR 3109604: Fix C4 vs C5 VEX form selection in calcsize()H. Peter Anvin2010-11-162-1/+10
| | | | | | calcsize() had the wrong criterion for when C5 prefixes are permitted (REX.R is permitted, REX.X is forbidden.) assemble() had the right test already. This caused symbol value errors.
* 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>
* 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>