platform/upstream/nasm.git
17 years agoFix some MMX/SSE irregularities which interact with the 64-bit support
H. Peter Anvin [Sun, 2 Sep 2007 16:37:03 +0000 (16:37 +0000)]
Fix some MMX/SSE irregularities which interact with the 64-bit support

17 years agophash.ph: yet another attempt at getting Perl to behave, arithmetically
H. Peter Anvin [Sun, 2 Sep 2007 14:46:00 +0000 (14:46 +0000)]
phash.ph: yet another attempt at getting Perl to behave, arithmetically

17 years agoSimple 64-bit org test
H. Peter Anvin [Sun, 2 Sep 2007 06:23:29 +0000 (06:23 +0000)]
Simple 64-bit org test

17 years agophash.ph: remove some stale code
H. Peter Anvin [Sun, 2 Sep 2007 06:20:15 +0000 (06:20 +0000)]
phash.ph: remove some stale code

Remove old randomization code which is no longer used.

17 years agoForce use of integer values for generating hash keys.
Chuck Crayne [Sun, 2 Sep 2007 01:00:34 +0000 (01:00 +0000)]
Force use of integer values for generating hash keys.

17 years agophash: don't rely on the build platform Perl version of rand()
H. Peter Anvin [Fri, 31 Aug 2007 18:10:23 +0000 (18:10 +0000)]
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.

17 years agotokhash.pl: formatting changes for readability
H. Peter Anvin [Fri, 31 Aug 2007 07:31:51 +0000 (07:31 +0000)]
tokhash.pl: formatting changes for readability

No functional change

17 years agotokhash: Speed up the rejection of unhashed values
H. Peter Anvin [Fri, 31 Aug 2007 07:23:31 +0000 (07:23 +0000)]
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().

17 years agotokhash.pl: "ix" should have the same width as the "hash" arrays
H. Peter Anvin [Fri, 31 Aug 2007 06:06:17 +0000 (06:06 +0000)]
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.

17 years agoAdd "do not edit" comment to tokhash.c
H. Peter Anvin [Fri, 31 Aug 2007 00:28:35 +0000 (00:28 +0000)]
Add "do not edit" comment to tokhash.c

17 years agoMake the token hash a bit smaller by using 16-bit hash tables
H. Peter Anvin [Fri, 31 Aug 2007 00:23:40 +0000 (00:23 +0000)]
Make the token hash a bit smaller by using 16-bit hash tables

17 years agoMinor cleanup; remove duplication of names.c
H. Peter Anvin [Fri, 31 Aug 2007 00:16:10 +0000 (00:16 +0000)]
Minor cleanup; remove duplication of names.c

17 years agophash.ph: use a bipartite graph to reduce the storage requirements
H. Peter Anvin [Thu, 30 Aug 2007 23:42:39 +0000 (23:42 +0000)]
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.

17 years agoFinishing touches on perfect hash tokenizer; actually turn the thing on
H. Peter Anvin [Thu, 30 Aug 2007 22:35:34 +0000 (22:35 +0000)]
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.

17 years agoMakefile rule for tokhash.c
H. Peter Anvin [Thu, 30 Aug 2007 21:50:20 +0000 (21:50 +0000)]
Makefile rule for tokhash.c

17 years agotokens.dat: Data file containing alphanumeric tokens not in other .dats
H. Peter Anvin [Thu, 30 Aug 2007 21:47:46 +0000 (21:47 +0000)]
tokens.dat: Data file containing alphanumeric tokens not in other .dats

17 years agoGenerate a perfect hash for the token parser
H. Peter Anvin [Thu, 30 Aug 2007 21:45:56 +0000 (21:45 +0000)]
Generate a perfect hash for the token parser

17 years agoFix bugs in repeated suffix handling, which led to missing r8d/r8w/r8d
H. Peter Anvin [Thu, 30 Aug 2007 21:40:08 +0000 (21:40 +0000)]
Fix bugs in repeated suffix handling, which led to missing r8d/r8w/r8d

17 years agophash.ph: more powerful prehashing
H. Peter Anvin [Thu, 30 Aug 2007 21:39:37 +0000 (21:39 +0000)]
phash.ph: more powerful prehashing

17 years agoMake the perfect hash generator an includable module
H. Peter Anvin [Thu, 30 Aug 2007 20:15:25 +0000 (20:15 +0000)]
Make the perfect hash generator an includable module

17 years agoCorrect the logic for recording fs: and gs: overrides.
H. Peter Anvin [Wed, 29 Aug 2007 20:30:31 +0000 (20:30 +0000)]
Correct the logic for recording fs: and gs: overrides.

17 years agoGenerate R_X86_64_64 relocations in elf64 output
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.

17 years agoAdd README file
H. Peter Anvin [Wed, 29 Aug 2007 17:24:03 +0000 (17:24 +0000)]
Add README file

17 years agoCreate a Perl library directory, and add the Graph module to it
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

17 years agoPerfect hash generator, as a perl script
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.

17 years agoUse standard macro for the default directive
H. Peter Anvin [Wed, 29 Aug 2007 16:41:43 +0000 (16:41 +0000)]
Use standard macro for the default directive

17 years agoAdd standard macro for [default] directive
H. Peter Anvin [Wed, 29 Aug 2007 16:40:26 +0000 (16:40 +0000)]
Add standard macro for [default] directive

17 years agoMore test cases for rel and abs addressing
H. Peter Anvin [Wed, 29 Aug 2007 16:38:47 +0000 (16:38 +0000)]
More test cases for rel and abs addressing

17 years agoAdd [default] directive
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.

17 years agonasmlib: add bsii() case-insensitive version of bsi()
H. Peter Anvin [Wed, 29 Aug 2007 16:25:46 +0000 (16:25 +0000)]
nasmlib: add bsii() case-insensitive version of bsi()

17 years agoAdd test cases for IP-relative addressing
H. Peter Anvin [Wed, 29 Aug 2007 15:49:53 +0000 (15:49 +0000)]
Add test cases for IP-relative addressing

17 years agoSuppress IP-relative only for fs: and gs: overrides
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

17 years agoImplement REL/ABS modifiers
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.

17 years agoattempt to make static makefiles aware of outelf32/outelf64
Frank Kotler [Sun, 26 Aug 2007 05:51:39 +0000 (05:51 +0000)]
attempt to make static makefiles aware of outelf32/outelf64

17 years agoadd nasm_strsep to nasmlib, for output/outmacho.c - strtok doesn't work
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

17 years agoremove "#include <unistd.h> from rdoff directory - two places - it annoyed Windows...
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

17 years agofinally commit Mike Frysinger's "elf-visibility" patch
Frank Kotler [Sun, 26 Aug 2007 05:10:24 +0000 (05:10 +0000)]
finally commit Mike Frysinger's "elf-visibility" patch

17 years agoregs.pl: handle dashed sequences with suffixes
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].

17 years agosync.c: change ULONG_MAX to UINT32_MAX
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.

17 years agoAdd _MIN and _MAX macros for the fixed-size types.
H. Peter Anvin [Mon, 20 Aug 2007 20:09:11 +0000 (20:09 +0000)]
Add _MIN and _MAX macros for the fixed-size types.

17 years agoldrdf: cast output of sizeof() before passing to printf(), to avoid warning.
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.

17 years agoFixed RIP address processing ambiguity found by Charles Crayne.
Keith Kanios [Sun, 19 Aug 2007 18:49:26 +0000 (18:49 +0000)]
Fixed RIP address processing ambiguity found by Charles Crayne.

17 years agoFixed issues with REX prefix effective address generation. Fixed XMM instruction...
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.

17 years agoChanged MMXREG and XMMREG flags to help resolve invalid REX prefix generation for...
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.

17 years agoMore int/int32_t confusion
H. Peter Anvin [Sat, 7 Jul 2007 02:01:08 +0000 (02:01 +0000)]
More int/int32_t confusion

17 years agoregflag() should return int32_t.
H. Peter Anvin [Sat, 7 Jul 2007 01:59:52 +0000 (01:59 +0000)]
regflag() should return int32_t.

17 years agoDetect missing <inttypes.h> and include ersatz version if missing
H. Peter Anvin [Thu, 21 Jun 2007 19:00:12 +0000 (19:00 +0000)]
Detect missing <inttypes.h> and include ersatz version if missing

17 years agointtypes.h: for older preprocessors, specify L and LL as appropriate
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

17 years agointtypes.h: Fix spelling of SHRT_MAX
H. Peter Anvin [Thu, 21 Jun 2007 06:20:43 +0000 (06:20 +0000)]
inttypes.h: Fix spelling of SHRT_MAX

17 years agointtypes.h: do a single ersatz <inttypes.h> based on <limits.h>
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>

17 years agoSupport 32-bit direct addressing in 64-bit mode without base or index regs
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

17 years agoFix the [U]INT*_C() creation macros
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.

17 years agoFor platforms that don't have them, provide <inttypes.h> for common models.
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.

17 years agoFix the handling of the \313 code.
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.

17 years agoMachine-generated \321->\324 corrections
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.

17 years agoupdate "version" to 0.99.02
Frank Kotler [Wed, 30 May 2007 21:22:33 +0000 (21:22 +0000)]
update "version" to 0.99.02

17 years agoCorrect the generation of 67 prefixes.
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.

17 years agoUpdate dependencies.
H. Peter Anvin [Wed, 30 May 2007 18:30:18 +0000 (18:30 +0000)]
Update dependencies.

17 years agoupdate cvs server name in misc/release script
Frank Kotler [Wed, 30 May 2007 16:34:29 +0000 (16:34 +0000)]
update cvs server name in misc/release script

17 years agoAvoid magic values; we have more than 124 registers now
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.

17 years agoRemove bogus redundant tests
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.

17 years agoMore \321 -> \324
H. Peter Anvin [Wed, 30 May 2007 03:44:50 +0000 (03:44 +0000)]
More \321 -> \324

More \321 that should be \324...

17 years agoRemove bogus check for 64-bitness
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.

17 years agoGet rid of magic open-coded "register numbers"
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.

17 years agoMOV reg64,reg64 takes \324 (64 bit with REX) not \321 (32 bit)
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)

17 years agoRename REGNORM to REG_EA
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.

17 years agoMore instruction flag surgery
H. Peter Anvin [Wed, 30 May 2007 00:15:25 +0000 (00:15 +0000)]
More instruction flag surgery

17 years agoMore cleanup of operand flags/register classes
H. Peter Anvin [Wed, 30 May 2007 00:05:00 +0000 (00:05 +0000)]
More cleanup of operand flags/register classes

17 years agoClean up the existing operand flag definitions, and document
H. Peter Anvin [Tue, 29 May 2007 23:57:12 +0000 (23:57 +0000)]
Clean up the existing operand flag definitions, and document

17 years agoRun "make alldeps"
H. Peter Anvin [Tue, 29 May 2007 21:44:55 +0000 (21:44 +0000)]
Run "make alldeps"

17 years agoupdate version number to 0.99.01
Frank Kotler [Thu, 24 May 2007 22:33:07 +0000 (22:33 +0000)]
update version number to 0.99.01

17 years agoregs.dat: fix comment
H. Peter Anvin [Tue, 15 May 2007 04:33:43 +0000 (04:33 +0000)]
regs.dat: fix comment

17 years ago16-bit relocations are standard in ELF64 (at my request, incidentally)
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)

17 years agoAddition of elf32 and elf64 output formats.
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.

17 years agoAllow '!' to be used in expressions with same meaning as in C.
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.

17 years agoAdd %IFN and %ELIFN as per RFE #786286
Chuck Crayne [Wed, 2 May 2007 01:59:16 +0000 (01:59 +0000)]
Add %IFN and %ELIFN as per RFE #786286

17 years agoAccept responsibility for support of outelf64.c
Chuck Crayne [Mon, 30 Apr 2007 22:26:58 +0000 (22:26 +0000)]
Accept responsibility for support of outelf64.c

17 years agoClarify comments about relocation entries.
Chuck Crayne [Sun, 29 Apr 2007 20:57:53 +0000 (20:57 +0000)]
Clarify comments about relocation entries.

17 years agoAllow ELF32 to be invoked either as -f elf or -f elf32
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

17 years agoEliminate shift count warnings when building on 32-bit systems
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

17 years agoInitial support for ELF64
Chuck Crayne [Sat, 28 Apr 2007 06:18:48 +0000 (06:18 +0000)]
Initial support for ELF64

17 years agoFix the handling of \324 for computing the length
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.

17 years agoFixed RDF/2 to comply with "maxbits" use.
Keith Kanios [Wed, 18 Apr 2007 02:24:34 +0000 (02:24 +0000)]
Fixed RDF/2 to comply with "maxbits" use.

17 years agoHandle "LOCK as REX.R" for MOV CRx; fix warning for invalid 64-bit regs
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.

17 years agoMEM_OFFSET Instructions Fixed.
Keith Kanios [Mon, 16 Apr 2007 18:16:46 +0000 (18:16 +0000)]
MEM_OFFSET Instructions Fixed.

17 years agoFixed 64-bit Mode Segment Selection.
Keith Kanios [Mon, 16 Apr 2007 15:46:46 +0000 (15:46 +0000)]
Fixed 64-bit Mode Segment Selection.

17 years agoFixed distinction between [LOCAL]SYMBOL/IMMEDIATE for RIP-relative addressing.
Keith Kanios [Mon, 16 Apr 2007 14:31:54 +0000 (14:31 +0000)]
Fixed distinction between [LOCAL]SYMBOL/IMMEDIATE for RIP-relative addressing.

17 years agoFixed long mode MEM_OFFS issue.
Keith Kanios [Mon, 16 Apr 2007 14:05:01 +0000 (14:05 +0000)]
Fixed long mode MEM_OFFS issue.

17 years agoFilled in all RIP Register Flags.
Keith Kanios [Mon, 16 Apr 2007 13:54:49 +0000 (13:54 +0000)]
Filled in all RIP Register Flags.

17 years agoMore \321 -> \324 for 64-bit instructions
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.

17 years agoFixed 64-bit offset generation.
Keith Kanios [Mon, 16 Apr 2007 04:56:06 +0000 (04:56 +0000)]
Fixed 64-bit offset generation.

17 years agoMore 64-bit ndisasm fixes.
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.

17 years agoFixes for 64-bit ndisasm.
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.

17 years agoUse + instead of * for extension; it feels cleaner with the new meaning.
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.

17 years agoInitial 64-bit support for ndisasm. Still a work in progress.
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.

17 years agoClean up the 64-bitification of regs.dat for 64-bit ndisasm support
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.

17 years agoRemove @GCCFLAGS@
H. Peter Anvin [Sun, 15 Apr 2007 23:10:26 +0000 (23:10 +0000)]
Remove @GCCFLAGS@

Remove the now obsolete @GCCFLAGS@.

17 years agoCR8 is not special in any way as far as the assembler is concerned.
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.

17 years agoGet rid of @GCCFLAGS@
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@.

17 years agoCleaner way to add gcc options
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.