Commit Graph

541 Commits

Author SHA1 Message Date
H. Peter Anvin
cdea6f96b6 phash: Be a bit more aggressive about trying to make a small hash
Change the threshold to 0.7 instead of 0.8.
2007-09-12 01:27:53 +00:00
H. Peter Anvin
ce9be34d3d Add RCXZ as a known preprocessor condition 2007-09-12 00:22:29 +00:00
H. Peter Anvin
9c06db6935 doc: add some cross-references 2007-09-11 23:57:23 +00:00
H. Peter Anvin
9b49e24e1f Feeble attempt at updating the documentation; remove Appendix B
Feeble attempt to document 64-bit support.  Also, remove Appendix B since
we have been utterly useless at keeping it up to date, and it's redundant
with the processor manufacturer's documentation anyway.
2007-09-11 23:52:01 +00:00
H. Peter Anvin
62cb606f68 Handle instructions which can have both REX.W and OSP 2007-09-11 22:44:03 +00:00
H. Peter Anvin
b79f0d0cc3 Use enums to make debugging easier
When we're dealing with a field which is guaranteed to have an enum type,
then declare it as such so it shows up in debuggers.
2007-09-11 22:14:18 +00:00
H. Peter Anvin
2ba7ed7122 ndisasm: handle \366 codes, prefer unprefixed instructions
- Implement \366 codes in ndisasm
- Prefer instruction patterns without loose prefixes if possible
- Fix improper initialization of operands in ndisasm
2007-09-11 22:13:17 +00:00
H. Peter Anvin
4f090502fb Simplify tokens.dat slightly 2007-09-11 22:00:34 +00:00
H. Peter Anvin
bfb888c015 Quiet gcc warning about uninitialized variables 2007-09-11 04:26:44 +00:00
H. Peter Anvin
3360d79369 Make the big instruction arrays "const"
Make the big instruction arrays "const", so they end up in readonly
storage.  While we're at it, move their prototypes into insns.h.
2007-09-11 04:16:57 +00:00
H. Peter Anvin
ea6bfb8107 Use an actual enum for the opcode
Use an actual named enum for the opcode, that way it shows up in
cleartext while debugging.
2007-09-10 23:32:05 +00:00
H. Peter Anvin
6fa5c358b5 Fix order of token arguments
Order of token arguments was reversed, but tokens.dat wasn't updated
accordingly.  Fix.
2007-09-10 23:30:21 +00:00
H. Peter Anvin
f5843c614a assemble.c: correct special handing of ESP/RSP
Correct the special handling of ESP/RSP (must be in the base register
slot, but requires SIB.)
2007-09-10 18:59:26 +00:00
H. Peter Anvin
309a8ba340 tokhash: correct duplicate-token test 2007-09-10 18:59:01 +00:00
H. Peter Anvin
d555a64a7f tokhash: adjust table types to reduce size
Adjust the sizes of data types to reduce the total size of the tokhash
data structure.
2007-09-10 18:58:40 +00:00
H. Peter Anvin
a80241f58a Fix the MMXREG and XMMREG flags definitions. 2007-09-10 18:55:52 +00:00
H. Peter Anvin
f6abe44fc8 nasm.spec.in: Copyright -> License 2007-09-05 06:48:38 +00:00
H. Peter Anvin
52e30171ee Fix "make tar"; useful for RPM testing 2007-09-05 06:40:51 +00:00
H. Peter Anvin
da51fc9dac Remove obsolete Serial: construct; we shouldn't need it anyway. 2007-09-05 06:24:43 +00:00
Chuck Crayne
199b96a810 Provide 64-bit support for ORG directive 2007-09-04 01:29:43 +00:00
H. Peter Anvin
53a3c687dd Fix some MMX/SSE irregularities which interact with the 64-bit support 2007-09-02 16:37:03 +00:00
H. Peter Anvin
e17a3cb29d phash.ph: yet another attempt at getting Perl to behave, arithmetically 2007-09-02 14:46:00 +00:00
H. Peter Anvin
4768f5f6f2 Simple 64-bit org test 2007-09-02 06:23:29 +00:00
H. Peter Anvin
e3e9e9fa0d phash.ph: remove some stale code
Remove old randomization code which is no longer used.
2007-09-02 06:20:15 +00:00
Chuck Crayne
757dfad900 Force use of integer values for generating hash keys. 2007-09-02 01:00:34 +00:00
H. Peter Anvin
b938e043ca phash: don't rely on the build platform Perl version of rand()
rand() in Perl can vary between platforms, so don't use it.  Instead,
remove a completely pointless level of indirection (it introduced a
permutation which cancelled itself out) and provide a canned set of
random numbers for the rest.  This guarantees we will always use the
same numbers.
2007-08-31 18:10:23 +00:00
H. Peter Anvin
96a810256f tokhash.pl: formatting changes for readability
No functional change
2007-08-31 07:31:51 +00:00
H. Peter Anvin
91a86cdb31 tokhash: Speed up the rejection of unhashed values
Speed up the rejection of unhashed values (typically identifiers) by
filling unused hash slots with a large value (but not so large that
it is likely to overflow.)  This means those values will be rejected
already by the range check, not needing strcmp().
2007-08-31 07:23:31 +00:00
H. Peter Anvin
535af831f1 tokhash.pl: "ix" should have the same width as the "hash" arrays
For correctness in case of a very "linear" graph, "ix" needs to have
the same width as the "hash" arrays.
2007-08-31 06:06:17 +00:00
H. Peter Anvin
9e4dba2f47 Add "do not edit" comment to tokhash.c 2007-08-31 00:28:35 +00:00
H. Peter Anvin
29b1bc4603 Make the token hash a bit smaller by using 16-bit hash tables 2007-08-31 00:23:40 +00:00
H. Peter Anvin
2c29a0b264 Minor cleanup; remove duplication of names.c 2007-08-31 00:16:10 +00:00
H. Peter Anvin
fb5a599c8a phash.ph: use a bipartite graph to reduce the storage requirements
Since we fold the f- and g-functions together, if we guarantee that g is
bipartite, we can make g twice the size of f without cost.  This greatly
improves the odds of generating a smaller hash.
2007-08-30 23:42:39 +00:00
H. Peter Anvin
74cc5e569c Finishing touches on perfect hash tokenizer; actually turn the thing on
Finish the perfect hash tokenizer, and actually enable it.

Move stdscan() et al to a separate file, since it's not needed in any
of the clients of nasmlib other than nasm itself.

Run make alldeps.
2007-08-30 22:35:34 +00:00
H. Peter Anvin
b1dabe44ac Makefile rule for tokhash.c 2007-08-30 21:50:20 +00:00
H. Peter Anvin
6efa472d21 tokens.dat: Data file containing alphanumeric tokens not in other .dats 2007-08-30 21:47:46 +00:00
H. Peter Anvin
e9d1a97b88 Generate a perfect hash for the token parser 2007-08-30 21:45:56 +00:00
H. Peter Anvin
67858426e4 Fix bugs in repeated suffix handling, which led to missing r8d/r8w/r8d 2007-08-30 21:40:08 +00:00
H. Peter Anvin
215c1a3781 phash.ph: more powerful prehashing 2007-08-30 21:39:37 +00:00
H. Peter Anvin
b44d7a76a2 Make the perfect hash generator an includable module 2007-08-30 20:15:25 +00:00
H. Peter Anvin
490bbcd047 Correct the logic for recording fs: and gs: overrides. 2007-08-29 20:30:31 +00:00
H. Peter Anvin
b838bcfe9f Generate R_X86_64_64 relocations in elf64 output
When appropriate, generate R_X86_64_64 relocations in elf64 output.
2007-08-29 18:20:19 +00:00
H. Peter Anvin
7a089c0fc7 Add README file 2007-08-29 17:24:03 +00:00
H. Peter Anvin
16a76654b8 Create a Perl library directory, and add the Graph module to it
Graph-0.84 from CPAN
2007-08-29 17:20:09 +00:00
H. Peter Anvin
8781c6a5f3 Perfect hash generator, as a perl script
Requires the CPAN Graph module.
2007-08-29 17:05:17 +00:00
H. Peter Anvin
3894519675 Use standard macro for the default directive 2007-08-29 16:41:43 +00:00
H. Peter Anvin
4fd320ef82 Add standard macro for [default] directive 2007-08-29 16:40:26 +00:00
H. Peter Anvin
859f085985 More test cases for rel and abs addressing 2007-08-29 16:38:47 +00:00
H. Peter Anvin
62b24d7e2f Add [default] directive
Add the [default {abs|rel}] directive, and clean up directive parsing.
2007-08-29 16:38:05 +00:00
H. Peter Anvin
14f8bf2edf nasmlib: add bsii() case-insensitive version of bsi() 2007-08-29 16:25:46 +00:00