Commit Graph

68 Commits

Author SHA1 Message Date
H. Peter Anvin
48f7a93c0a Add the GETSEC instruction for Intel SMX 2007-09-22 19:05:11 -07:00
H. Peter Anvin
4ca9d78c5f Add the AMD SSE4a and LZCNT instructions
Add AMD SSE4a and LZCNT
2007-09-22 18:59:18 -07:00
H. Peter Anvin
57f38cdc0b Tag UMOV as ND (no disassembly) to avoid collision
The UMOV opcodes have been recycled; tag UMOV as ND until we have a
better way to specify to the disassembler exactly how it wants
instructions interpreted.
2007-09-22 18:23:20 -07:00
H. Peter Anvin
510a2508e6 Merge commit 'origin/master' into sse5 2007-09-18 15:43:40 -07:00
H. Peter Anvin
eef59fc328 Add NOP with argument to the instruction list
0F 1F /0 is documented as an EA-taking NOP since the P6.
0F 18..1F + EA are all "hinting nops" (instructions which, when
unimplemented, have no effect rather than #UD) but 0F 1F /0
specifically has no operation whatsoever.
2007-09-18 15:43:08 -07:00
H. Peter Anvin
41c9f6fde0 Implement "oword" (128 bits) as a first-class size
Implement oword, reso, do, as well as the SO flag to instructions.  No
instructions are actually flagged with SO yet, but this allows us to
specify 128-bit sizes in instruction patterns.
2007-09-18 13:01:32 -07:00
H. Peter Anvin
3ce3715fba SSE5 instruction table
Implement the full SSE5 instruction table.
2007-09-18 12:23:21 -07:00
H. Peter Anvin
0a80739c46 insns.dat: All SSE5 instructions are AMD
SSE5 is an AMD-defined instruction set, so tag those AMD.
2007-09-17 17:27:46 -07:00
H. Peter Anvin
cf5180a955 Actually generate SSE5 instructions
This checkin completes what is required to actually generate SSE5
instructions.  No support in the disassembler yet.

This checkin covers:

- Support for actually generating DREX prefixes.
- Support for matching operand "operand X must match Y"
2007-09-17 17:25:27 -07:00
H. Peter Anvin
18b78815b9 Merge commit 'origin/master' into sse5 2007-09-17 15:49:53 -07:00
H. Peter Anvin
7eb4a38793 Initial support for four arguments per instruction
For SSE5, we will need to support four arguments per instruction.
2007-09-17 15:49:30 -07:00
H. Peter Anvin
2dba5c218d CLFLUSH: Neither an x64 instruction nor AMD
CLFLUSH was introduced at least in Katmai, if not sooner.  It's
available in all modes.
2007-09-17 15:48:32 -07:00
H. Peter Anvin
388b3ab3a3 Fix literal F2 and F3 prefixes
Correct literal F2 and F3 prefixes and instead use \332 and \333.
Otherwise we get the REX prefixes in the wrong place.
2007-09-12 22:02:06 -07:00
H. Peter Anvin
cb9b690ae6 Add (untested!) SSSE3, SSE4.1, SSE4.2 instructions
Add the SSSE3, SSE4.1 and SSE4.2 instruction sets.  Change \332 to be
a literal 0xF2 prefix, by analog with \333 for 0xF3 prefix (the
previous \332 flag changed to \335).  This is necessary to get the REX
prefix in the right place for instructions that use it.

We are going to have to go in and change existing instruction patterns
which use these, as well.
2007-09-12 21:58:51 -07:00
H. Peter Anvin
daffd79372 Add support for Tejas New Instructions (SSSE3)
Add the SSSE3 instruction set.
2007-09-12 21:06:36 -07:00
H. Peter Anvin
d105682096 Remove $Id$ tags (useless with git)
Remove CVS $Id$ tags, since git doesn't use them.
2007-09-12 21:05:06 -07:00
H. Peter Anvin
c9f8ee92f0 Use rm32 operands for VMREAD/VMWRITE
Use rm32 instead of coding reg32 and mem32 separately.
2007-09-12 21:04:58 -07: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
53a3c687dd Fix some MMX/SSE irregularities which interact with the 64-bit support 2007-09-02 16:37:03 +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
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
H. Peter Anvin
06bf8db596 More \321 -> \324
More \321 that should be \324...
2007-05-30 03:44:50 +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
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
56e3528b4a Fixed long mode MEM_OFFS issue. 2007-04-16 14:05:01 +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
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
e2eb92d055 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.
2007-04-15 23:09:23 +00:00
Keith Kanios
b7a89544d0 General push for x86-64 support, dubbed 0.99.00. 2007-04-12 02:40:54 +00:00
Eric Christopher
aa348dec7d Add VMX instructions. 2006-03-02 18:35:09 +00:00
H. Peter Anvin
cd342f0f7e STR also has SMSW/SLDT-like semantics for operand size 2003-09-02 21:38:48 +00:00
H. Peter Anvin
539f81d517 SMSW and SLDT are implicitly 16 bits when accessing memory, but can set
the upper part of a 16-bit register if used with a 32-bit register
argument.
2003-08-27 21:25:44 +00:00
H. Peter Anvin
eea289f908 Add Cyrix XSTORE 2003-03-12 04:57:51 +00:00
H. Peter Anvin
10101f26bc Add support for the new instructions in Prescott 2003-02-24 23:22:45 +00:00
Frank Kotler
761c5cc5d3 bugfixes to insns.dat pmovhps, pmovlps, sysexit 2003-02-04 17:13:49 +00:00
H. Peter Anvin
08a3377059 Fix bug 615409 (UNPCKHPD xmmreg,mem not vice versa) 2002-11-08 20:18:51 +00:00
Debbie Wiles
0fde2f574e Removed unnecessary address size flags from register only versions of instructions 2002-06-07 07:12:49 +00:00
H. Peter Anvin
232badbbbc This is the "megapatch":
a) Automatically generate dependencies for all Makefiles;
b) Move register definitions to a separate .dat file;
c) Add support for "unimplemented but there in theory" registers.
2002-06-06 02:41:20 +00:00
H. Peter Anvin
3ab8de6a14 Add the JMPE instruction. 2002-05-28 01:25:06 +00:00
H. Peter Anvin
3ba467795a Deal with another case of address/operand size confusion, BR 560873 2002-05-27 23:19:35 +00:00
Debbie Wiles
d71fe8ec11 *** empty log message *** 2002-05-10 23:07:02 +00:00
Debbie Wiles
1c7da40456 *** empty log message *** 2002-05-09 21:23:55 +00:00
H. Peter Anvin
10eb0c3e47 Processor level fixes from John Coffman 2002-05-09 20:55:50 +00:00
H. Peter Anvin
8ac364139a NASM 0.98.30 2002-04-30 21:09:12 +00:00
H. Peter Anvin
9a633fa3b9 NASM 0.98.25alt 2002-04-30 21:08:11 +00:00
H. Peter Anvin
9f39464e5b NASM 0.98.25 2002-04-30 21:07:51 +00:00
H. Peter Anvin
dce1e2f795 NASM 0.98.23 2002-04-30 21:06:37 +00:00
H. Peter Anvin
09f6acbb75 NASM 0.98.21 2002-04-30 21:05:55 +00:00