summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* NASM 2.08rc3nasm-2.08rc3H. Peter Anvin2009-11-091-1/+1
|
* insns.dat: remove non-DREX SSE5 instructionsH. Peter Anvin2009-11-091-31/+0
| | | | | | | | | Even the non-DREX SSE5 instructions appear to have been either obsoleted or replaced with XOP varieties. The only exception are the ROUNDxx instructions, which are really SSE4.1 instructions and which were simply duplicates. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* changes.src: document removal of DREX instructionsH. Peter Anvin2009-11-091-1/+4
| | | | Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* SSE5: remove all DREX-based instructionsH. Peter Anvin2009-11-091-275/+1
| | | | | | | AMD has obsoleted the DREX-based SSE5 proposal, so remove all such instructions. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* outelf32/64 - various cleanups in a sake of unificationCyrill Gorcunov2009-11-062-164/+156
| | | | | | | Make a small step forward elf32/64 unification procedure. Mostly style fixes. Nothing serious. Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
* dwarfX_output: dont check for "ln" twiceCyrill Gorcunov2009-11-062-49/+37
| | | | | | | And make dwarf64 version to be more familiar to 32bit version (preparation work for merge). Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
* output/outelf64.c: simplify stabs64_cleanup, dwarf64_cleanupCyrill Gorcunov2009-11-061-26/+13
| | | | | | nasm_free is failsafe against NULL passed Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
* Document BR 2887108 in changes.srcCyrill Gorcunov2009-11-061-1/+5
| | | | Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
* Merge elf header filesCyrill Gorcunov2009-11-0611-382/+307
| | | | | | | | | Merge elfcommon.h, elf32.h, elf64.h into single elf.h -- we do support both elf32 and elf64 anyway. Let put them into common place. Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
* hash_init: check for size being power of twoCyrill Gorcunov2009-11-061-0/+1
| | | | | | | | It's really a bug if size is not power of two. We must to be sure all callers are sane. Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
* hashtbl.c: Unify common hash ops by macrosCyrill Gorcunov2009-11-061-25/+34
| | | | | | | Instead of opencoded repeatable computation use macro helpers. Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
* Introduce is_power2 helperCyrill Gorcunov2009-11-061-0/+3
| | | | | | We will need it for hash tables Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
* MOVD xmmreg: not valid with REX.WH. Peter Anvin2009-11-061-4/+4
| | | | | | | The xmmreg forms of MOVD are invalid with REX.W, since those are MOVQ instructions. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* Comment out matches() operand flags logicCyrill Gorcunov2009-11-061-60/+83
| | | | | | Also space fix Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
* nasmlib.h: Introduce nasm_build_assertCyrill Gorcunov2009-11-051-0/+5
| | | | | | | | | | It's useful to protect our self from some errors at build time. For this sake we should use nasm_build_assert if needed. Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
* test: imul.asm: move warning-generated tests under WARNH. Peter Anvin2009-11-031-6/+6
| | | | | | Only make the tests under WARN actually issue warnings. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* test: imul.asm: more IMUL pattern testsH. Peter Anvin2009-11-031-0/+27
| | | | | | Test more IMUL patterns. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* NASM 2.08rc2nasm-2.08rc2H. Peter Anvin2009-11-031-1/+1
|
* matches: simplify check operand size actionsCyrill Gorcunov2009-11-031-5/+4
| | | | | | | | We may throw out j variable (since we break anyway) and don't assign asize for free (since we don't use it after). Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
* IMUL: sbyteX fix -- last oneCyrill Gorcunov2009-11-031-3/+3
| | | | Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
* IMUL: fix an additional incorrect sbyte useH. Peter Anvin2009-11-031-1/+1
| | | | | | | | | | | One more incorrect use of sbyte in IMUL. Overall, the IMUL patterns seem really messy. *Furthermore*, despite IMUL normally being thought of as signed, the 2- and 3-operand versions don't produce a high half and are therefore signedness-agnostic -- we could even add MUL patterns for those forms. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* BR 2887108: fix incorrect sbyte usage in IMULH. Peter Anvin2009-11-031-2/+2
| | | | | | | | Fix a very curious transposition in the instruction patterns for IMUL, which caused 32-bit IMUL instructions with constants like 0x10001 to be generated incorrectly. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* Revert "BR 2887108: Use overflow_ helper to catch inappropriate imm ↵Cyrill Gorcunov2009-11-011-9/+8
| | | | | | | | | | | | | | | optimization" This reverts commit 41208028ff52d190044ee7532bf14c5aca0f899a. | | From: "H. Peter Anvin" <hpa@zytor.com> | | The tests for overflow_signed() are wrong too. Those are relevant for if a | warning should be issued, but not for how the value should be encoded in | the byte stream. | Signed-off-by: Cyrill Gorcunov <gorcunov@openvz.org>
* stdscan.c: use TOKEN_EOS and string helpersCyrill Gorcunov2009-10-311-6/+5
| | | | | | Also tab/space cleanup Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
* Various tab/space/comment cleanupCyrill Gorcunov2009-10-313-322/+327
| | | | | | No change on binary level Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
* output/outelf32-64: use string helpersCyrill Gorcunov2009-10-312-32/+12
| | | | Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
* Remove outdated commentsCyrill Gorcunov2009-10-313-6/+6
| | | | | | | | | | | | | | | | From Frank Kotler: | ... | > - stdscan_bufptr = saveme; /* bugfix? fbk 8/10/00 */ | > + stdscan_set(saveme); /* bugfix? fbk 8/10/00 */ | | While you're at it, you could remove my comment(s - it seems to have | reproduced). It *is* a bugfix (apparently). "saveme" might have a better | name, too... So get rid of the comments. Reported-by: Frank Kotler <fbkotler@zytor.com> Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
* stdscan: switch to stdscan_get/set routinesCyrill Gorcunov2009-10-319-30/+38
| | | | | | | | | | Instead of manipulating stdscan buffer pointer directly we switch to a routine interface. This allow us to unify stdscan access: ie caller should "talk" to stdscan via stdscan_get/set routines. Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
* nasmlib: Introduce idata_bytes helperCyrill Gorcunov2009-10-314-90/+63
| | | | | | This allow us to eliminate code duplication Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
* BR 2887108: Use overflow_ helper to catch inappropriate imm optimizationCyrill Gorcunov2009-10-311-8/+9
| | | | | | | | | | | | | We should use overflow_ helpers before check if an immediate operand fit a type range, otherwise we may loose high bits. For example when we assemble the following instruction imul eax,eax,0x10000 with -Ox passed we optimze it up to imm8 though it must be imm32. Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
* changes.src: document preprocessor directives added since 2.07Keith Kanios2009-10-252-0/+27
| | | | nasmdoc.src: document %exitmacro
* preproc.c: fix exitmacro to account for if/endif blocksKeith Kanios2009-10-251-3/+21
|
* continue using is_class helperCyrill Gorcunov2009-10-182-3/+3
| | | | Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
* changes.src: describe changes since version 2.07 up to 2.08rc1Cyrill Gorcunov2009-10-181-0/+17
| | | | | | | There are already new commits which fix other bugs but at moment only changes up to 2.08rc1. Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
* BR 2840300: fix macho symbol alignment bugKeith Kanios2009-10-162-6/+12
|
* parser.c: pasrse_line -- fix alignmentCyrill Gorcunov2009-10-141-3/+3
| | | | Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
* assemble: xsizeflags[] is an opflags_t variableH. Peter Anvin2009-10-131-1/+1
| | | | | | One more case of int32_t instead of opflags_t... Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* opflags: more int32_t -> opflags_t conversionsH. Peter Anvin2009-10-136-218/+262
| | | | | | | Hopefully this should catch all of them... but please keep an eye out for any other uses of int32_t for the operand flags. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* NASM 2.08rc1nasm-2.08rc1H. Peter Anvin2009-10-131-1/+1
|
* nasm: rename nasm_zap_spaces() to nasm_zap_spaces_fwd()H. Peter Anvin2009-10-133-3/+3
| | | | | | | | | By analogy with nasm_zap_spaces_rev() have nasm_zap_spaces_fwd(). The forward version isn't a super-common operation, and it might be possible to think the reverse one is the "normal" version... therefore we might as well be explicit. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* nasm.c: use string helpersCyrill Gorcunov2009-10-131-19/+7
| | | | Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
* preproc.c: use string helpersCyrill Gorcunov2009-10-131-10/+5
| | | | Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
* nasm.c: getkw -- use string helpersCyrill Gorcunov2009-10-131-36/+27
| | | | | | | This allow us to shrink code a bit and make it easy to read. Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
* nasmlib: introduce string helpersCyrill Gorcunov2009-10-132-0/+41
| | | | | | | | | | | | To make code more compact we introduce the following string helpers: 1) nasm_scip_spaces - skip leading spaces 2) nasm_skip_word - skip leading non-spaces 3) nasm_zap_spaces - zap leading spaces with zero 4) nasm_zap_spaces_rev - zap spaces in reverse order Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
* assemble.c: check constants for overflowCyrill Gorcunov2009-10-131-17/+27
| | | | | | | | | | Lets check if a constant supplied to DB and etc does not overflow storage size and emit warning if needed. [ Bug #2857628 http://sourceforge.net/tracker/?func=detail&aid=2857628&group_id=6208&atid=106208 ] Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
* introduce "overflow" helpersCyrill Gorcunov2009-10-131-0/+27
| | | | | Suggested-by: H. Peter Anvin <hpa@zytor.com> Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
* assemble.c: use is_class helperCyrill Gorcunov2009-10-131-3/+3
| | | | | | | | | | | is_class does not checking flags "strictly". Which means it may fail if type is specified to REGMEM and you check for is_class(MEMORY, ...). Anyway in current patch we check for REGISTER which doesn't overlap and it is safe to use is_class here. Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
* nasm.h: introduce is_class macro helperCyrill Gorcunov2009-10-131-0/+2
| | | | Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
* use opflags_t type for operandsCyrill Gorcunov2009-10-132-2/+2
| | | | Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
* style cleanupCyrill Gorcunov2009-10-133-435/+435
| | | | | | | | | Convert tabs to spaces. Eliminate empty comments. No change on binary level. Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>