| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
| |
WAIT is technically an instruction, but from an assembler standpoint
it behaves as if it had been a prefix. In particular, it has to be
ordered *before* any real hardware prefixes.
|
|
|
|
|
|
|
|
|
|
|
| |
The documentation says that constructs with %$...$foo can be used
to access macros from deeper in the context stack. From what
I can tell, that has never actually worked, since we'd enter names
like %$foo into the context-local macro name table. Instead, only
insert the tail of the macro name into the context-local table;
expand get_ctx to also return a pointer to the macro name proper;
this is rather straightforward since we'd usually save away that
name at the point get_ctx is called anyway.
|
|
|
|
|
| |
None of the strings passed to nasm_strcat() are modified, to
make them const.
|
|
|
|
|
| |
Drop the use of yet another local all-zero buffer, align_str, in favor
of calling fwritezero().
|
|
|
|
| |
Fix silly typo: the variable is "sections" not "section"...
|
|
|
|
|
|
|
|
| |
We have a number of all-zero buffers in the code. Put a single
all-zero buffer in nasmlib.c. Additionally, add fwritezero()
which can be used to write an arbitrary number of all-zero bytes;
this prevents the situation where the all-zero buffer is simply
too small.
|
|
|
|
|
|
|
|
|
| |
When a section other than .text has a start < origin, we would
segfault; fix that.
Furthermore, at bin_cleanup() we don't have usable file/line
information, so pass ERR_NOFILE to the error() function. Perhaps less
than ideal, but better than printing a null pointer.
|
| |
|
|
|
|
|
|
| |
Fix the opcode for VADDSUBPS
Fix the operands for VBLEND
Corrent the instruction flags for the AES ops (they're SSE)
|
|
|
|
|
| |
The FMA instructions aren't scheduled for Sandy Bridge after all.
They will be "in a future processor", so create a placeholder for now.
|
|
|
|
|
| |
Small perl script used to generate the FMA instruction patterns. May
come in useful if the spec changes again.
|
| |
|
|
|
|
|
|
| |
Update the VFMA* instructions to match the AVX spec version 5.
Since these are highly regular, use a small Perl script to generate
the instruction patterns.
|
|
|
|
| |
Fix minor anomalies in insns.dat.
|
|
|
|
| |
The AVX spec version 5 introduces the new VEX.DDS flag; support it.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Checkin 4b9358928b114caaf34a69d6fdfd3b285b7a72cc changed the version
message from stdout to stderr, but:
a) doesn't motivate the change in the commit log;
b) bundles that with other changes;
c) is inconsistent with other programs;
d) was done by me and I can't remember any reason for it.
Hence conclude it was unintentional and therefore a bug. Since this
commit was done after 2.05.01 no stable release has been affected.
|
| |
|
|
|
|
|
| |
This experimental feature needs to be tested for
all output formats which recognize global symbols.
|
|
|
|
|
|
| |
Module labels.c has code to issue error message when global
directive appears after symbol definition, but the test condition
was incorrectly punctuated.
|
|
|
|
|
|
|
| |
I realized that a documentation change is required to inform users about the
addition of entry point support for the as86 format. The following produces
reasonable output for .txt output, but I am blind and so can't check the
other formats as readily.
|
|
|
|
| |
Minor cleanups to the "String Manipulation in Macros" section.
|
|
|
|
| |
Indent the time macro example for ease of reading.
|
|
|
|
| |
verson -> version
|
|\ |
|
| |
| |
| |
| |
| |
| |
| | |
Previously, the ELF backends silently ignored incorrect or unknown
attributes on section declarations, and therefore used default values
in cases where the user had make an error in attempting to specify
custom values.
|
|/
|
|
| |
Update the section on numeric constants, and add a few more examples.
|
|
|
|
|
|
|
| |
Fix multiple bugs in the [warning] directive:
- Only parsed on pass 1
- "-" was interpreted as "+"
|
|
|
|
| |
Minor stylistic cleanups to previous patch.
|
|
|
|
|
|
|
|
|
|
|
|
| |
I needed entry point support with the as86 format, and after looking through
the archives found a similar desire from someone in 2002. For some reason
such a patch never made it into the code, even though the required flag
value is present, so I offer the a patch of my own.
I compared against what is done in the .obj format and the approaches are
quite similar which I hope will aid in its acceptability. While I have
tested it extensively it does do the job asked, and I'm honestly not sure
what extensive testing of the change would look like.
|
|
|
|
|
| |
Somewhere we lost the enforcement of the LONG bit, as opposed to
NOLONG. Fix this in the most obvious way.
|
|
|
|
|
| |
At some point, we lost the optimizations for the core arithmetic
operations involving AX. Put them back.
|
| |
|
| |
|