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
H. Peter Anvin
12fc7bc4b2
Add test cases for IP-relative addressing
2007-08-29 15:49:53 +00:00
H. Peter Anvin
150e20db50
Suppress IP-relative only for fs: and gs: overrides
...
AMD has (undocumented) segment limits even in 64-bit mode, so people
may want to use cs/ds/es/ss overrides. Since there are no bases, however,
IP-relative still applies.
See:
http://www.amd.com.hk/us-en/assets/content_type/DownloadableAssets/dwamd_kernel_summit_08_RB.pdf
2007-08-29 15:19:19 +00:00
H. Peter Anvin
99c4ecd18f
Implement REL/ABS modifiers
...
Implement "REL" and "ABS" modifiers for offsets in 64-bit mode. This
replaces "rip+XXX" type addressing. The infrastructure to set the default
mode is there, but there is nothing to throw the switch just yet.
2007-08-28 23:06:00 +00:00
Frank Kotler
352170d5eb
attempt to make static makefiles aware of outelf32/outelf64
2007-08-26 05:51:39 +00:00
Frank Kotler
7fcda399cd
add nasm_strsep to nasmlib, for output/outmacho.c - strtok doesn't work
2007-08-26 05:48:54 +00:00
Frank Kotler
2ad45a56b4
remove "#include <unistd.h> from rdoff directory - two places - it annoyed Windows users and seems unneeded
2007-08-26 05:41:33 +00:00
Frank Kotler
155eef6a3d
finally commit Mike Frysinger's "elf-visibility" patch
2007-08-26 05:10:24 +00:00
H. Peter Anvin
85f5f148bb
regs.pl: handle dashed sequences with suffixes
...
Handle dashed sequences with suffixes. Use that for r8-r15[bwd].
2007-08-20 21:03:14 +00:00
H. Peter Anvin
fc918885e0
sync.c: change ULONG_MAX to UINT32_MAX
...
The value returned is uint32_t, not unsigned long. This creates a
warning when compiling on 64-bit machines.
2007-08-20 20:10:04 +00:00
H. Peter Anvin
ea8a28253b
Add _MIN and _MAX macros for the fixed-size types.
2007-08-20 20:09:11 +00:00
H. Peter Anvin
3b69717a12
ldrdf: cast output of sizeof() before passing to printf(), to avoid warning.
...
The C99 way of doing this would be to use %zu, but that requires intrinsic
C library support.
2007-08-20 20:02:17 +00:00
Keith Kanios
d94764bec0
Fixed RIP address processing ambiguity found by Charles Crayne.
2007-08-19 18:49:26 +00:00
Keith Kanios
48af17738c
Fixed issues with REX prefix effective address generation. Fixed XMM instruction output.
2007-08-17 07:37:52 +00:00
Keith Kanios
e5b47ab1c8
Changed MMXREG and XMMREG flags to help resolve invalid REX prefix generation for MMX instructions.
2007-08-17 02:03:10 +00:00
H. Peter Anvin
5b0e3eca28
More int/int32_t confusion
2007-07-07 02:01:08 +00:00
H. Peter Anvin
0ec60e69d9
regflag() should return int32_t.
2007-07-07 01:59:52 +00:00
H. Peter Anvin
52daec56f9
Detect missing <inttypes.h> and include ersatz version if missing
2007-06-21 19:00:12 +00:00
H. Peter Anvin
fa87e1a088
inttypes.h: for older preprocessors, specify L and LL as appropriate
2007-06-21 06:24:23 +00:00
H. Peter Anvin
0f9cdb2a59
inttypes.h: Fix spelling of SHRT_MAX
2007-06-21 06:20:43 +00:00
H. Peter Anvin
272b6c7295
inttypes.h: do a single ersatz <inttypes.h> based on <limits.h>
2007-06-21 06:15:42 +00:00
Chuck Crayne
42fe6ce765
Support 32-bit direct addressing in 64-bit mode without base or index regs
2007-06-03 02:42:41 +00:00
H. Peter Anvin
ca9f626ba8
Fix the [U]INT*_C() creation macros
...
The [U]INT*_C() macros were broken, because ## takes precedence over
macro resolution.
2007-06-02 02:26:21 +00:00
H. Peter Anvin
f209f7b1e8
For platforms that don't have them, provide <inttypes.h> for common models.
...
Apparently, some platforms (*cough* MSVC *cough*) haven't figured out what
year it is and are behind the curve. Provide <inttypes.h> for common
memory models. We can add more if there are odd platforms which don't
have "long long" for 64 bits, too.
2007-06-02 00:05:35 +00:00
H. Peter Anvin
ce2b397f1e
Fix the handling of the \313 code.
...
\313 indicates a fixed 64-bit address size. It was incorrectly
documented and incorrectly implemented in the assembler, and was
unimplemented in the disassembler.
2007-05-30 22:21:11 +00:00
H. Peter Anvin
021993cf64
Machine-generated \321->\324 corrections
...
Use a script to find \321's that should be \324's. This is not in any
way guaranteed to be an exhaustive list, however, I have manually verified
that all the items that *were* changed *should* be changed.
2007-05-30 22:20:01 +00:00
Frank Kotler
6000b34929
update "version" to 0.99.02
2007-05-30 21:22:33 +00:00
H. Peter Anvin
c6be66fa20
Correct the generation of 67 prefixes.
...
The recent switch from register numbers (with -1 meaning "none") to
register flags (with 0 meaning "none") broke the generation of 67
prefixes, especially in 64-bit mode.
2007-05-30 20:30:15 +00:00