474 Commits

Author SHA1 Message Date
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
H. Peter Anvin
ff69805feb Update dependencies. 2007-05-30 18:30:18 +00:00
Frank Kotler
f20f692156 update cvs server name in misc/release script nasm-0.99.01 2007-05-30 16:34:29 +00:00
H. Peter Anvin
a1abb32004 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.
2007-05-30 04:28:50 +00:00
H. Peter Anvin
34539fb1ed 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.
2007-05-30 04:27:58 +00:00
H. Peter Anvin
06bf8db596 More \321 -> \324
More \321 that should be \324...
2007-05-30 03:44:50 +00:00
H. Peter Anvin
a57e8d411a 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.
2007-05-30 03:44:02 +00:00
H. Peter Anvin
3df97a7270 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.
2007-05-30 03:25:21 +00:00
H. Peter Anvin
1cf9c9d3ab MOV reg64,reg64 takes \324 (64 bit with REX) not \321 (32 bit) 2007-05-30 02:48:51 +00:00
H. Peter Anvin
dbf130e681 Rename REGNORM to REG_EA
Rename REGNORM to REG_EA to make the distinction between REG_GPR and
REG_EA clearer.
2007-05-30 00:18:26 +00:00
H. Peter Anvin
1ffbd70af0 More instruction flag surgery 2007-05-30 00:15:25 +00:00
H. Peter Anvin
edb1428239 More cleanup of operand flags/register classes 2007-05-30 00:05:00 +00:00
H. Peter Anvin
5a640e1161 Clean up the existing operand flag definitions, and document 2007-05-29 23:57:12 +00:00
H. Peter Anvin
7a83374a9c Run "make alldeps" 2007-05-29 21:44:55 +00:00
Frank Kotler
d528759e72 update version number to 0.99.01 2007-05-24 22:33:07 +00:00
H. Peter Anvin
fb658ae61b regs.dat: fix comment 2007-05-15 04:33:43 +00:00
H. Peter Anvin
90b9417613 16-bit relocations are standard in ELF64 (at my request, incidentally) 2007-05-04 18:47:16 +00:00
Chuck Crayne
b7eea1c940 Addition of elf32 and elf64 output formats.
Addition of ! as unary operator in expression evaluation.
Allow numeric constants in DQ directive.
2007-05-04 02:16:08 +00:00
Chuck Crayne
cb9bc21374 Allow '!' to be used in expressions with same meaning as in C. 2007-05-02 04:21:26 +00:00
Chuck Crayne
60ae75d3ab Add %IFN and %ELIFN as per RFE #786286 2007-05-02 01:59:16 +00:00
Chuck Crayne
45ef7e76ee Accept responsibility for support of outelf64.c 2007-04-30 22:26:58 +00:00
Chuck Crayne
8ab0320f02 Clarify comments about relocation entries. 2007-04-29 20:57:53 +00:00
Chuck Crayne
1c270b7fe2 Allow ELF32 to be invoked either as -f elf or -f elf32 2007-04-29 00:28:24 +00:00
Chuck Crayne
6e61733e38 Eliminate shift count warnings when building on 32-bit systems
Remove define for DEBUG
2007-04-28 22:18:04 +00:00
Chuck Crayne
26d3de3217 Initial support for ELF64 2007-04-28 06:18:48 +00:00
H. Peter Anvin
8d7316a3ff 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.
2007-04-18 02:27:18 +00:00
Keith Kanios
7295e9856d Fixed RDF/2 to comply with "maxbits" use. 2007-04-18 02:24:34 +00:00
H. Peter Anvin
0db11e236b 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.
2007-04-17 20:23:11 +00:00
Keith Kanios
fd626d6770 MEM_OFFSET Instructions Fixed. 2007-04-16 18:16:46 +00:00
Keith Kanios
fd5d91383a Fixed 64-bit Mode Segment Selection. 2007-04-16 15:46:46 +00:00
Keith Kanios
e83b318017 Fixed distinction between [LOCAL]SYMBOL/IMMEDIATE for RIP-relative addressing. 2007-04-16 14:31:54 +00:00
Keith Kanios
56e3528b4a Fixed long mode MEM_OFFS issue. 2007-04-16 14:05:01 +00:00
Keith Kanios
76a83979d8 Filled in all RIP Register Flags. 2007-04-16 13:54:49 +00:00
H. Peter Anvin
ed45f4c6f2 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.
2007-04-16 05:26:29 +00:00
Keith Kanios
7a68f30dd7 Fixed 64-bit offset generation. 2007-04-16 04:56:06 +00:00
H. Peter Anvin
7cf03aff4f More 64-bit ndisasm fixes.
In particular, now we should handle A0-A3 instructions.
2007-04-16 02:39:56 +00:00
H. Peter Anvin
b061d595fb 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.
2007-04-16 02:02:06 +00:00
H. Peter Anvin
88aa185d36 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.
2007-04-16 01:21:29 +00:00
H. Peter Anvin
0ee014231f 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.
2007-04-16 01:18:30 +00:00
H. Peter Anvin
99f309cc07 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.
2007-04-15 23:12:17 +00:00
H. Peter Anvin
2b8f5d2b80 Remove @GCCFLAGS@
Remove the now obsolete @GCCFLAGS@.
2007-04-15 23:10:26 +00:00