| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
| |
Unify the token-pasting code between the macro expansion and the
preprocessor parameter case. Parameterize whether or not to handle %+
tokens during expansion (%+ tokens have late binding semantics.)
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
|
| |
|
|
|
|
|
|
|
|
| |
Recognize $ and $$ as TOKEN_OTHER; they aren't really either
TOK_NUMBER nor TOK_ID, even though we have traditionally considered
them TOK_NUMBER.
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
|
|
|
|
|
| |
The tokenizer didn't handle $$, but relied on token pasting of two $ tokens.
This broke after the improvements in 9bb46df4.
|
|
|
|
|
|
|
| |
"+" can be a separate token that ends up having to get pulled into the
middle of a floating-point constant. It's not even that strange.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Especially when token pasting involves floating-point numbers, we can
have some really strange effects from token pasting: for example,
pasting the two tokens "xyzzy" and "1e+10" ends up with *three*
tokens: "xyzzy1e" "+" "10". The easiest way to deal with this is to
explicitly combine the string and then run tokenize() on it.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
|
| |
|
| |
|
|
|
|
|
| |
Add the NASM Manual (as a PDF) to the Windows installer, and abstract
out the version number.
|
|
|
|
|
|
|
|
| |
Here is an NSIS script for making a simple NASM package. It creates a
NASM folder with some of the important binaries in it, as well as a
simple batch file to get a CLI with the NASM folder included in the
PATH. Expects to be built from inside the bin/ directory. Fairly
primitive. Feedback welcome. - Shao
|
| |
|
|
|
|
|
| |
Add an optional second argument to struc, document it and test it.
Also removed trailing whitespace in nasmdoc.src in the process.
|
|
|
|
| |
F2 is REPNE, F3 is REP(E)
|
|
|
|
|
| |
If we can't find a matching instruction, rather than printing it as a
"db" literal, consider first if we can disassemble it as a naked prefix.
|
| |
|
|
|
|
|
|
| |
Fix the SAFESEH directive for the specific case of a symbol internal
to the program. With the optimizer enabled, it would otherwise fail
unless the symbol is external.
|
|
|
|
|
|
| |
Fix crash caused by uninitialised memory that lead to dangling pointer
in the rbtree. This can be seen by compiling zsnes 1.50, with a file
that define many symbols, such as fxemu2c.asm.
|
|
|
|
|
|
| |
Two bugs with respect to the FMA instructions:
- the variant increment is supposed to be 0x10, not 0x01.
- the base opcode for scalar VFNMADD is 0x9d, not 0x9c
|
|
|
|
| |
Add the test case from BR 2690688 to the test collection.
|
|
|
|
|
|
| |
The Perl script which auto-generated the VFM instructions had
incorrectly conflated the VEX.W and VEX.L bits, with the result that
only half the valid instructions were generated.
|
|
|
|
| |
The PEXTRQ instruction requires a REX.W prefix.
|
|
|
|
|
| |
Fix the spelling of the scalar VFNM instruction in genfma.pl, too,
just in case we need to pull this script out again...
|
|
|
|
|
| |
The scalar versions of the VFNM instructions had been incorrectly
spelled VFMN.
|
| |
|
|
|
|
| |
Handle long arrays on a single line in db/dw/etc.
|
|
|
|
|
|
|
| |
OpenWatcom 1.8 has a C99 mode, which implements _Bool and
<stdbool.h>. Unfortunately the implementation is broken, and doesn't
let _Bool be implicitly converted to integer (as required by the C99
spec). Detect this case in autoconf.
|
|
|
|
|
| |
Most of our instruction opcodes are written in octal. Thus, it makes
sense to print them that way if we ever have an error message.
|
|
|
|
| |
A few more sbyte optimization tests.
|
|
|
|
| |
We can optimize the sbytes if the UNKNOWN flag isn't set
|
| |
|
| |
|
|
|
|
|
|
| |
Optimize displacements, don't pessimize them. When running in the
optimizer, we always keep track of when a reference is forward. That
doesn't mean it is unknown.
|
|
|
|
| |
Add tests for EA optimizations
|
|
|
|
| |
Yet another change for readability
|
|
|
|
|
| |
The code to pick apart seg:off in nasm.c was virtually unreadable due
to mechanized line breaking.
|
| |
|
|
|
|
| |
Also be optimistic with immediate forward references.
|
| |
|
|
|
|
|
|
|
| |
Only be optimistic about the reachability of a symbol with NO_SEG if
we are truly in pass 1, i.e. it could possibly be just a forward
reference. After we have done a single pass, if it is still NO_SEG,
then it is an absolute symbol and need to be treated as such.
|
|
|
|
|
| |
A JMP to an absolute address can't be short. Thus, we must not try to
make it so.
|
|
|
|
|
| |
Some edge cases where starting with a long form
converges suboptimally.
|
|
|
|
| |
Begin by assuming short jumps are possible to prevent suboptimal convergence.
|
|
|
|
| |
The PCLMUL instruction is apparently targetted for Westmere.
|
| |
|
|
|
|
|
|
|
|
| |
Fix the disassembly of the alternate forms of register-register
MOVAPD, MOVDQA, MOVDQU, MOVQ, MOVSD, and MOVUPD.
NASM never generates these, but they would be disassembled
incorrectly.
|
|
|
|
|
| |
Fix various flags on LZCNT and POPCNT, and fix a few instructions
tagged \360\332, which makes no sense.
|