summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Slightly optimize the interface to nasm_token_hash()sse5H. Peter Anvin2007-09-182-7/+3
| | | | | | 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().
* Merge commit 'origin/master' into sse5H. Peter Anvin2007-09-181-4/+4
|\
| * elf64: fix 32-bit truncationsH. Peter Anvin2007-09-181-4/+4
| | | | | | | | | | | | Fix 32-bit truncations, as evidenced by the following test program: mov rax, 8080808080808080h
* | Document Infinity and NaNH. Peter Anvin2007-09-181-0/+10
| | | | | | | | Add __Infinity__, __QNaN__, and __SNaN__ to the documentation.
* | Support generating NaNs and infinitiesH. Peter Anvin2007-09-184-62/+160
| | | | | | | | | | Support generating NaNs and infinities as part of floating-point constants.
* | Update documentationH. Peter Anvin2007-09-181-26/+35
| | | | | | | | | | Document new floating-point capabilities, and clean up the discussion about BITS 64 and REX prefixes.
* | Simple test for hexadecimal floating-point numbersH. Peter Anvin2007-09-181-0/+125
| | | | | | | | Very trivial test for hexadecimal floating-point numbers
* | Fix error-reporting in hexadecimal floating-point numbersH. Peter Anvin2007-09-181-1/+1
| |
* | Support C99-style hexadecimal floating point.H. Peter Anvin2007-09-182-1/+94
| | | | | | | | | | | | 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 standard IEEE floating-point formats; add 128-bitH. Peter Anvin2007-09-182-142/+167
| | | | | | | | | | | | | | | | 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.
* | Fix handling of DO; support unary + for floating-point numbersH. Peter Anvin2007-09-182-11/+20
| | | | | | | | | | Floating-point users generally expect to be able to use a unary plus. Fix support for the DO instruction in several places.
* | Support 16-bit IEEE floating point; used in SSE5H. Peter Anvin2007-09-182-13/+82
| | | | | | | | | | SSE5 supports standard IEEE 16-bit floating point, so we should support that too.
* | Merge commit 'origin/master' into sse5H. Peter Anvin2007-09-181-0/+3
|\ \ | |/
| * Add NOP with argument to the instruction listH. Peter Anvin2007-09-181-0/+3
| | | | | | | | | | | | | | 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.
* | Remove 0FC2 from list of instruction prefixesH. Peter Anvin2007-09-181-1/+1
| | | | | | | | | | | | | | 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.
* | Speed up the disassembler by allowing prefixed instruction tablesH. Peter Anvin2007-09-183-36/+139
| | | | | | | | | | | | | | 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, do and resoH. Peter Anvin2007-09-181-22/+22
| | | | | | | | Document oword and the associated do and reso pseudoinstructions.
* | Implement "oword" (128 bits) as a first-class sizeH. Peter Anvin2007-09-186-24/+56
| | | | | | | | | | | | 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.
* | Change the token prehash function for better convergenceH. Peter Anvin2007-09-183-6/+6
| | | | | | | | | | | | | | 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.
* | SSE5 instruction tableH. Peter Anvin2007-09-181-0/+148
| | | | | | | | Implement the full SSE5 instruction table.
* | Disassembler support for SSE5 instructionsH. Peter Anvin2007-09-172-78/+134
| | | | | | | | | | | | Support for the SSE5 instruction format in the disassembler. Also adds some comments to insnsd.c for easier debugging.
* | insns.dat: All SSE5 instructions are AMDH. Peter Anvin2007-09-171-16/+16
| | | | | | | | SSE5 is an AMD-defined instruction set, so tag those AMD.
* | Actually generate SSE5 instructionsH. Peter Anvin2007-09-176-6/+63
| | | | | | | | | | | | | | | | | | | | 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 suffixesH. Peter Anvin2007-09-172-3/+66
| | | | | | | | | | | | Initial support for generating DREX suffixes. Not used yet. No disassembler support yet, and no support for "operand X must match operand Y."
* | Fix a few instances of missing renumbersH. Peter Anvin2007-09-172-4/+4
| | | | | | | | | | parser.c: change hard-coded argument count 3 to MAX_ARGUMENTS assemble.c: change a few missed code renumbers
* | Enable IF_AR3H. Peter Anvin2007-09-171-2/+0
| | | | | | | | Enable IF_AR3, which was incorrectly disabled in a previous checkin.
* | Merge commit 'origin/master' into sse5H. Peter Anvin2007-09-171-1/+1
|\ \ | |/
| * CLFLUSH: Neither an x64 instruction nor AMDH. Peter Anvin2007-09-171-1/+1
| | | | | | | | | | CLFLUSH was introduced at least in Katmai, if not sooner. It's available in all modes.
* | Initial support for four arguments per instructionH. Peter Anvin2007-09-176-241/+310
|/ | | | For SSE5, we will need to support four arguments per instruction.
* Sort dependency listsH. Peter Anvin2007-09-173-116/+115
| | | | | | | 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.
* Cleaner way to handle MSVC's _snprintf() underscore damageH. Peter Anvin2007-09-176-130/+140
| | | | | Some versions of MSVC have snprintf() and vsnprintf() only with a leading underscore. Handle that a bit more cleanly.
* test/r13.asm: test special-casing of rbp and r13 in 64-bit modeH. Peter Anvin2007-09-171-0/+13
| | | | | Test that we correctly special-case the modr/m generation for r13 in 64-bit mode.
* Additional documentation for 64-bit programmingH. Peter Anvin2007-09-171-1/+55
| | | | | | Flesh out the documentation for 64-bit programming a little bit; in particular, include links to the ABI documentation for various platforms.
* INSTALL: MSVC++ compilation instructionsH. Peter Anvin2007-09-161-6/+28
| | | | | | 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.
* make alldeps: change Mkfiles/Makefile.* to Mkfiles/*.makH. Peter Anvin2007-09-161-1/+1
| | | | | The previous checkin switched to the naming scheme *.mak to be able to be more descriptive. Thus, change "make alldeps" accordingly.
* Fix Makefile for MSVC++ 2005, delete obsolete MakefilesH. Peter Anvin2007-09-1620-3280/+231
| | | | New Makefile for MSVC++ 2005, delete old unmaintained Makefiles.
* Minor fixes needed to compile with MSVC++ 2005H. Peter Anvin2007-09-165-23/+25
| | | | | | | | 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.
* Run "make alldeps"H. Peter Anvin2007-09-1620-20/+20
|
* Switch the preprocessor over to using the hash table libraryH. Peter Anvin2007-09-165-189/+305
| | | | | | | | | | | 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.
* Fix the handling of local labelsH. Peter Anvin2007-09-161-22/+11
| | | | | In converting the label system over to the new hash table library, accidentally broke local labels by prepending the prefix twice. Fix.
* preproc.c: remove unnecessary int64_tH. Peter Anvin2007-09-141-2/+2
| | | | We hardly need to support more than 2^31 arguments to a macro.
* Use the new hash table function library to store labelsH. Peter Anvin2007-09-1421-89/+164
| | | | | | 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 libraryH. Peter Anvin2007-09-143-0/+312
| | | | | | | | | | | | | | 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 performance benchmarks: label, macro and token lookupsH. Peter Anvin2007-09-133-0/+59
| | | | | | | | 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.
* release script: fix final cleanupH. Peter Anvin2007-09-131-1/+1
| | | | Make sure we're in the right place for the final cleanup.
* Modify release script for a git-centric worldH. Peter Anvin2007-09-131-85/+47
| | | | | | 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.
* pptok.c: don't insist on C99 compiler behaviourH. Peter Anvin2007-09-131-2/+3
| | | | | | 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.
* Fix literal F2 and F3 prefixesH. Peter Anvin2007-09-121-64/+64
| | | | | Correct literal F2 and F3 prefixes and instead use \332 and \333. Otherwise we get the REX prefixes in the wrong place.
* Add (untested!) SSSE3, SSE4.1, SSE4.2 instructionsH. Peter Anvin2007-09-126-18/+104
| | | | | | | | | | 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 support for Tejas New Instructions (SSSE3)H. Peter Anvin2007-09-121-0/+33
| | | | Add the SSSE3 instruction set.