H. Peter Anvin [Thu, 30 Aug 2007 21:39:37 +0000 (21:39 +0000)]
phash.ph: more powerful prehashing
H. Peter Anvin [Thu, 30 Aug 2007 20:15:25 +0000 (20:15 +0000)]
Make the perfect hash generator an includable module
H. Peter Anvin [Wed, 29 Aug 2007 20:30:31 +0000 (20:30 +0000)]
Correct the logic for recording fs: and gs: overrides.
H. Peter Anvin [Wed, 29 Aug 2007 18:20:19 +0000 (18:20 +0000)]
Generate R_X86_64_64 relocations in elf64 output
When appropriate, generate R_X86_64_64 relocations in elf64 output.
H. Peter Anvin [Wed, 29 Aug 2007 17:24:03 +0000 (17:24 +0000)]
Add README file
H. Peter Anvin [Wed, 29 Aug 2007 17:20:09 +0000 (17:20 +0000)]
Create a Perl library directory, and add the Graph module to it
Graph-0.84 from CPAN
H. Peter Anvin [Wed, 29 Aug 2007 17:05:17 +0000 (17:05 +0000)]
Perfect hash generator, as a perl script
Requires the CPAN Graph module.
H. Peter Anvin [Wed, 29 Aug 2007 16:41:43 +0000 (16:41 +0000)]
Use standard macro for the default directive
H. Peter Anvin [Wed, 29 Aug 2007 16:40:26 +0000 (16:40 +0000)]
Add standard macro for [default] directive
H. Peter Anvin [Wed, 29 Aug 2007 16:38:47 +0000 (16:38 +0000)]
More test cases for rel and abs addressing
H. Peter Anvin [Wed, 29 Aug 2007 16:38:05 +0000 (16:38 +0000)]
Add [default] directive
Add the [default {abs|rel}] directive, and clean up directive parsing.
H. Peter Anvin [Wed, 29 Aug 2007 16:25:46 +0000 (16:25 +0000)]
nasmlib: add bsii() case-insensitive version of bsi()
H. Peter Anvin [Wed, 29 Aug 2007 15:49:53 +0000 (15:49 +0000)]
Add test cases for IP-relative addressing
H. Peter Anvin [Wed, 29 Aug 2007 15:19:19 +0000 (15:19 +0000)]
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
H. Peter Anvin [Tue, 28 Aug 2007 23:06:00 +0000 (23:06 +0000)]
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.
Frank Kotler [Sun, 26 Aug 2007 05:51:39 +0000 (05:51 +0000)]
attempt to make static makefiles aware of outelf32/outelf64
Frank Kotler [Sun, 26 Aug 2007 05:48:54 +0000 (05:48 +0000)]
add nasm_strsep to nasmlib, for output/outmacho.c - strtok doesn't work
Frank Kotler [Sun, 26 Aug 2007 05:41:33 +0000 (05:41 +0000)]
remove "#include <unistd.h> from rdoff directory - two places - it annoyed Windows users and seems unneeded
Frank Kotler [Sun, 26 Aug 2007 05:10:24 +0000 (05:10 +0000)]
finally commit Mike Frysinger's "elf-visibility" patch
H. Peter Anvin [Mon, 20 Aug 2007 21:03:14 +0000 (21:03 +0000)]
regs.pl: handle dashed sequences with suffixes
Handle dashed sequences with suffixes. Use that for r8-r15[bwd].
H. Peter Anvin [Mon, 20 Aug 2007 20:10:04 +0000 (20:10 +0000)]
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.
H. Peter Anvin [Mon, 20 Aug 2007 20:09:11 +0000 (20:09 +0000)]
Add _MIN and _MAX macros for the fixed-size types.
H. Peter Anvin [Mon, 20 Aug 2007 20:02:17 +0000 (20:02 +0000)]
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.
Keith Kanios [Sun, 19 Aug 2007 18:49:26 +0000 (18:49 +0000)]
Fixed RIP address processing ambiguity found by Charles Crayne.
Keith Kanios [Fri, 17 Aug 2007 07:37:52 +0000 (07:37 +0000)]
Fixed issues with REX prefix effective address generation. Fixed XMM instruction output.
Keith Kanios [Fri, 17 Aug 2007 02:03:10 +0000 (02:03 +0000)]
Changed MMXREG and XMMREG flags to help resolve invalid REX prefix generation for MMX instructions.
H. Peter Anvin [Sat, 7 Jul 2007 02:01:08 +0000 (02:01 +0000)]
More int/int32_t confusion
H. Peter Anvin [Sat, 7 Jul 2007 01:59:52 +0000 (01:59 +0000)]
regflag() should return int32_t.
H. Peter Anvin [Thu, 21 Jun 2007 19:00:12 +0000 (19:00 +0000)]
Detect missing <inttypes.h> and include ersatz version if missing
H. Peter Anvin [Thu, 21 Jun 2007 06:24:23 +0000 (06:24 +0000)]
inttypes.h: for older preprocessors, specify L and LL as appropriate
H. Peter Anvin [Thu, 21 Jun 2007 06:20:43 +0000 (06:20 +0000)]
inttypes.h: Fix spelling of SHRT_MAX
H. Peter Anvin [Thu, 21 Jun 2007 06:15:42 +0000 (06:15 +0000)]
inttypes.h: do a single ersatz <inttypes.h> based on <limits.h>
Chuck Crayne [Sun, 3 Jun 2007 02:42:41 +0000 (02:42 +0000)]
Support 32-bit direct addressing in 64-bit mode without base or index regs
H. Peter Anvin [Sat, 2 Jun 2007 02:26:21 +0000 (02:26 +0000)]
Fix the [U]INT*_C() creation macros
The [U]INT*_C() macros were broken, because ## takes precedence over
macro resolution.
H. Peter Anvin [Sat, 2 Jun 2007 00:05:35 +0000 (00:05 +0000)]
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.
H. Peter Anvin [Wed, 30 May 2007 22:21:11 +0000 (22:21 +0000)]
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.
H. Peter Anvin [Wed, 30 May 2007 22:20:01 +0000 (22:20 +0000)]
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.
Frank Kotler [Wed, 30 May 2007 21:22:33 +0000 (21:22 +0000)]
update "version" to 0.99.02
H. Peter Anvin [Wed, 30 May 2007 20:30:15 +0000 (20:30 +0000)]
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.
H. Peter Anvin [Wed, 30 May 2007 18:30:18 +0000 (18:30 +0000)]
Update dependencies.
Frank Kotler [Wed, 30 May 2007 16:34:29 +0000 (16:34 +0000)]
update cvs server name in misc/release script
H. Peter Anvin [Wed, 30 May 2007 04:28:50 +0000 (04:28 +0000)]
Avoid magic values; we have more than 124 registers now
There was a magic hard-coded constant that register numbers were between
1 and 124. Well, we have about 150 registers now, and that broke.
H. Peter Anvin [Wed, 30 May 2007 04:27:58 +0000 (04:27 +0000)]
Remove bogus redundant tests
Remove tests that are bogus (they trigger for legitimate instructions.)
The failure cases are okay anyway since they will be trapped by the
REX generation logic.
H. Peter Anvin [Wed, 30 May 2007 03:44:50 +0000 (03:44 +0000)]
More \321 -> \324
More \321 that should be \324...
H. Peter Anvin [Wed, 30 May 2007 03:44:02 +0000 (03:44 +0000)]
Remove bogus check for 64-bitness
Remove a bogus check for 64-bit operands. If appropriate, we will
detect this during REX generation and will bail then. However, there
are other instructions (floating point, MMX, ...) which are legitimately
64 bits in non-64-bit mode.
H. Peter Anvin [Wed, 30 May 2007 03:25:21 +0000 (03:25 +0000)]
Get rid of magic open-coded "register numbers"
Get rid of magic open-coded register numbers. We now keep track of
a total of three different kinds of register numbers: the register
enumeration (regs.h), the x86 register value, and the register flags.
That has all the information we need.
Additionally, do massive revamping of the EA generation code and the
REX generation logic.
H. Peter Anvin [Wed, 30 May 2007 02:48:51 +0000 (02:48 +0000)]
MOV reg64,reg64 takes \324 (64 bit with REX) not \321 (32 bit)
H. Peter Anvin [Wed, 30 May 2007 00:18:26 +0000 (00:18 +0000)]
Rename REGNORM to REG_EA
Rename REGNORM to REG_EA to make the distinction between REG_GPR and
REG_EA clearer.
H. Peter Anvin [Wed, 30 May 2007 00:15:25 +0000 (00:15 +0000)]
More instruction flag surgery
H. Peter Anvin [Wed, 30 May 2007 00:05:00 +0000 (00:05 +0000)]
More cleanup of operand flags/register classes
H. Peter Anvin [Tue, 29 May 2007 23:57:12 +0000 (23:57 +0000)]
Clean up the existing operand flag definitions, and document
H. Peter Anvin [Tue, 29 May 2007 21:44:55 +0000 (21:44 +0000)]
Run "make alldeps"
Frank Kotler [Thu, 24 May 2007 22:33:07 +0000 (22:33 +0000)]
update version number to 0.99.01
H. Peter Anvin [Tue, 15 May 2007 04:33:43 +0000 (04:33 +0000)]
regs.dat: fix comment
H. Peter Anvin [Fri, 4 May 2007 18:47:16 +0000 (18:47 +0000)]
16-bit relocations are standard in ELF64 (at my request, incidentally)
Chuck Crayne [Fri, 4 May 2007 02:16:08 +0000 (02:16 +0000)]
Addition of elf32 and elf64 output formats.
Addition of ! as unary operator in expression evaluation.
Allow numeric constants in DQ directive.
Chuck Crayne [Wed, 2 May 2007 04:21:26 +0000 (04:21 +0000)]
Allow '!' to be used in expressions with same meaning as in C.
Chuck Crayne [Wed, 2 May 2007 01:59:16 +0000 (01:59 +0000)]
Add %IFN and %ELIFN as per RFE #786286
Chuck Crayne [Mon, 30 Apr 2007 22:26:58 +0000 (22:26 +0000)]
Accept responsibility for support of outelf64.c
Chuck Crayne [Sun, 29 Apr 2007 20:57:53 +0000 (20:57 +0000)]
Clarify comments about relocation entries.
Chuck Crayne [Sun, 29 Apr 2007 00:28:24 +0000 (00:28 +0000)]
Allow ELF32 to be invoked either as -f elf or -f elf32
Chuck Crayne [Sat, 28 Apr 2007 22:18:04 +0000 (22:18 +0000)]
Eliminate shift count warnings when building on 32-bit systems
Remove define for DEBUG
Chuck Crayne [Sat, 28 Apr 2007 06:18:48 +0000 (06:18 +0000)]
Initial support for ELF64
H. Peter Anvin [Wed, 18 Apr 2007 02:27:18 +0000 (02:27 +0000)]
Fix the handling of \324 for computing the length
\324 means REX.W is mandatory, but that doesn't mean add a byte to the
output! Instead, force REX.W set, and let the REX logic deal with the
length.
Keith Kanios [Wed, 18 Apr 2007 02:24:34 +0000 (02:24 +0000)]
Fixed RDF/2 to comply with "maxbits" use.
H. Peter Anvin [Tue, 17 Apr 2007 20:23:11 +0000 (20:23 +0000)]
Handle "LOCK as REX.R" for MOV CRx; fix warning for invalid 64-bit regs
- MOV gpr,CRx or MOV CRx,gpr can access high control registers with a LOCK
prefix; handle that in both the assembler and disassembler.
- Get a saner error message when trying to access high resources in
non-64-bit mode.
Keith Kanios [Mon, 16 Apr 2007 18:16:46 +0000 (18:16 +0000)]
MEM_OFFSET Instructions Fixed.
Keith Kanios [Mon, 16 Apr 2007 15:46:46 +0000 (15:46 +0000)]
Fixed 64-bit Mode Segment Selection.
Keith Kanios [Mon, 16 Apr 2007 14:31:54 +0000 (14:31 +0000)]
Fixed distinction between [LOCAL]SYMBOL/IMMEDIATE for RIP-relative addressing.
Keith Kanios [Mon, 16 Apr 2007 14:05:01 +0000 (14:05 +0000)]
Fixed long mode MEM_OFFS issue.
Keith Kanios [Mon, 16 Apr 2007 13:54:49 +0000 (13:54 +0000)]
Filled in all RIP Register Flags.
H. Peter Anvin [Mon, 16 Apr 2007 05:26:29 +0000 (05:26 +0000)]
More \321 -> \324 for 64-bit instructions
The assembler doesn't seem to care, but for the disassembler, it's
vitally important that we get our operand-size hints correctly. We
probably need to audit insns.dat for this kinds of errors.
Keith Kanios [Mon, 16 Apr 2007 04:56:06 +0000 (04:56 +0000)]
Fixed 64-bit offset generation.
H. Peter Anvin [Mon, 16 Apr 2007 02:39:56 +0000 (02:39 +0000)]
More 64-bit ndisasm fixes.
In particular, now we should handle A0-A3 instructions.
H. Peter Anvin [Mon, 16 Apr 2007 02:02:06 +0000 (02:02 +0000)]
Fixes for 64-bit ndisasm.
This fixes some of the most glaring bugs in ndisasm 64-bit mode. We're
still getting redundant prefixes for unknown reason, however.
H. Peter Anvin [Mon, 16 Apr 2007 01:21:29 +0000 (01:21 +0000)]
Use + instead of * for extension; it feels cleaner with the new meaning.
We used to use * to mean substitute in 0-7. Now it means that it should
be incremented 8 times. Using a different character feels cleaner.
H. Peter Anvin [Mon, 16 Apr 2007 01:18:30 +0000 (01:18 +0000)]
Initial 64-bit support for ndisasm. Still a work in progress.
64-bit support for ndisasm. This is very much an initial attempt, and
there are guaranteed to be bugs in the code. However, some *very*
preliminary testing seems to indicate it's not completely off-base.
H. Peter Anvin [Sun, 15 Apr 2007 23:12:17 +0000 (23:12 +0000)]
Clean up the 64-bitification of regs.dat for 64-bit ndisasm support
64-bit support required some major changes to regs.dat; clean some of
it up (re-introduce patterns, where appropriate) and allow a single
register to belong to multiple disassembly classes; also keep track
of the x86 register number again.
H. Peter Anvin [Sun, 15 Apr 2007 23:10:26 +0000 (23:10 +0000)]
Remove @GCCFLAGS@
Remove the now obsolete @GCCFLAGS@.
H. Peter Anvin [Sun, 15 Apr 2007 23:09:23 +0000 (23:09 +0000)]
CR8 is not special in any way as far as the assembler is concerned.
CR8 is not special in any way as far as the assembler is concerned. It's
listed as having a special form in the Intel documentation, but that is
only because there are no other CRs which require a REX prefix.
MOV to CR8 is special in the sense that it's a non-serializing
instruction, but that's irrelevant to the assembler.
Furthermore, it's totally unclear how TRs should be handled in long mode;
there are no CPUs which uses TRs which also have long mode, so the easiest
is to simply mark those instructions NOLONG.
Finally, add PRIV to some privileged instructions.
H. Peter Anvin [Sun, 15 Apr 2007 23:03:28 +0000 (23:03 +0000)]
Get rid of @GCCFLAGS@
Get rid of the now-obsolete @GCCFLAGS@.
H. Peter Anvin [Sun, 15 Apr 2007 22:45:25 +0000 (22:45 +0000)]
Cleaner way to add gcc options
We can actually test for the options being accepted, rather than try
to test for gcc; this handles differences between gcc versions as well
as compilers with a similar command line set.
Keith Kanios [Sun, 15 Apr 2007 22:08:30 +0000 (22:08 +0000)]
Fixed distinction between RIP relative symbols and immediate values.
H. Peter Anvin [Sun, 15 Apr 2007 05:40:43 +0000 (05:40 +0000)]
Fix the register number for CR7 (it was using the same number as CR15).
H. Peter Anvin [Sun, 15 Apr 2007 05:32:18 +0000 (05:32 +0000)]
More perl-like idioms for generating regdis.c
- Don't use an advancing counter through an array to do a push().
- An empty array is written as (), not 0.
Keith Kanios [Sun, 15 Apr 2007 01:37:13 +0000 (01:37 +0000)]
Fixed regdis.c generation.
Keith Kanios [Sat, 14 Apr 2007 18:54:52 +0000 (18:54 +0000)]
Added DQ constants for all BITS modes.
H. Peter Anvin [Sat, 14 Apr 2007 08:03:02 +0000 (08:03 +0000)]
outmacho.c: stylistic cleanups
- No need to cast (int32_t)NULL for a sentinel; just write 0.
- Fix weird formatting of a structure.
- Remove redundant parantheses.
Keith Kanios [Sat, 14 Apr 2007 03:52:05 +0000 (03:52 +0000)]
Fixed support for DQ constants in long mode.
Keith Kanios [Sat, 14 Apr 2007 03:44:31 +0000 (03:44 +0000)]
Hopefully it is actually fixed this time :P
Keith Kanios [Sat, 14 Apr 2007 01:49:07 +0000 (01:49 +0000)]
Fixed structure initialization issue.
Keith Kanios [Sat, 14 Apr 2007 01:44:35 +0000 (01:44 +0000)]
Refixed uninitialized data.
Keith Kanios [Sat, 14 Apr 2007 01:40:24 +0000 (01:40 +0000)]
Fixed uninitialized structure data.
Keith Kanios [Sat, 14 Apr 2007 01:24:14 +0000 (01:24 +0000)]
c99 printf/fprintf compliance.
Keith Kanios [Sat, 14 Apr 2007 00:46:25 +0000 (00:46 +0000)]
Placated unreferenced types.
Keith Kanios [Sat, 14 Apr 2007 00:10:59 +0000 (00:10 +0000)]
c99 printf/fprintf compliance.
Keith Kanios [Fri, 13 Apr 2007 23:09:18 +0000 (23:09 +0000)]
Added outmacho.* to static makefile.
Keith Kanios [Fri, 13 Apr 2007 22:24:46 +0000 (22:24 +0000)]
Fixed REGRIP -> RIPREG to match regs.dat.
Keith Kanios [Fri, 13 Apr 2007 22:07:53 +0000 (22:07 +0000)]
Fixed obj_fwrite() declaration to match "static" definition.
Keith Kanios [Fri, 13 Apr 2007 22:03:24 +0000 (22:03 +0000)]
Added appropriate "void" prototypes.