| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
| |
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
|
|
|
|
|
|
| |
AMD has obsoleted the DREX-based SSE5 proposal, so remove all such
instructions.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
|
|
|
|
|
|
| |
Make a small step forward elf32/64 unification procedure.
Mostly style fixes. Nothing serious.
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
|
|
|
|
|
|
|
| |
And make dwarf64 version to be more familiar to
32bit version (preparation work for merge).
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
|
|
|
|
|
|
| |
nasm_free is failsafe against NULL passed
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
|
|
|
|
| |
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
| |
Instead of opencoded repeatable computation
use macro helpers.
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
|
|
|
|
|
|
| |
We will need it for hash tables
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
|
|
|
|
|
|
|
| |
The xmmreg forms of MOVD are invalid with REX.W, since those are MOVQ
instructions.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
|
|
|
|
|
| |
Also space fix
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
| |
Only make the tests under WARN actually issue warnings.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
|
|
|
|
|
| |
Test more IMUL patterns.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
| |
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
| |
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
| |
Also tab/space cleanup
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
|
|
|
|
|
|
| |
No change on binary level
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
|
|
|
|
| |
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
| |
This allow us to eliminate code duplication
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
| |
nasmdoc.src: document %exitmacro
|
| |
|
|
|
|
| |
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
|
|
|
|
|
|
|
| |
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>
|
| |
|
|
|
|
| |
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
|
|
|
|
|
|
| |
One more case of int32_t instead of opflags_t...
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
|
|
|
|
|
|
| |
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>
|
| |
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
| |
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
|
|
|
|
| |
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
|
|
|
|
|
|
|
| |
This allow us to shrink code a bit and
make it easy to read.
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
| |
Suggested-by: H. Peter Anvin <hpa@zytor.com>
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
| |
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
|
|
|
|
| |
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
|
|
|
|
|
|
|
|
|
| |
Convert tabs to spaces.
Eliminate empty comments.
No change on binary level.
Signed-off-by: Cyrill Gorcunov <gorcunov@gmail.com>
|