Coder64 Edition X86 Opcode and Instruction Reference 1.12
Coder64 Edition X86 Opcode and Instruction Reference 1.12
html
Printing is not enabled. You can order a printed copy in the store, or get access to benefits, which include also printable HTML and PDF files.
General notes:
1. 90 NOP
a. 90 NOP is not really aliased to XCHG eAX, eAX instruction. This is important in 64-bit mode where the implicit zero-extension to RAX does
not happen
2. LAHF, SAHF
a. Invalid on early steppings of EM64T architecture; that's why they need CPUID.80000001H:ECX.LAHF-SAHF[bit 0]
3. SAL
a. sandpile.org -- IA-32 architecture -- opcode groups
4. D6 and F1 opcodes
a. Intel 64 and IA-32 Architecture Software Developer's Manual Volume 3: System Programming Guide, Interrupt and Exception Handling
5. FSTP1
a. Christian Ludloff wrote: “While FSTP (D9 /3, mod < 11b), FSTP8 (DF /2, mod = 11b), and FSTP9 (DF /3, mod = 11b) do signal stack
underflow, FSTP1 (D9 /3, mod = 11b) does not.”
6. FNENI and FNDISI
a. INTEL 80287 PROGRAMMER'S REFERENCE MANUAL 1987, Processor Control Instructions: “The 8087 instructions FENI and FDISI
perform no function in the 80287. If these opcodes are detected in an 80286/80287 instruction stream, the 80287 will perform no specific
operation and no internal states will be affected.”
7. FNSETPM
a. INTEL 80387 PROGRAMMER'S REFERENCE MANUAL 1987, 6.1.2 Independent of CPU Addressing Modes: “Unlike the 80287, the 80387
is not sensitive to the addressing and memory management of the CPU. The 80387 operates the same regardless of whether the 80386 CPU is
operating in real-address mode, in protected mode, or in virtual 8086 mode.”
8. FFREEP
a. INTEL 80287 PROGRAMMER'S REFERENCE MANUAL 1987, Table A-2. Machine Instruction Decoding Guide: “If the 80287 encounters
one of these encodings (DF /1, mod = 11b) in the instruction stream, it will execute it as follows: FFREE ST(i) and pop stack”
b. Intel Architecture Optimization Reference Manual PIII, Table C-1 Pentium II and Pentium III Processors Instruction to Decoder Specification
c. AMD Athlon Processor x86 Code Optimization Guide, Chapter 9, Use FFREEP Macro to Pop One Register from the FPU Stack
d. sandpile.org -- IA-32 architecture -- ESC (FP) opcodes
9. X87 aliases
a. sandpile.org -- IA-32 architecture -- ESC (FP) opcodes
10. INT1, ICEBP
a. sandpile.org -- IA-32 architecture -- one byte opcodes
b. AMD64 Architecture Programmer's Manual Volume 3, Table One-Bytes Opcodes
c. Christian Ludloff wrote: “Unlike INT 1 (CDh,01h), INT1 (F1h) doesn't perform the IOPL or DPL check and it can't be redirected via the
TSS32.IRB.”
11. REP prefixes
a. Flags aren't updated until after the last iteration to make the operation faster
12. TEST
a. sandpile.org -- IA-32 architecture -- opcode groups
b. Christian Ludloff wrote: “While the latest Intel manuals still omit this de-facto standard, the recent x86-64 manuals from AMD document it.”
c. AMD64 Architecture Programmer's Manual Volume 3, Table One-Byte and Two-Byte Opcode ModRM Extensions
13. CALLF, JMPF
a. AMD64 Architecture Programmer's Manual Volume 3: “If the operand-size is 32 or 64 bits, the operand is a 16-bit selector followed by a 32-bit
offset.” (On AMD64 architecture, 64-bit offset is not supported)
14. SMSW r32/64
a. Some processors support reading whole CR0 register, causing a security flaw.
15. SYSCALL
a. On AMD64 architecture, SYSCALL is valid also in legacy mode
16. 0F0D NOP
a. Intel 64 and IA-32 Architecture Software Developer's Manual Volume 2B: Instruction Set Reference, N-Z, Two-byte Opcode Map
b. AMD architecture maps 3DNow! PREFETCH instructions here
17. Hintable NOP
a. See U.S. Patent 5,701,442
b. sandpile.org -- IA-32 architecture -- opcode groups
18. MOV from/to CRn, DRn, TRn
a. Christian Ludloff wrote: “For the MOVs from/to CRx/DRx/TRx, mod=00b/01b/10b is aliased to 11b.”
b. AMD64 Architecture Programmer's Manual Volume 3, System Instruction Reference: “This instruction is always treated as a register-to-register
instruction, regardless of the encoding of the MOD field in the MODR/M byte.”
19. SYSENTER
a. On AMD64 architecture, SYSENTER is valid only in legacy mode.
20. SYSEXIT
a. On AMD64 architecture, SYSEXIT is not valid in long mode.
1 of 4 11/22/2022, 7:33 PM
coder64 edition | X86 Opcode and Instruction Reference 1.12 http://ref.x86asm.net/coder64.html
1. rFlags.IOPL
2. CR4.TSD[bit 2]
3. CR4.PCE[bit 8]
2 of 4 11/22/2022, 7:33 PM
coder64 edition | X86 Opcode and Instruction Reference 1.12 http://ref.x86asm.net/coder64.html
3 of 4 11/22/2022, 7:33 PM
coder64 edition | X86 Opcode and Instruction Reference 1.12 http://ref.x86asm.net/coder64.html
Your Notes:
4 of 4 11/22/2022, 7:33 PM