Commit Graph

280 Commits

Author SHA1 Message Date
H. Peter Anvin
415c7ced1d insns.dat: SMINT - mark ND, DMINT - fix opcode
Fix the opcode for DMINT (0F 39); mark SMINT (0F 38) as ND since 0F 38
is used as a prefix by newer processors.
2007-09-24 15:56:02 -07:00
H. Peter Anvin
2a5156b284 Additional compaction missed by script
Additional mmxreg/mem -> mmxrm and xmmreg/mem -> xmmrm compactions
which the script missed.
2007-09-24 15:48:09 -07:00
H. Peter Anvin
86317c423d insns.dat: machine-generated compaction mmx/xmmreg,mem -> mmx/xmmrm
Reduce the total instruction count by compacting mmxreg:mem pairs to
mmxrm and d:o for xmmreg:mem -> xmmrm.
2007-09-24 15:42:53 -07:00
H. Peter Anvin
fc565dd362 Implement INVLPGA according to the documentation
INVLPGA is defined as taking rax,ecx but "the portion of rax used to
form the address is determined by the effective address size", so it
is really ax/eax/rax.
2007-09-22 22:35:28 -07:00
H. Peter Anvin
438ed48c49 Reformat insns.dat to uniform column width
Add a script to reformat insns.dat to uniform width, and use it.
2007-09-22 22:02:34 -07:00
H. Peter Anvin
c5b9ce0a84 Auto-generate 0x67 prefixes without the need for \30x codes
Auto-generate 0x67 prefixes without the need for \30x codes; the
prefix is automatically added when there is a memory operand with
address size differing from the current address size (and impossible
combinations checked for.)
2007-09-22 21:49:51 -07:00
H. Peter Anvin
8fcca64a2a LDDQU needs \301 (BR 1103549) 2007-09-22 19:52:11 -07:00
H. Peter Anvin
dcb4b885d5 RDTSCP and INVLPGA aren't 64-bit specific
X64 means X86_64,LM -- long mode only.
2007-09-22 19:51:13 -07:00
H. Peter Anvin
f5c8cf0027 Cyrix GX1 instructions: BBx_RESET, CPU_READ, CPU_WRITE 2007-09-22 19:40:37 -07:00
H. Peter Anvin
763cb77c90 Centaur XSHA1, XSHA256, MONTMUL 2007-09-22 19:28:14 -07:00
H. Peter Anvin
4d283f685f Implement Centaur's XCRYPT instructions
Implement Centaur's XCRYPT instruction (RFE 825529)
2007-09-22 19:20:56 -07:00
H. Peter Anvin
83828b6ce8 Add Geode LX (AMD's Cyrix-derived core) instructions
Add Geode's instructions: DMINT, RDM, PFRCP, PFRSQRT
2007-09-22 19:13:05 -07:00
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
H. Peter Anvin
788e6c10e1 NASM 0.98.12 2002-04-30 21:02:01 +00:00
H. Peter Anvin
4cf1748e68 NASM 0.98.11 2002-04-30 21:01:38 +00:00
H. Peter Anvin
734b188090 NASM 0.98.09 2002-04-30 21:01:08 +00:00
H. Peter Anvin
1cd0e2d5bf NASM 0.98.08 2002-04-30 21:00:33 +00:00
H. Peter Anvin
af535c16cf NASM 0.98.03 2002-04-30 20:59:21 +00:00
H. Peter Anvin
41bf8002b2 NASM 0.98 2002-04-30 20:58:18 +00:00
H. Peter Anvin
ef7468f4ec NASM 0.98p7 2002-04-30 20:57:59 +00:00
H. Peter Anvin
620515ab4e NASM 0.98p6 2002-04-30 20:57:38 +00:00
H. Peter Anvin
f443eb3d0d NASM 0.98p3.6 2002-04-30 20:57:02 +00:00
H. Peter Anvin
4836e3374e NASM 0.98p3.5 2002-04-30 20:56:43 +00:00
H. Peter Anvin
b64535fd4e NASM 0.98p3.3 2002-04-30 20:55:37 +00:00
H. Peter Anvin
ce14ce6fc4 NASM 0.98p3.2 2002-04-30 20:54:58 +00:00
H. Peter Anvin
900fa5b26b NASM 0.98p3-hpa 2002-04-30 20:54:13 +00:00
H. Peter Anvin
eba20a73f2 NASM 0.98p3 2002-04-30 20:53:55 +00:00
H. Peter Anvin
76690a12ad NASM 0.96 2002-04-30 20:52:49 +00:00
H. Peter Anvin
d7ed89eac9 NASM 0.94 2002-04-30 20:52:08 +00:00
H. Peter Anvin
ea8382740d NASM 0.93 2002-04-30 20:51:53 +00:00
H. Peter Anvin
ea6e34db64 NASM 0.91 2002-04-30 20:51:32 +00:00