| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
Instead of returning -1 from nasm_token_hash, set tv->t_type to
TOKEN_ID and return TOKEN_ID, since that's what stdscan.c wants to do
with it anyway. This allows us to simply tailcall nasm_token_hash().
|
|\ |
|
| |
| |
| |
| |
| |
| | |
Fix 32-bit truncations, as evidenced by the following test program:
mov rax, 8080808080808080h
|
| |
| |
| |
| | |
Add __Infinity__, __QNaN__, and __SNaN__ to the documentation.
|
| |
| |
| |
| |
| | |
Support generating NaNs and infinities as part of floating-point
constants.
|
| |
| |
| |
| |
| | |
Document new floating-point capabilities, and clean up the discussion
about BITS 64 and REX prefixes.
|
| |
| |
| |
| | |
Very trivial test for hexadecimal floating-point numbers
|
| | |
|
| |
| |
| |
| |
| |
| | |
Add support for C99-style hexadecimal floating point. The format is
0x <hexadecimal mantissa> p <binary exponent>. 0x1.0e+1 thus is the
same as 2.0.
|
| |
| |
| |
| |
| |
| |
| |
| | |
Unify all the standard IEEE formats into one function, add support for
IEEE standard 128-bit floating point numbers.
The 80-bit format is still special since it explicitly represents the
integer portion.
|
| |
| |
| |
| |
| | |
Floating-point users generally expect to be able to use a unary plus.
Fix support for the DO instruction in several places.
|
| |
| |
| |
| |
| | |
SSE5 supports standard IEEE 16-bit floating point, so we should
support that too.
|
|\ \
| |/ |
|
| |
| |
| |
| |
| |
| |
| | |
0F 1F /0 is documented as an EA-taking NOP since the P6.
0F 18..1F + EA are all "hinting nops" (instructions which, when
unimplemented, have no effect rather than #UD) but 0F 1F /0
specifically has no operation whatsoever.
|
| |
| |
| |
| |
| |
| |
| | |
0FC2 is not really an instruction prefix; it's the opcode for
CMPPS/CMPSS, which takes a control immediate which Intel chose to have
opcode aliases for. However, we can't dispatch on a tail byte, so
it's useless.
|
| |
| |
| |
| |
| |
| |
| | |
Modify the disassembler so that we can have separate instruction
tables for prefixed instructions. As it was, all instructions which
started with 0F were linearly searched, and that is by now more than
half the instruction set.
|
| |
| |
| |
| | |
Document oword and the associated do and reso pseudoinstructions.
|
| |
| |
| |
| |
| |
| | |
Implement oword, reso, do, as well as the SO flag to instructions. No
instructions are actually flagged with SO yet, but this allows us to
specify 128-bit sizes in instruction patterns.
|
| |
| |
| |
| |
| |
| |
| | |
Combining arithmetric (add) and bitwise (xor) mixing seems to give
better result than either.
With the new prehash function, we find a valid hash much quicker.
|
| |
| |
| |
| | |
Implement the full SSE5 instruction table.
|
| |
| |
| |
| |
| |
| | |
Support for the SSE5 instruction format in the disassembler.
Also adds some comments to insnsd.c for easier debugging.
|
| |
| |
| |
| | |
SSE5 is an AMD-defined instruction set, so tag those AMD.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This checkin completes what is required to actually generate SSE5
instructions. No support in the disassembler yet.
This checkin covers:
- Support for actually generating DREX prefixes.
- Support for matching operand "operand X must match Y"
|
| |
| |
| |
| |
| |
| | |
Initial support for generating DREX suffixes. Not used yet. No
disassembler support yet, and no support for "operand X must match
operand Y."
|
| |
| |
| |
| |
| | |
parser.c: change hard-coded argument count 3 to MAX_ARGUMENTS
assemble.c: change a few missed code renumbers
|
| |
| |
| |
| | |
Enable IF_AR3, which was incorrectly disabled in a previous checkin.
|
|\ \
| |/ |
|
| |
| |
| |
| |
| | |
CLFLUSH was introduced at least in Katmai, if not sooner. It's
available in all modes.
|
|/
|
|
| |
For SSE5, we will need to support four arguments per instruction.
|
|
|
|
|
|
|
| |
Sort the dependency lists generated by "mkdep.pl", to make sure that
re-running "make alldeps" doesn't change anything unless there has
been real dependency changes. The previous version could produce
different output between runs and across platforms.
|
|
|
|
|
| |
Some versions of MSVC have snprintf() and vsnprintf() only with a
leading underscore. Handle that a bit more cleanly.
|
|
|
|
|
| |
Test that we correctly special-case the modr/m generation for r13 in
64-bit mode.
|
|
|
|
|
|
| |
Flesh out the documentation for 64-bit programming a little bit; in
particular, include links to the ABI documentation for various
platforms.
|
|
|
|
|
|
| |
Update compilation instructions for MSVC++, and point out that it's
not just Unix systems which can use the GNU instructions -- it also
applies to MacOS X and Windows with either Cygwin or MinGW.
|
|
|
|
|
| |
The previous checkin switched to the naming scheme *.mak to be able to
be more descriptive. Thus, change "make alldeps" accordingly.
|
|
|
|
| |
New Makefile for MSVC++ 2005, delete old unmaintained Makefiles.
|
|
|
|
|
|
|
|
| |
Minor fixes to make it possible to compile with MS Visual C++ 2005.
Unfortunately, MSVC++ is not fully C99 compliant; in particular, it
doesn't handle interspersed declarations and other code. Furthermore,
it chokes on some expressions in outelf64.c, which fortunately can be
easily substituted with simpler expressions.
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Switch the preprocessor over to using the hash table library. On my
system, this improves the runtime of the output of test/pref/macro.pl
from over 600 seconds to 7 seconds.
Macros have an odd mix of case-sensitive and case-insensitive
behaviour, plus there are matching parameters for arguments, etc. As
a result, we use case-insensitive hash tables and use a linked list to
store all the possible isomorphs.
|
|
|
|
|
| |
In converting the label system over to the new hash table library,
accidentally broke local labels by prepending the prefix twice. Fix.
|
|
|
|
| |
We hardly need to support more than 2^31 arguments to a macro.
|
|
|
|
|
|
| |
Use the new hash table function library to store labels. When
compiling on my 64-bit system, it reduces the assembly time for the
output of test/perf/label.pl from 73 to 7 seconds.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Define a proper hash table library, instead of the current ad hoc stuff
used for both labels and macros. This only implements the actual
library; it is not yet used.
We use a CRC64 as a prehash. This is almost certainly overkill,
although it is rather efficient (except, arguably, the table lookup)
on 64-bit platforms, and not all that bad on 32-bit platforms. All we
really need is a function which produces two independent 32-bit
results which are used as the primary and secondary hash
respectively. Either way, the prehash function is easily replacable
if/when we have a quicker alternative.
|
|
|
|
|
|
|
|
| |
Simple scripts to generate performance benchmarks for label,
macro and token lookups. The label and macro lookups are simple
numerical sequences; it may be desirable to add some more
sophisticated algorithms for producing tokens in case we want to
compare different hash functions against each other.
|
|
|
|
| |
Make sure we're in the right place for the final cleanup.
|
|
|
|
|
|
| |
Change the release script to use git rather than CVS.
THE BEHAVIOR OF THE SCRIPT HAS CHANGED -- make sure to look at it
before use.
|
|
|
|
|
|
| |
Declarations that are not at the head is C99 behaviour, but it's
rather pointless for this little piece of code. Fix to work with
older compilers.
|
|
|
|
|
| |
Correct literal F2 and F3 prefixes and instead use \332 and \333.
Otherwise we get the REX prefixes in the wrong place.
|
|
|
|
|
|
|
|
|
|
| |
Add the SSSE3, SSE4.1 and SSE4.2 instruction sets. Change \332 to be
a literal 0xF2 prefix, by analog with \333 for 0xF3 prefix (the
previous \332 flag changed to \335). This is necessary to get the REX
prefix in the right place for instructions that use it.
We are going to have to go in and change existing instruction patterns
which use these, as well.
|
|
|
|
| |
Add the SSSE3 instruction set.
|