summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* NASM 2.04rc1nasm-2.04rc1H. Peter Anvin2008-09-031-1/+1
|
* Remove obsolete tagrelease script (duplicate of tag-release)H. Peter Anvin2008-09-031-15/+0
|
* Update doc/changes.srcH. Peter Anvin2008-09-031-2/+10
|
* Document %use smartalignH. Peter Anvin2008-09-031-0/+45
|
* Document %unmacroH. Peter Anvin2008-09-031-2/+26
|
* outcoff: stylistic cleanupsH. Peter Anvin2008-09-021-11/+13
| | | | | | | | Don't use explicit L's for things which are really size_t; not only is it unnecessarily ugly, but it's wrong in a lot of ways. Do some other minor stylistic cleanups. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* outcoff: default output symbols to T_NULLH. Peter Anvin2008-09-021-0/+1
| | | | | | | | We would leave the output symbol type uninitialized. Explicitly initialize it to zero (T_NULL, meaning no symbol type information), since that's what was effectively done. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* BR 2048950: fix crash due to mmacro list overflowH. Peter Anvin2008-09-011-1/+2
| | | | | | | When allocating the buffer for an mmacro list, we apparently failed to guarantee space for the terminating NULL. This almost certainly caused the crash described in BR 2048950, and quite possibly BR 1284169.
* test/new: clean up whitespaceH. Peter Anvin2008-08-291-1/+0
|
* Script to create new test case boilerplateH. Peter Anvin2008-08-291-0/+10
|
* Accept implicit memory size for VMREAD/VMWRITEH. Peter Anvin2008-08-282-4/+8
|
* BR 2029472: Wrong operand size for VMREAD/VMWRITE in 64-bit modeH. Peter Anvin2008-08-282-2/+26
| | | | Fix the operand size for VMREAD/VMWRITE in 64-bit mode
* .gitignore: ignore some editor backup filesH. Peter Anvin2008-08-281-0/+3
| | | | Ignore a couple of variants of editor backup files.
* BR 2028995: Missing MOVNTI m64, r64H. Peter Anvin2008-08-282-1/+12
| | | | Fix MOVNTI with a 64-bit argument.
* Testcase for XCRYPTH. Peter Anvin2008-08-281-0/+24
|
* BR 2029829: Accept VIA XCRYPT instructions with or without REPH. Peter Anvin2008-08-283-8/+28
| | | | | | | Accept the VIA XCRYPT instructions either with or without a REP prefix, as documented. Add the missing XCRYPTCTR instruction.
* BR 2039212: Handle indirect far jumps in 64-bit modeH. Peter Anvin2008-08-282-2/+16
| | | | | Handle indirect far jumps in 64-bit mode. Default to 64 bit unless overridden, for consistency with other jumps.
* Include "nasm.h" in "float.h"H. Peter Anvin2008-08-281-0/+2
| | | | | | "float.h" references efunc, so it needs "nasm.h". It also has uint8_t and so need <inttypes.h>, but that's part of "nasm.h".
* Add 256-bit AVX stores per the latest AVX spec.H. Peter Anvin2008-08-271-2/+7
| | | | Add 256-bit forms of VMOVNTPD, VMOVNTPS, and VMOVNT[DQ]Q.
* Add AVX forms of the AES instructions (new in the latest AVX spec)H. Peter Anvin2008-08-271-0/+12
| | | | The AES instructions, too, have gotten VEX forms.
* test: Fix file with no final newlineH. Peter Anvin2008-08-241-1/+1
| | | | | | Fix test/br2030823.asm, which had no final newline. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* BR 2067820: add the MOVSXD instructionH. Peter Anvin2008-08-241-1/+2
| | | | | | | | The official mnemonic for 32-to-64-bit sign extension is MOVSXD for some idiotic reason. Add support for it while continue to recognize MOVSX for this as an alias. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* BR 2067837: remove double add of VEX instruction lengthH. Peter Anvin2008-08-241-2/+0
| | | | | | | We added the length of VEX prefixes twice in calcsize(); this resulted in the wrong symbol addresses when compiling without the optimizer. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* BR 2062342: ndisasm: r12 *can* be an index registerH. Peter Anvin2008-08-201-2/+2
| | | | | | | R12 can be used as an index register. Special encodings in the modr/m byte are done *without* consideration for the REX prefix, but special encodings in the SIB byte *do* take the REX prefix into consideration, since it doesn't affect the overall instruction format.
* BR 2030823: Problem with the 256-bit FMA instructionsH. Peter Anvin2008-08-132-16/+21
| | | | Fix the 256-bit FMA instructions per bug report.
* BR 2043111: Typo in insns.dat: VCMPFT_OQPD VCMPFT_OQPSH. Peter Anvin2008-08-131-2/+2
| | | | Fix typo
* minor bugfix in performtest.plVictor van den Elzen2008-08-061-1/+1
|
* Add macro-defaults warning class and documentation.Victor van den Elzen2008-08-065-32/+131
|
* BR 2034542: fix crash when touching __FILE__H. Peter Anvin2008-07-312-1/+6
| | | | | Touching __FILE__ would cause a dereference of an uninitialized pointer. Fix.
* BR 2028910: fix decoding of VEX prefixes in 16- and 32-bit modeH. Peter Anvin2008-07-301-16/+17
| | | | | | We would incorrectly set a bunch of VEX-related state for C4 and C5 bytes, even though we had already rejected it as not a VEX prefix due to the top two bits of the following byte not being 11.
* BR 2025977: Handle SLDT with a 64-bit register operandH. Peter Anvin2008-07-301-0/+2
| | | | | | Handle SLDT with a 64-bit register operand. Don't generate a REX.W prefix in the assembler, since zero-extending is just fine, but do support it in the disassembler.
* preproc: restore correct break; in do_directive()H. Peter Anvin2008-07-231-10/+10
| | | | | | Checkin a26433db6805cf1f1d711eb820f6a50a98f54f36 incorrectly changed a few break;s in do_directive() that were *inside loops* to returns. This broke single-line macros as well as %exitrep; fix.
* BR 560960: warn about trailing garbage in %macro/%ifmacroVictor van den Elzen2008-07-231-1/+9
|
* Improve checking and documentation for %ifctxVictor van den Elzen2008-07-233-10/+12
|
* BR 2023036: MOV reg32,dreg and vice versa are NOLONGH. Peter Anvin2008-07-201-2/+2
| | | | | MOV reg32,dreg and MOV dreg,reg32 are NOLONG; in 64-bit mode we always move to/from reg64.
* Err, "alignr" was really the same as the previous "alignb"H. Peter Anvin2008-07-201-4/+1
| | | | | Replace "alignb" with the (slightly more optimized) "alignr" macro, but keep the name "alignb".
* Add "alignr" standard macro (using resb)H. Peter Anvin2008-07-201-0/+7
| | | | | Add an "alignr" standard macro, for use in BSS (nobits) and absolute segments.
* Avoid redundant "const" for macros_tH. Peter Anvin2008-07-193-6/+6
| | | | | | Don't use a redundant "const" for macros_t (which is const unsigned char), since OpenWatcom doesn't like it, and I believe it is incorrect per the C standard.
* BR 2003451: add test caseH. Peter Anvin2008-07-191-0/+15
| | | | Add test case for BR 2003451: forwardness leakage between operands.
* BR 2003451: avoid "forwardness" leaks between operandsH. Peter Anvin2008-07-192-27/+28
| | | | | | | Any use of ins->forw_ref that isn't related to control of the optimizer is fundamentally broken. Use operand->opflags & OPERAND_FORWARD instead. This even has the nice side benefit of simplifying the code.
* BR 2010180: outobj: Garbage may be written in a last PUBDEFSlavik Gnatenko2008-07-192-2/+168
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The testcase illustrates the problem. After "nasm -f obj alonesym.nasm" let's look to dump: ====== PUBDEF386(91) recnum:5, offset:0000005bh, len:03f9h, chksum:bbh(bb) Group: 0, Seg: 1 00020000h - 'sym0000' Type:0 00020004h - 'sym0001' Type:0 .... 00020134h - 'sym0077' Type:0 PUBDEF(90) recnum:6, offset:00000457h, len:000ah, chksum:b6h(b6) Group: 0, Seg: 1 00000138h - 's' Type:2 0000b600h - '' Type:0 ====== The problem is while 's' offset is 20138h it is marked as type 90h not 91h. The root cause is located in obj_x(): static ObjRecord *obj_x(ObjRecord * orp, uint32_t val) { if (orp->type & 1) orp->x_size = 32; if (val > 0xFFFF) orp = obj_force(orp, 32); if (orp->x_size == 32) return (obj_dword(orp, val)); orp->x_size = 16; return (obj_word(orp, val)); } It sets up x_size and than writes data. In the testcase data are the offset and this offset overflows a record. In this case the record is emitted and its x_size is cleared. Because this is last PUBDEF the new record with only 's' symbol is emitted also but its x_size is not 32 (it's still zero) so obj_fwrite doesn't switch to 91h type. The problem seems to be very generic and expected to be occurred on many other record types as well. ---- And the fix is simple: if (orp->x_size == 32) { ObjRecord * nxt = obj_dword(orp, val); nxt->x_size = 32; /* x_size is cleared when a record overflows */ return nxt; }
* test: more smart alignment testH. Peter Anvin2008-07-171-0/+11
|
* smartalign: use context-local labelH. Peter Anvin2008-07-171-2/+2
| | | | Use a context-local label in the smart align macro.
* smartalign: adjust the alignment thresholdH. Peter Anvin2008-07-171-2/+11
| | | | | | | | | Apparently the current recommendation is for a smaller threshold when using the "generic"-style alignment macros (short jumps are cheaper on newer CPUs.) Also change the alignment threshold definition to reflect the maximum number of padding instead of when to start using jumps.
* smartalign: 16-bit generic alignment macrosH. Peter Anvin2008-07-171-12/+11
| | | | Smart alignment content for 16-bit "generic" mode
* smartalign: 16-bit P6 NOPsH. Peter Anvin2008-07-171-6/+6
| | | | Add 16-bit P6 NOPs
* smartalign.mac: smart alignments macro packageH. Peter Anvin2008-07-162-0/+278
| | | | | "%use smartalign" followed by an optional "alignmode" can be used to enable smart macros.
* preproc: add %un[i]macro, add cleanupsH. Peter Anvin2008-07-162-80/+125
| | | | | | | | | Add %un[i]macro, and a few stylistic cleanups. Note: unlike %undef, %un[i]macro takes an argument specification, which must *exactly* match the macro being undefined. Similarly, %unimacro has to be used to undefine a macro defined with %imacro, and vice versa.
* standard.mac: allow non-power-of-2 alignmentsH. Peter Anvin2008-07-161-2/+2
| | | | | Allow aligning to a non-power-of-2 boundary. It's probably useless, but doesn't really hurt.
* preproc.c: fix %ifn, %elifnH. Peter Anvin2008-07-161-1/+1
| | | | | The sense of %ifn and %elifn was reversed due to a bogus nonstandard return sequence.