blob: d388de72eacaa353ba14e3340a30ef64b63bcd97 [file] [log] [blame]
Masami Hiramatsueb132962009-08-13 16:34:13 -04001# x86 Opcode Maps
2#
Masami Hiramatsua9c373d2011-12-05 21:05:57 +09003# This is (mostly) based on following documentations.
Masami Hiramatsu3e21bb02013-08-06 16:37:50 +09004# - Intel(R) 64 and IA-32 Architectures Software Developer's Manual Vol.2C
5# (#326018-047US, June 2013)
Masami Hiramatsua9c373d2011-12-05 21:05:57 +09006#
Masami Hiramatsueb132962009-08-13 16:34:13 -04007#<Opcode maps>
8# Table: table-name
9# Referrer: escaped-name
Masami Hiramatsue0e492e2009-10-27 16:42:27 -040010# AVXcode: avx-code
Masami Hiramatsueb132962009-08-13 16:34:13 -040011# opcode: mnemonic|GrpXXX [operand1[,operand2...]] [(extra1)[,(extra2)...] [| 2nd-mnemonic ...]
12# (or)
13# opcode: escape # escaped-name
14# EndTable
15#
16#<group maps>
17# GrpTable: GrpXXX
18# reg: mnemonic [operand1[,operand2...]] [(extra1)[,(extra2)...] [| 2nd-mnemonic ...]
19# EndTable
20#
Masami Hiramatsue0e492e2009-10-27 16:42:27 -040021# AVX Superscripts
Masami Hiramatsua9c373d2011-12-05 21:05:57 +090022# (v): this opcode requires VEX prefix.
23# (v1): this opcode only supports 128bit VEX.
24#
25# Last Prefix Superscripts
26# - (66): the last prefix is 0x66
27# - (F3): the last prefix is 0xF3
28# - (F2): the last prefix is 0xF2
Masami Hiramatsu436d03f2012-06-05 00:09:11 +090029# - (!F3) : the last prefix is not 0xF3 (including non-last prefix case)
Masami Hiramatsu3e21bb02013-08-06 16:37:50 +090030# - (66&F2): Both 0x66 and 0xF2 prefixes are specified.
Masami Hiramatsueb132962009-08-13 16:34:13 -040031
32Table: one byte opcode
33Referrer:
Masami Hiramatsue0e492e2009-10-27 16:42:27 -040034AVXcode:
Masami Hiramatsueb132962009-08-13 16:34:13 -040035# 0x00 - 0x0f
3600: ADD Eb,Gb
3701: ADD Ev,Gv
3802: ADD Gb,Eb
3903: ADD Gv,Ev
4004: ADD AL,Ib
4105: ADD rAX,Iz
4206: PUSH ES (i64)
4307: POP ES (i64)
4408: OR Eb,Gb
4509: OR Ev,Gv
460a: OR Gb,Eb
470b: OR Gv,Ev
480c: OR AL,Ib
490d: OR rAX,Iz
500e: PUSH CS (i64)
510f: escape # 2-byte escape
52# 0x10 - 0x1f
5310: ADC Eb,Gb
5411: ADC Ev,Gv
5512: ADC Gb,Eb
5613: ADC Gv,Ev
5714: ADC AL,Ib
5815: ADC rAX,Iz
5916: PUSH SS (i64)
6017: POP SS (i64)
6118: SBB Eb,Gb
6219: SBB Ev,Gv
631a: SBB Gb,Eb
641b: SBB Gv,Ev
651c: SBB AL,Ib
661d: SBB rAX,Iz
671e: PUSH DS (i64)
681f: POP DS (i64)
69# 0x20 - 0x2f
7020: AND Eb,Gb
7121: AND Ev,Gv
7222: AND Gb,Eb
7323: AND Gv,Ev
7424: AND AL,Ib
7525: AND rAx,Iz
7626: SEG=ES (Prefix)
7727: DAA (i64)
7828: SUB Eb,Gb
7929: SUB Ev,Gv
802a: SUB Gb,Eb
812b: SUB Gv,Ev
822c: SUB AL,Ib
832d: SUB rAX,Iz
842e: SEG=CS (Prefix)
852f: DAS (i64)
86# 0x30 - 0x3f
8730: XOR Eb,Gb
8831: XOR Ev,Gv
8932: XOR Gb,Eb
9033: XOR Gv,Ev
9134: XOR AL,Ib
9235: XOR rAX,Iz
9336: SEG=SS (Prefix)
9437: AAA (i64)
9538: CMP Eb,Gb
9639: CMP Ev,Gv
973a: CMP Gb,Eb
983b: CMP Gv,Ev
993c: CMP AL,Ib
1003d: CMP rAX,Iz
1013e: SEG=DS (Prefix)
1023f: AAS (i64)
103# 0x40 - 0x4f
10440: INC eAX (i64) | REX (o64)
10541: INC eCX (i64) | REX.B (o64)
10642: INC eDX (i64) | REX.X (o64)
10743: INC eBX (i64) | REX.XB (o64)
10844: INC eSP (i64) | REX.R (o64)
10945: INC eBP (i64) | REX.RB (o64)
11046: INC eSI (i64) | REX.RX (o64)
11147: INC eDI (i64) | REX.RXB (o64)
11248: DEC eAX (i64) | REX.W (o64)
11349: DEC eCX (i64) | REX.WB (o64)
1144a: DEC eDX (i64) | REX.WX (o64)
1154b: DEC eBX (i64) | REX.WXB (o64)
1164c: DEC eSP (i64) | REX.WR (o64)
1174d: DEC eBP (i64) | REX.WRB (o64)
1184e: DEC eSI (i64) | REX.WRX (o64)
1194f: DEC eDI (i64) | REX.WRXB (o64)
120# 0x50 - 0x5f
12150: PUSH rAX/r8 (d64)
12251: PUSH rCX/r9 (d64)
12352: PUSH rDX/r10 (d64)
12453: PUSH rBX/r11 (d64)
12554: PUSH rSP/r12 (d64)
12655: PUSH rBP/r13 (d64)
12756: PUSH rSI/r14 (d64)
12857: PUSH rDI/r15 (d64)
12958: POP rAX/r8 (d64)
13059: POP rCX/r9 (d64)
1315a: POP rDX/r10 (d64)
1325b: POP rBX/r11 (d64)
1335c: POP rSP/r12 (d64)
1345d: POP rBP/r13 (d64)
1355e: POP rSI/r14 (d64)
1365f: POP rDI/r15 (d64)
137# 0x60 - 0x6f
13860: PUSHA/PUSHAD (i64)
13961: POPA/POPAD (i64)
14062: BOUND Gv,Ma (i64)
14163: ARPL Ew,Gw (i64) | MOVSXD Gv,Ev (o64)
14264: SEG=FS (Prefix)
14365: SEG=GS (Prefix)
14466: Operand-Size (Prefix)
14567: Address-Size (Prefix)
14668: PUSH Iz (d64)
14769: IMUL Gv,Ev,Iz
1486a: PUSH Ib (d64)
1496b: IMUL Gv,Ev,Ib
1506c: INS/INSB Yb,DX
1516d: INS/INSW/INSD Yz,DX
1526e: OUTS/OUTSB DX,Xb
1536f: OUTS/OUTSW/OUTSD DX,Xz
154# 0x70 - 0x7f
15570: JO Jb
15671: JNO Jb
15772: JB/JNAE/JC Jb
15873: JNB/JAE/JNC Jb
15974: JZ/JE Jb
16075: JNZ/JNE Jb
16176: JBE/JNA Jb
16277: JNBE/JA Jb
16378: JS Jb
16479: JNS Jb
1657a: JP/JPE Jb
1667b: JNP/JPO Jb
1677c: JL/JNGE Jb
1687d: JNL/JGE Jb
1697e: JLE/JNG Jb
1707f: JNLE/JG Jb
171# 0x80 - 0x8f
17280: Grp1 Eb,Ib (1A)
17381: Grp1 Ev,Iz (1A)
17482: Grp1 Eb,Ib (1A),(i64)
17583: Grp1 Ev,Ib (1A)
17684: TEST Eb,Gb
17785: TEST Ev,Gv
17886: XCHG Eb,Gb
17987: XCHG Ev,Gv
18088: MOV Eb,Gb
18189: MOV Ev,Gv
1828a: MOV Gb,Eb
1838b: MOV Gv,Ev
1848c: MOV Ev,Sw
1858d: LEA Gv,M
1868e: MOV Sw,Ew
1878f: Grp1A (1A) | POP Ev (d64)
188# 0x90 - 0x9f
18990: NOP | PAUSE (F3) | XCHG r8,rAX
19091: XCHG rCX/r9,rAX
19192: XCHG rDX/r10,rAX
19293: XCHG rBX/r11,rAX
19394: XCHG rSP/r12,rAX
19495: XCHG rBP/r13,rAX
19596: XCHG rSI/r14,rAX
19697: XCHG rDI/r15,rAX
19798: CBW/CWDE/CDQE
19899: CWD/CDQ/CQO
1999a: CALLF Ap (i64)
2009b: FWAIT/WAIT
2019c: PUSHF/D/Q Fv (d64)
2029d: POPF/D/Q Fv (d64)
2039e: SAHF
2049f: LAHF
205# 0xa0 - 0xaf
206a0: MOV AL,Ob
207a1: MOV rAX,Ov
208a2: MOV Ob,AL
209a3: MOV Ov,rAX
Masami Hiramatsua9c373d2011-12-05 21:05:57 +0900210a4: MOVS/B Yb,Xb
211a5: MOVS/W/D/Q Yv,Xv
Masami Hiramatsueb132962009-08-13 16:34:13 -0400212a6: CMPS/B Xb,Yb
213a7: CMPS/W/D Xv,Yv
214a8: TEST AL,Ib
215a9: TEST rAX,Iz
216aa: STOS/B Yb,AL
217ab: STOS/W/D/Q Yv,rAX
218ac: LODS/B AL,Xb
219ad: LODS/W/D/Q rAX,Xv
220ae: SCAS/B AL,Yb
Ulrich Drepper8d973b62012-01-15 19:40:24 -0500221# Note: The May 2011 Intel manual shows Xv for the second parameter of the
222# next instruction but Yv is correct
223af: SCAS/W/D/Q rAX,Yv
Masami Hiramatsueb132962009-08-13 16:34:13 -0400224# 0xb0 - 0xbf
225b0: MOV AL/R8L,Ib
226b1: MOV CL/R9L,Ib
227b2: MOV DL/R10L,Ib
228b3: MOV BL/R11L,Ib
229b4: MOV AH/R12L,Ib
230b5: MOV CH/R13L,Ib
231b6: MOV DH/R14L,Ib
232b7: MOV BH/R15L,Ib
233b8: MOV rAX/r8,Iv
234b9: MOV rCX/r9,Iv
235ba: MOV rDX/r10,Iv
236bb: MOV rBX/r11,Iv
237bc: MOV rSP/r12,Iv
238bd: MOV rBP/r13,Iv
239be: MOV rSI/r14,Iv
240bf: MOV rDI/r15,Iv
241# 0xc0 - 0xcf
242c0: Grp2 Eb,Ib (1A)
243c1: Grp2 Ev,Ib (1A)
244c2: RETN Iw (f64)
245c3: RETN
Masami Hiramatsua9c373d2011-12-05 21:05:57 +0900246c4: LES Gz,Mp (i64) | VEX+2byte (Prefix)
247c5: LDS Gz,Mp (i64) | VEX+1byte (Prefix)
Masami Hiramatsu3e21bb02013-08-06 16:37:50 +0900248c6: Grp11A Eb,Ib (1A)
249c7: Grp11B Ev,Iz (1A)
Masami Hiramatsueb132962009-08-13 16:34:13 -0400250c8: ENTER Iw,Ib
251c9: LEAVE (d64)
252ca: RETF Iw
253cb: RETF
254cc: INT3
255cd: INT Ib
256ce: INTO (i64)
257cf: IRET/D/Q
258# 0xd0 - 0xdf
259d0: Grp2 Eb,1 (1A)
260d1: Grp2 Ev,1 (1A)
261d2: Grp2 Eb,CL (1A)
262d3: Grp2 Ev,CL (1A)
263d4: AAM Ib (i64)
264d5: AAD Ib (i64)
265d6:
266d7: XLAT/XLATB
267d8: ESC
268d9: ESC
269da: ESC
270db: ESC
271dc: ESC
272dd: ESC
273de: ESC
274df: ESC
275# 0xe0 - 0xef
Denys Vlasenkocbb53b92015-02-12 20:06:57 +0100276# Note: "forced64" is Intel CPU behavior: they ignore 0x66 prefix
277# in 64-bit mode. AMD CPUs accept 0x66 prefix, it causes RIP truncation
278# to 16 bits. In 32-bit mode, 0x66 is accepted by both Intel and AMD.
Masami Hiramatsueb132962009-08-13 16:34:13 -0400279e0: LOOPNE/LOOPNZ Jb (f64)
280e1: LOOPE/LOOPZ Jb (f64)
281e2: LOOP Jb (f64)
282e3: JrCXZ Jb (f64)
283e4: IN AL,Ib
284e5: IN eAX,Ib
285e6: OUT Ib,AL
286e7: OUT Ib,eAX
Denys Vlasenkocbb53b92015-02-12 20:06:57 +0100287# With 0x66 prefix in 64-bit mode, for AMD CPUs immediate offset
288# in "near" jumps and calls is 16-bit. For CALL,
289# push of return address is 16-bit wide, RSP is decremented by 2
290# but is not truncated to 16 bits, unlike RIP.
Masami Hiramatsueb132962009-08-13 16:34:13 -0400291e8: CALL Jz (f64)
292e9: JMP-near Jz (f64)
293ea: JMP-far Ap (i64)
294eb: JMP-short Jb (f64)
295ec: IN AL,DX
296ed: IN eAX,DX
297ee: OUT DX,AL
298ef: OUT DX,eAX
299# 0xf0 - 0xff
300f0: LOCK (Prefix)
301f1:
Masami Hiramatsu3e21bb02013-08-06 16:37:50 +0900302f2: REPNE (Prefix) | XACQUIRE (Prefix)
303f3: REP/REPE (Prefix) | XRELEASE (Prefix)
Masami Hiramatsueb132962009-08-13 16:34:13 -0400304f4: HLT
305f5: CMC
306f6: Grp3_1 Eb (1A)
307f7: Grp3_2 Ev (1A)
308f8: CLC
309f9: STC
310fa: CLI
311fb: STI
312fc: CLD
313fd: STD
314fe: Grp4 (1A)
315ff: Grp5 (1A)
316EndTable
317
Masami Hiramatsue0e492e2009-10-27 16:42:27 -0400318Table: 2-byte opcode (0x0f)
Masami Hiramatsueb132962009-08-13 16:34:13 -0400319Referrer: 2-byte escape
Masami Hiramatsue0e492e2009-10-27 16:42:27 -0400320AVXcode: 1
Masami Hiramatsueb132962009-08-13 16:34:13 -0400321# 0x0f 0x00-0x0f
32200: Grp6 (1A)
32301: Grp7 (1A)
32402: LAR Gv,Ew
32503: LSL Gv,Ew
32604:
32705: SYSCALL (o64)
32806: CLTS
32907: SYSRET (o64)
33008: INVD
33109: WBINVD
3320a:
3330b: UD2 (1B)
3340c:
Masami Hiramatsu3e21bb02013-08-06 16:37:50 +0900335# AMD's prefetch group. Intel supports prefetchw(/1) only.
3360d: GrpP
Masami Hiramatsud1baf5a2009-10-16 20:07:44 -04003370e: FEMMS
338# 3DNow! uses the last imm byte as opcode extension.
3390f: 3DNow! Pq,Qq,Ib
Masami Hiramatsueb132962009-08-13 16:34:13 -0400340# 0x0f 0x10-0x1f
Masami Hiramatsua9c373d2011-12-05 21:05:57 +0900341# NOTE: According to Intel SDM opcode map, vmovups and vmovupd has no operands
342# but it actually has operands. And also, vmovss and vmovsd only accept 128bit.
343# MOVSS/MOVSD has too many forms(3) on SDM. This map just shows a typical form.
344# Many AVX instructions lack v1 superscript, according to Intel AVX-Prgramming
345# Reference A.1
34610: vmovups Vps,Wps | vmovupd Vpd,Wpd (66) | vmovss Vx,Hx,Wss (F3),(v1) | vmovsd Vx,Hx,Wsd (F2),(v1)
34711: vmovups Wps,Vps | vmovupd Wpd,Vpd (66) | vmovss Wss,Hx,Vss (F3),(v1) | vmovsd Wsd,Hx,Vsd (F2),(v1)
34812: vmovlps Vq,Hq,Mq (v1) | vmovhlps Vq,Hq,Uq (v1) | vmovlpd Vq,Hq,Mq (66),(v1) | vmovsldup Vx,Wx (F3) | vmovddup Vx,Wx (F2)
34913: vmovlps Mq,Vq (v1) | vmovlpd Mq,Vq (66),(v1)
35014: vunpcklps Vx,Hx,Wx | vunpcklpd Vx,Hx,Wx (66)
35115: vunpckhps Vx,Hx,Wx | vunpckhpd Vx,Hx,Wx (66)
35216: vmovhps Vdq,Hq,Mq (v1) | vmovlhps Vdq,Hq,Uq (v1) | vmovhpd Vdq,Hq,Mq (66),(v1) | vmovshdup Vx,Wx (F3)
35317: vmovhps Mq,Vq (v1) | vmovhpd Mq,Vq (66),(v1)
Masami Hiramatsueb132962009-08-13 16:34:13 -040035418: Grp16 (1A)
35519:
Adrian Hunter78173ec2015-09-02 15:15:27 +0300356# Intel SDM opcode map does not list MPX instructions. For now using Gv for
357# bnd registers and Ev for everything else is OK because the instruction
358# decoder does not use the information except as an indication that there is
359# a ModR/M byte.
3601a: BNDCL Gv,Ev (F3) | BNDCU Gv,Ev (F2) | BNDMOV Gv,Ev (66) | BNDLDX Gv,Ev
3611b: BNDCN Gv,Ev (F2) | BNDMOV Ev,Gv (66) | BNDMK Gv,Ev (F3) | BNDSTX Ev,Gv
Masami Hiramatsueb132962009-08-13 16:34:13 -04003621c:
3631d:
3641e:
3651f: NOP Ev
366# 0x0f 0x20-0x2f
36720: MOV Rd,Cd
36821: MOV Rd,Dd
36922: MOV Cd,Rd
37023: MOV Dd,Rd
37124:
37225:
37326:
37427:
Masami Hiramatsua9c373d2011-12-05 21:05:57 +090037528: vmovaps Vps,Wps | vmovapd Vpd,Wpd (66)
37629: vmovaps Wps,Vps | vmovapd Wpd,Vpd (66)
3772a: cvtpi2ps Vps,Qpi | cvtpi2pd Vpd,Qpi (66) | vcvtsi2ss Vss,Hss,Ey (F3),(v1) | vcvtsi2sd Vsd,Hsd,Ey (F2),(v1)
3782b: vmovntps Mps,Vps | vmovntpd Mpd,Vpd (66)
3792c: cvttps2pi Ppi,Wps | cvttpd2pi Ppi,Wpd (66) | vcvttss2si Gy,Wss (F3),(v1) | vcvttsd2si Gy,Wsd (F2),(v1)
3802d: cvtps2pi Ppi,Wps | cvtpd2pi Qpi,Wpd (66) | vcvtss2si Gy,Wss (F3),(v1) | vcvtsd2si Gy,Wsd (F2),(v1)
3812e: vucomiss Vss,Wss (v1) | vucomisd Vsd,Wsd (66),(v1)
3822f: vcomiss Vss,Wss (v1) | vcomisd Vsd,Wsd (66),(v1)
Masami Hiramatsueb132962009-08-13 16:34:13 -0400383# 0x0f 0x30-0x3f
38430: WRMSR
38531: RDTSC
38632: RDMSR
38733: RDPMC
38834: SYSENTER
38935: SYSEXIT
39036:
39137: GETSEC
39238: escape # 3-byte escape 1
39339:
3943a: escape # 3-byte escape 2
3953b:
3963c:
3973d:
3983e:
3993f:
400# 0x0f 0x40-0x4f
40140: CMOVO Gv,Ev
40241: CMOVNO Gv,Ev
40342: CMOVB/C/NAE Gv,Ev
40443: CMOVAE/NB/NC Gv,Ev
40544: CMOVE/Z Gv,Ev
40645: CMOVNE/NZ Gv,Ev
40746: CMOVBE/NA Gv,Ev
40847: CMOVA/NBE Gv,Ev
40948: CMOVS Gv,Ev
41049: CMOVNS Gv,Ev
4114a: CMOVP/PE Gv,Ev
4124b: CMOVNP/PO Gv,Ev
4134c: CMOVL/NGE Gv,Ev
4144d: CMOVNL/GE Gv,Ev
4154e: CMOVLE/NG Gv,Ev
4164f: CMOVNLE/G Gv,Ev
417# 0x0f 0x50-0x5f
Masami Hiramatsua9c373d2011-12-05 21:05:57 +090041850: vmovmskps Gy,Ups | vmovmskpd Gy,Upd (66)
41951: vsqrtps Vps,Wps | vsqrtpd Vpd,Wpd (66) | vsqrtss Vss,Hss,Wss (F3),(v1) | vsqrtsd Vsd,Hsd,Wsd (F2),(v1)
42052: vrsqrtps Vps,Wps | vrsqrtss Vss,Hss,Wss (F3),(v1)
42153: vrcpps Vps,Wps | vrcpss Vss,Hss,Wss (F3),(v1)
42254: vandps Vps,Hps,Wps | vandpd Vpd,Hpd,Wpd (66)
42355: vandnps Vps,Hps,Wps | vandnpd Vpd,Hpd,Wpd (66)
42456: vorps Vps,Hps,Wps | vorpd Vpd,Hpd,Wpd (66)
42557: vxorps Vps,Hps,Wps | vxorpd Vpd,Hpd,Wpd (66)
42658: vaddps Vps,Hps,Wps | vaddpd Vpd,Hpd,Wpd (66) | vaddss Vss,Hss,Wss (F3),(v1) | vaddsd Vsd,Hsd,Wsd (F2),(v1)
42759: vmulps Vps,Hps,Wps | vmulpd Vpd,Hpd,Wpd (66) | vmulss Vss,Hss,Wss (F3),(v1) | vmulsd Vsd,Hsd,Wsd (F2),(v1)
4285a: vcvtps2pd Vpd,Wps | vcvtpd2ps Vps,Wpd (66) | vcvtss2sd Vsd,Hx,Wss (F3),(v1) | vcvtsd2ss Vss,Hx,Wsd (F2),(v1)
4295b: vcvtdq2ps Vps,Wdq | vcvtps2dq Vdq,Wps (66) | vcvttps2dq Vdq,Wps (F3)
4305c: vsubps Vps,Hps,Wps | vsubpd Vpd,Hpd,Wpd (66) | vsubss Vss,Hss,Wss (F3),(v1) | vsubsd Vsd,Hsd,Wsd (F2),(v1)
4315d: vminps Vps,Hps,Wps | vminpd Vpd,Hpd,Wpd (66) | vminss Vss,Hss,Wss (F3),(v1) | vminsd Vsd,Hsd,Wsd (F2),(v1)
4325e: vdivps Vps,Hps,Wps | vdivpd Vpd,Hpd,Wpd (66) | vdivss Vss,Hss,Wss (F3),(v1) | vdivsd Vsd,Hsd,Wsd (F2),(v1)
4335f: vmaxps Vps,Hps,Wps | vmaxpd Vpd,Hpd,Wpd (66) | vmaxss Vss,Hss,Wss (F3),(v1) | vmaxsd Vsd,Hsd,Wsd (F2),(v1)
Masami Hiramatsueb132962009-08-13 16:34:13 -0400434# 0x0f 0x60-0x6f
Masami Hiramatsua9c373d2011-12-05 21:05:57 +090043560: punpcklbw Pq,Qd | vpunpcklbw Vx,Hx,Wx (66),(v1)
43661: punpcklwd Pq,Qd | vpunpcklwd Vx,Hx,Wx (66),(v1)
43762: punpckldq Pq,Qd | vpunpckldq Vx,Hx,Wx (66),(v1)
43863: packsswb Pq,Qq | vpacksswb Vx,Hx,Wx (66),(v1)
43964: pcmpgtb Pq,Qq | vpcmpgtb Vx,Hx,Wx (66),(v1)
44065: pcmpgtw Pq,Qq | vpcmpgtw Vx,Hx,Wx (66),(v1)
44166: pcmpgtd Pq,Qq | vpcmpgtd Vx,Hx,Wx (66),(v1)
44267: packuswb Pq,Qq | vpackuswb Vx,Hx,Wx (66),(v1)
44368: punpckhbw Pq,Qd | vpunpckhbw Vx,Hx,Wx (66),(v1)
44469: punpckhwd Pq,Qd | vpunpckhwd Vx,Hx,Wx (66),(v1)
4456a: punpckhdq Pq,Qd | vpunpckhdq Vx,Hx,Wx (66),(v1)
4466b: packssdw Pq,Qd | vpackssdw Vx,Hx,Wx (66),(v1)
4476c: vpunpcklqdq Vx,Hx,Wx (66),(v1)
4486d: vpunpckhqdq Vx,Hx,Wx (66),(v1)
4496e: movd/q Pd,Ey | vmovd/q Vy,Ey (66),(v1)
4506f: movq Pq,Qq | vmovdqa Vx,Wx (66) | vmovdqu Vx,Wx (F3)
Masami Hiramatsueb132962009-08-13 16:34:13 -0400451# 0x0f 0x70-0x7f
Masami Hiramatsua9c373d2011-12-05 21:05:57 +090045270: pshufw Pq,Qq,Ib | vpshufd Vx,Wx,Ib (66),(v1) | vpshufhw Vx,Wx,Ib (F3),(v1) | vpshuflw Vx,Wx,Ib (F2),(v1)
Masami Hiramatsueb132962009-08-13 16:34:13 -040045371: Grp12 (1A)
45472: Grp13 (1A)
45573: Grp14 (1A)
Masami Hiramatsua9c373d2011-12-05 21:05:57 +090045674: pcmpeqb Pq,Qq | vpcmpeqb Vx,Hx,Wx (66),(v1)
45775: pcmpeqw Pq,Qq | vpcmpeqw Vx,Hx,Wx (66),(v1)
45876: pcmpeqd Pq,Qq | vpcmpeqd Vx,Hx,Wx (66),(v1)
459# Note: Remove (v), because vzeroall and vzeroupper becomes emms without VEX.
46077: emms | vzeroupper | vzeroall
46178: VMREAD Ey,Gy
46279: VMWRITE Gy,Ey
Masami Hiramatsueb132962009-08-13 16:34:13 -04004637a:
4647b:
Masami Hiramatsua9c373d2011-12-05 21:05:57 +09004657c: vhaddpd Vpd,Hpd,Wpd (66) | vhaddps Vps,Hps,Wps (F2)
4667d: vhsubpd Vpd,Hpd,Wpd (66) | vhsubps Vps,Hps,Wps (F2)
4677e: movd/q Ey,Pd | vmovd/q Ey,Vy (66),(v1) | vmovq Vq,Wq (F3),(v1)
4687f: movq Qq,Pq | vmovdqa Wx,Vx (66) | vmovdqu Wx,Vx (F3)
Masami Hiramatsueb132962009-08-13 16:34:13 -0400469# 0x0f 0x80-0x8f
Denys Vlasenkocbb53b92015-02-12 20:06:57 +0100470# Note: "forced64" is Intel CPU behavior (see comment about CALL insn).
Masami Hiramatsueb132962009-08-13 16:34:13 -040047180: JO Jz (f64)
47281: JNO Jz (f64)
Masami Hiramatsua9c373d2011-12-05 21:05:57 +090047382: JB/JC/JNAE Jz (f64)
47483: JAE/JNB/JNC Jz (f64)
47584: JE/JZ Jz (f64)
47685: JNE/JNZ Jz (f64)
Masami Hiramatsueb132962009-08-13 16:34:13 -040047786: JBE/JNA Jz (f64)
Masami Hiramatsua9c373d2011-12-05 21:05:57 +090047887: JA/JNBE Jz (f64)
Masami Hiramatsueb132962009-08-13 16:34:13 -040047988: JS Jz (f64)
48089: JNS Jz (f64)
4818a: JP/JPE Jz (f64)
4828b: JNP/JPO Jz (f64)
4838c: JL/JNGE Jz (f64)
4848d: JNL/JGE Jz (f64)
4858e: JLE/JNG Jz (f64)
4868f: JNLE/JG Jz (f64)
487# 0x0f 0x90-0x9f
48890: SETO Eb
48991: SETNO Eb
49092: SETB/C/NAE Eb
49193: SETAE/NB/NC Eb
49294: SETE/Z Eb
49395: SETNE/NZ Eb
49496: SETBE/NA Eb
49597: SETA/NBE Eb
49698: SETS Eb
49799: SETNS Eb
4989a: SETP/PE Eb
4999b: SETNP/PO Eb
5009c: SETL/NGE Eb
5019d: SETNL/GE Eb
5029e: SETLE/NG Eb
5039f: SETNLE/G Eb
504# 0x0f 0xa0-0xaf
505a0: PUSH FS (d64)
506a1: POP FS (d64)
507a2: CPUID
508a3: BT Ev,Gv
509a4: SHLD Ev,Gv,Ib
510a5: SHLD Ev,Gv,CL
Masami Hiramatsuc0b11d32009-09-25 11:20:38 -0700511a6: GrpPDLK
Masami Hiramatsueb132962009-08-13 16:34:13 -0400512a7: GrpRNG
513a8: PUSH GS (d64)
514a9: POP GS (d64)
515aa: RSM
516ab: BTS Ev,Gv
517ac: SHRD Ev,Gv,Ib
518ad: SHRD Ev,Gv,CL
519ae: Grp15 (1A),(1C)
520af: IMUL Gv,Ev
521# 0x0f 0xb0-0xbf
522b0: CMPXCHG Eb,Gb
523b1: CMPXCHG Ev,Gv
524b2: LSS Gv,Mp
525b3: BTR Ev,Gv
526b4: LFS Gv,Mp
527b5: LGS Gv,Mp
528b6: MOVZX Gv,Eb
529b7: MOVZX Gv,Ew
Masami Hiramatsu436d03f2012-06-05 00:09:11 +0900530b8: JMPE (!F3) | POPCNT Gv,Ev (F3)
Masami Hiramatsueb132962009-08-13 16:34:13 -0400531b9: Grp10 (1A)
532ba: Grp8 Ev,Ib (1A)
533bb: BTC Ev,Gv
Masami Hiramatsu436d03f2012-06-05 00:09:11 +0900534bc: BSF Gv,Ev (!F3) | TZCNT Gv,Ev (F3)
535bd: BSR Gv,Ev (!F3) | LZCNT Gv,Ev (F3)
Masami Hiramatsueb132962009-08-13 16:34:13 -0400536be: MOVSX Gv,Eb
537bf: MOVSX Gv,Ew
538# 0x0f 0xc0-0xcf
539c0: XADD Eb,Gb
540c1: XADD Ev,Gv
Masami Hiramatsua9c373d2011-12-05 21:05:57 +0900541c2: vcmpps Vps,Hps,Wps,Ib | vcmppd Vpd,Hpd,Wpd,Ib (66) | vcmpss Vss,Hss,Wss,Ib (F3),(v1) | vcmpsd Vsd,Hsd,Wsd,Ib (F2),(v1)
542c3: movnti My,Gy
543c4: pinsrw Pq,Ry/Mw,Ib | vpinsrw Vdq,Hdq,Ry/Mw,Ib (66),(v1)
544c5: pextrw Gd,Nq,Ib | vpextrw Gd,Udq,Ib (66),(v1)
545c6: vshufps Vps,Hps,Wps,Ib | vshufpd Vpd,Hpd,Wpd,Ib (66)
Masami Hiramatsueb132962009-08-13 16:34:13 -0400546c7: Grp9 (1A)
547c8: BSWAP RAX/EAX/R8/R8D
548c9: BSWAP RCX/ECX/R9/R9D
549ca: BSWAP RDX/EDX/R10/R10D
550cb: BSWAP RBX/EBX/R11/R11D
551cc: BSWAP RSP/ESP/R12/R12D
552cd: BSWAP RBP/EBP/R13/R13D
553ce: BSWAP RSI/ESI/R14/R14D
554cf: BSWAP RDI/EDI/R15/R15D
555# 0x0f 0xd0-0xdf
Masami Hiramatsua9c373d2011-12-05 21:05:57 +0900556d0: vaddsubpd Vpd,Hpd,Wpd (66) | vaddsubps Vps,Hps,Wps (F2)
557d1: psrlw Pq,Qq | vpsrlw Vx,Hx,Wx (66),(v1)
558d2: psrld Pq,Qq | vpsrld Vx,Hx,Wx (66),(v1)
559d3: psrlq Pq,Qq | vpsrlq Vx,Hx,Wx (66),(v1)
560d4: paddq Pq,Qq | vpaddq Vx,Hx,Wx (66),(v1)
561d5: pmullw Pq,Qq | vpmullw Vx,Hx,Wx (66),(v1)
562d6: vmovq Wq,Vq (66),(v1) | movq2dq Vdq,Nq (F3) | movdq2q Pq,Uq (F2)
563d7: pmovmskb Gd,Nq | vpmovmskb Gd,Ux (66),(v1)
564d8: psubusb Pq,Qq | vpsubusb Vx,Hx,Wx (66),(v1)
565d9: psubusw Pq,Qq | vpsubusw Vx,Hx,Wx (66),(v1)
566da: pminub Pq,Qq | vpminub Vx,Hx,Wx (66),(v1)
567db: pand Pq,Qq | vpand Vx,Hx,Wx (66),(v1)
568dc: paddusb Pq,Qq | vpaddusb Vx,Hx,Wx (66),(v1)
569dd: paddusw Pq,Qq | vpaddusw Vx,Hx,Wx (66),(v1)
570de: pmaxub Pq,Qq | vpmaxub Vx,Hx,Wx (66),(v1)
571df: pandn Pq,Qq | vpandn Vx,Hx,Wx (66),(v1)
Masami Hiramatsueb132962009-08-13 16:34:13 -0400572# 0x0f 0xe0-0xef
Masami Hiramatsua9c373d2011-12-05 21:05:57 +0900573e0: pavgb Pq,Qq | vpavgb Vx,Hx,Wx (66),(v1)
574e1: psraw Pq,Qq | vpsraw Vx,Hx,Wx (66),(v1)
575e2: psrad Pq,Qq | vpsrad Vx,Hx,Wx (66),(v1)
576e3: pavgw Pq,Qq | vpavgw Vx,Hx,Wx (66),(v1)
577e4: pmulhuw Pq,Qq | vpmulhuw Vx,Hx,Wx (66),(v1)
578e5: pmulhw Pq,Qq | vpmulhw Vx,Hx,Wx (66),(v1)
579e6: vcvttpd2dq Vx,Wpd (66) | vcvtdq2pd Vx,Wdq (F3) | vcvtpd2dq Vx,Wpd (F2)
580e7: movntq Mq,Pq | vmovntdq Mx,Vx (66)
581e8: psubsb Pq,Qq | vpsubsb Vx,Hx,Wx (66),(v1)
582e9: psubsw Pq,Qq | vpsubsw Vx,Hx,Wx (66),(v1)
583ea: pminsw Pq,Qq | vpminsw Vx,Hx,Wx (66),(v1)
584eb: por Pq,Qq | vpor Vx,Hx,Wx (66),(v1)
585ec: paddsb Pq,Qq | vpaddsb Vx,Hx,Wx (66),(v1)
586ed: paddsw Pq,Qq | vpaddsw Vx,Hx,Wx (66),(v1)
587ee: pmaxsw Pq,Qq | vpmaxsw Vx,Hx,Wx (66),(v1)
588ef: pxor Pq,Qq | vpxor Vx,Hx,Wx (66),(v1)
Masami Hiramatsueb132962009-08-13 16:34:13 -0400589# 0x0f 0xf0-0xff
Masami Hiramatsua9c373d2011-12-05 21:05:57 +0900590f0: vlddqu Vx,Mx (F2)
591f1: psllw Pq,Qq | vpsllw Vx,Hx,Wx (66),(v1)
592f2: pslld Pq,Qq | vpslld Vx,Hx,Wx (66),(v1)
593f3: psllq Pq,Qq | vpsllq Vx,Hx,Wx (66),(v1)
594f4: pmuludq Pq,Qq | vpmuludq Vx,Hx,Wx (66),(v1)
595f5: pmaddwd Pq,Qq | vpmaddwd Vx,Hx,Wx (66),(v1)
596f6: psadbw Pq,Qq | vpsadbw Vx,Hx,Wx (66),(v1)
597f7: maskmovq Pq,Nq | vmaskmovdqu Vx,Ux (66),(v1)
598f8: psubb Pq,Qq | vpsubb Vx,Hx,Wx (66),(v1)
599f9: psubw Pq,Qq | vpsubw Vx,Hx,Wx (66),(v1)
600fa: psubd Pq,Qq | vpsubd Vx,Hx,Wx (66),(v1)
601fb: psubq Pq,Qq | vpsubq Vx,Hx,Wx (66),(v1)
602fc: paddb Pq,Qq | vpaddb Vx,Hx,Wx (66),(v1)
603fd: paddw Pq,Qq | vpaddw Vx,Hx,Wx (66),(v1)
604fe: paddd Pq,Qq | vpaddd Vx,Hx,Wx (66),(v1)
Masami Hiramatsueb132962009-08-13 16:34:13 -0400605ff:
606EndTable
607
Masami Hiramatsu9983d602009-10-20 12:55:31 -0400608Table: 3-byte opcode 1 (0x0f 0x38)
Masami Hiramatsueb132962009-08-13 16:34:13 -0400609Referrer: 3-byte escape 1
Masami Hiramatsue0e492e2009-10-27 16:42:27 -0400610AVXcode: 2
Masami Hiramatsuf12b4f52009-09-08 12:32:46 -0400611# 0x0f 0x38 0x00-0x0f
Masami Hiramatsua9c373d2011-12-05 21:05:57 +090061200: pshufb Pq,Qq | vpshufb Vx,Hx,Wx (66),(v1)
61301: phaddw Pq,Qq | vphaddw Vx,Hx,Wx (66),(v1)
61402: phaddd Pq,Qq | vphaddd Vx,Hx,Wx (66),(v1)
61503: phaddsw Pq,Qq | vphaddsw Vx,Hx,Wx (66),(v1)
61604: pmaddubsw Pq,Qq | vpmaddubsw Vx,Hx,Wx (66),(v1)
61705: phsubw Pq,Qq | vphsubw Vx,Hx,Wx (66),(v1)
61806: phsubd Pq,Qq | vphsubd Vx,Hx,Wx (66),(v1)
61907: phsubsw Pq,Qq | vphsubsw Vx,Hx,Wx (66),(v1)
62008: psignb Pq,Qq | vpsignb Vx,Hx,Wx (66),(v1)
62109: psignw Pq,Qq | vpsignw Vx,Hx,Wx (66),(v1)
6220a: psignd Pq,Qq | vpsignd Vx,Hx,Wx (66),(v1)
6230b: pmulhrsw Pq,Qq | vpmulhrsw Vx,Hx,Wx (66),(v1)
6240c: vpermilps Vx,Hx,Wx (66),(v)
6250d: vpermilpd Vx,Hx,Wx (66),(v)
6260e: vtestps Vx,Wx (66),(v)
6270f: vtestpd Vx,Wx (66),(v)
Masami Hiramatsuf12b4f52009-09-08 12:32:46 -0400628# 0x0f 0x38 0x10-0x1f
62910: pblendvb Vdq,Wdq (66)
63011:
63112:
Masami Hiramatsua9c373d2011-12-05 21:05:57 +090063213: vcvtph2ps Vx,Wx,Ib (66),(v)
Masami Hiramatsuf12b4f52009-09-08 12:32:46 -040063314: blendvps Vdq,Wdq (66)
63415: blendvpd Vdq,Wdq (66)
Masami Hiramatsua9c373d2011-12-05 21:05:57 +090063516: vpermps Vqq,Hqq,Wqq (66),(v)
63617: vptest Vx,Wx (66)
63718: vbroadcastss Vx,Wd (66),(v)
63819: vbroadcastsd Vqq,Wq (66),(v)
6391a: vbroadcastf128 Vqq,Mdq (66),(v)
Masami Hiramatsuf12b4f52009-09-08 12:32:46 -04006401b:
Masami Hiramatsua9c373d2011-12-05 21:05:57 +09006411c: pabsb Pq,Qq | vpabsb Vx,Wx (66),(v1)
6421d: pabsw Pq,Qq | vpabsw Vx,Wx (66),(v1)
6431e: pabsd Pq,Qq | vpabsd Vx,Wx (66),(v1)
Masami Hiramatsuf12b4f52009-09-08 12:32:46 -04006441f:
645# 0x0f 0x38 0x20-0x2f
Masami Hiramatsua9c373d2011-12-05 21:05:57 +090064620: vpmovsxbw Vx,Ux/Mq (66),(v1)
64721: vpmovsxbd Vx,Ux/Md (66),(v1)
64822: vpmovsxbq Vx,Ux/Mw (66),(v1)
64923: vpmovsxwd Vx,Ux/Mq (66),(v1)
65024: vpmovsxwq Vx,Ux/Md (66),(v1)
65125: vpmovsxdq Vx,Ux/Mq (66),(v1)
Masami Hiramatsuf12b4f52009-09-08 12:32:46 -040065226:
65327:
Masami Hiramatsua9c373d2011-12-05 21:05:57 +090065428: vpmuldq Vx,Hx,Wx (66),(v1)
65529: vpcmpeqq Vx,Hx,Wx (66),(v1)
6562a: vmovntdqa Vx,Mx (66),(v1)
6572b: vpackusdw Vx,Hx,Wx (66),(v1)
6582c: vmaskmovps Vx,Hx,Mx (66),(v)
6592d: vmaskmovpd Vx,Hx,Mx (66),(v)
6602e: vmaskmovps Mx,Hx,Vx (66),(v)
6612f: vmaskmovpd Mx,Hx,Vx (66),(v)
Masami Hiramatsuf12b4f52009-09-08 12:32:46 -0400662# 0x0f 0x38 0x30-0x3f
Masami Hiramatsua9c373d2011-12-05 21:05:57 +090066330: vpmovzxbw Vx,Ux/Mq (66),(v1)
66431: vpmovzxbd Vx,Ux/Md (66),(v1)
66532: vpmovzxbq Vx,Ux/Mw (66),(v1)
66633: vpmovzxwd Vx,Ux/Mq (66),(v1)
66734: vpmovzxwq Vx,Ux/Md (66),(v1)
66835: vpmovzxdq Vx,Ux/Mq (66),(v1)
66936: vpermd Vqq,Hqq,Wqq (66),(v)
67037: vpcmpgtq Vx,Hx,Wx (66),(v1)
67138: vpminsb Vx,Hx,Wx (66),(v1)
67239: vpminsd Vx,Hx,Wx (66),(v1)
6733a: vpminuw Vx,Hx,Wx (66),(v1)
6743b: vpminud Vx,Hx,Wx (66),(v1)
6753c: vpmaxsb Vx,Hx,Wx (66),(v1)
6763d: vpmaxsd Vx,Hx,Wx (66),(v1)
6773e: vpmaxuw Vx,Hx,Wx (66),(v1)
6783f: vpmaxud Vx,Hx,Wx (66),(v1)
Masami Hiramatsu3f7e4542009-10-27 16:42:35 -0400679# 0x0f 0x38 0x40-0x8f
Masami Hiramatsua9c373d2011-12-05 21:05:57 +090068040: vpmulld Vx,Hx,Wx (66),(v1)
68141: vphminposuw Vdq,Wdq (66),(v1)
68242:
68343:
68444:
68545: vpsrlvd/q Vx,Hx,Wx (66),(v)
68646: vpsravd Vx,Hx,Wx (66),(v)
68747: vpsllvd/q Vx,Hx,Wx (66),(v)
688# Skip 0x48-0x57
68958: vpbroadcastd Vx,Wx (66),(v)
69059: vpbroadcastq Vx,Wx (66),(v)
6915a: vbroadcasti128 Vqq,Mdq (66),(v)
692# Skip 0x5b-0x77
69378: vpbroadcastb Vx,Wx (66),(v)
69479: vpbroadcastw Vx,Wx (66),(v)
695# Skip 0x7a-0x7f
69680: INVEPT Gy,Mdq (66)
69781: INVPID Gy,Mdq (66)
69882: INVPCID Gy,Mdq (66)
6998c: vpmaskmovd/q Vx,Hx,Mx (66),(v)
7008e: vpmaskmovd/q Mx,Vx,Hx (66),(v)
Masami Hiramatsu3f7e4542009-10-27 16:42:35 -0400701# 0x0f 0x38 0x90-0xbf (FMA)
Masami Hiramatsua9c373d2011-12-05 21:05:57 +090070290: vgatherdd/q Vx,Hx,Wx (66),(v)
70391: vgatherqd/q Vx,Hx,Wx (66),(v)
70492: vgatherdps/d Vx,Hx,Wx (66),(v)
70593: vgatherqps/d Vx,Hx,Wx (66),(v)
70694:
70795:
70896: vfmaddsub132ps/d Vx,Hx,Wx (66),(v)
70997: vfmsubadd132ps/d Vx,Hx,Wx (66),(v)
71098: vfmadd132ps/d Vx,Hx,Wx (66),(v)
71199: vfmadd132ss/d Vx,Hx,Wx (66),(v),(v1)
7129a: vfmsub132ps/d Vx,Hx,Wx (66),(v)
7139b: vfmsub132ss/d Vx,Hx,Wx (66),(v),(v1)
7149c: vfnmadd132ps/d Vx,Hx,Wx (66),(v)
7159d: vfnmadd132ss/d Vx,Hx,Wx (66),(v),(v1)
7169e: vfnmsub132ps/d Vx,Hx,Wx (66),(v)
7179f: vfnmsub132ss/d Vx,Hx,Wx (66),(v),(v1)
718a6: vfmaddsub213ps/d Vx,Hx,Wx (66),(v)
719a7: vfmsubadd213ps/d Vx,Hx,Wx (66),(v)
720a8: vfmadd213ps/d Vx,Hx,Wx (66),(v)
721a9: vfmadd213ss/d Vx,Hx,Wx (66),(v),(v1)
722aa: vfmsub213ps/d Vx,Hx,Wx (66),(v)
723ab: vfmsub213ss/d Vx,Hx,Wx (66),(v),(v1)
724ac: vfnmadd213ps/d Vx,Hx,Wx (66),(v)
725ad: vfnmadd213ss/d Vx,Hx,Wx (66),(v),(v1)
726ae: vfnmsub213ps/d Vx,Hx,Wx (66),(v)
727af: vfnmsub213ss/d Vx,Hx,Wx (66),(v),(v1)
728b6: vfmaddsub231ps/d Vx,Hx,Wx (66),(v)
729b7: vfmsubadd231ps/d Vx,Hx,Wx (66),(v)
730b8: vfmadd231ps/d Vx,Hx,Wx (66),(v)
731b9: vfmadd231ss/d Vx,Hx,Wx (66),(v),(v1)
732ba: vfmsub231ps/d Vx,Hx,Wx (66),(v)
733bb: vfmsub231ss/d Vx,Hx,Wx (66),(v),(v1)
734bc: vfnmadd231ps/d Vx,Hx,Wx (66),(v)
735bd: vfnmadd231ss/d Vx,Hx,Wx (66),(v),(v1)
736be: vfnmsub231ps/d Vx,Hx,Wx (66),(v)
737bf: vfnmsub231ss/d Vx,Hx,Wx (66),(v),(v1)
Masami Hiramatsu3f7e4542009-10-27 16:42:35 -0400738# 0x0f 0x38 0xc0-0xff
Adrian Hunter3fe78d62015-09-02 15:15:28 +0300739c8: sha1nexte Vdq,Wdq
740c9: sha1msg1 Vdq,Wdq
741ca: sha1msg2 Vdq,Wdq
742cb: sha256rnds2 Vdq,Wdq
743cc: sha256msg1 Vdq,Wdq
744cd: sha256msg2 Vdq,Wdq
Masami Hiramatsua9c373d2011-12-05 21:05:57 +0900745db: VAESIMC Vdq,Wdq (66),(v1)
746dc: VAESENC Vdq,Hdq,Wdq (66),(v1)
747dd: VAESENCLAST Vdq,Hdq,Wdq (66),(v1)
748de: VAESDEC Vdq,Hdq,Wdq (66),(v1)
749df: VAESDECLAST Vdq,Hdq,Wdq (66),(v1)
Masami Hiramatsu3e21bb02013-08-06 16:37:50 +0900750f0: MOVBE Gy,My | MOVBE Gw,Mw (66) | CRC32 Gd,Eb (F2) | CRC32 Gd,Eb (66&F2)
751f1: MOVBE My,Gy | MOVBE Mw,Gw (66) | CRC32 Gd,Ey (F2) | CRC32 Gd,Ew (66&F2)
Ulrich Drepperce79dac2012-01-17 14:14:02 -0500752f2: ANDN Gy,By,Ey (v)
753f3: Grp17 (1A)
Masami Hiramatsua9c373d2011-12-05 21:05:57 +0900754f5: BZHI Gy,Ey,By (v) | PEXT Gy,By,Ey (F3),(v) | PDEP Gy,By,Ey (F2),(v)
Masami Hiramatsu3e21bb02013-08-06 16:37:50 +0900755f6: ADCX Gy,Ey (66) | ADOX Gy,Ey (F3) | MULX By,Gy,rDX,Ey (F2),(v)
Masami Hiramatsua9c373d2011-12-05 21:05:57 +0900756f7: BEXTR Gy,Ey,By (v) | SHLX Gy,Ey,By (66),(v) | SARX Gy,Ey,By (F3),(v) | SHRX Gy,Ey,By (F2),(v)
Masami Hiramatsueb132962009-08-13 16:34:13 -0400757EndTable
758
Masami Hiramatsu9983d602009-10-20 12:55:31 -0400759Table: 3-byte opcode 2 (0x0f 0x3a)
Masami Hiramatsueb132962009-08-13 16:34:13 -0400760Referrer: 3-byte escape 2
Masami Hiramatsue0e492e2009-10-27 16:42:27 -0400761AVXcode: 3
Masami Hiramatsuf12b4f52009-09-08 12:32:46 -0400762# 0x0f 0x3a 0x00-0xff
Masami Hiramatsua9c373d2011-12-05 21:05:57 +090076300: vpermq Vqq,Wqq,Ib (66),(v)
76401: vpermpd Vqq,Wqq,Ib (66),(v)
76502: vpblendd Vx,Hx,Wx,Ib (66),(v)
76603:
76704: vpermilps Vx,Wx,Ib (66),(v)
76805: vpermilpd Vx,Wx,Ib (66),(v)
76906: vperm2f128 Vqq,Hqq,Wqq,Ib (66),(v)
77007:
77108: vroundps Vx,Wx,Ib (66)
77209: vroundpd Vx,Wx,Ib (66)
7730a: vroundss Vss,Wss,Ib (66),(v1)
7740b: vroundsd Vsd,Wsd,Ib (66),(v1)
7750c: vblendps Vx,Hx,Wx,Ib (66)
7760d: vblendpd Vx,Hx,Wx,Ib (66)
7770e: vpblendw Vx,Hx,Wx,Ib (66),(v1)
7780f: palignr Pq,Qq,Ib | vpalignr Vx,Hx,Wx,Ib (66),(v1)
77914: vpextrb Rd/Mb,Vdq,Ib (66),(v1)
78015: vpextrw Rd/Mw,Vdq,Ib (66),(v1)
78116: vpextrd/q Ey,Vdq,Ib (66),(v1)
78217: vextractps Ed,Vdq,Ib (66),(v1)
78318: vinsertf128 Vqq,Hqq,Wqq,Ib (66),(v)
78419: vextractf128 Wdq,Vqq,Ib (66),(v)
7851d: vcvtps2ph Wx,Vx,Ib (66),(v)
78620: vpinsrb Vdq,Hdq,Ry/Mb,Ib (66),(v1)
78721: vinsertps Vdq,Hdq,Udq/Md,Ib (66),(v1)
78822: vpinsrd/q Vdq,Hdq,Ey,Ib (66),(v1)
78938: vinserti128 Vqq,Hqq,Wqq,Ib (66),(v)
79039: vextracti128 Wdq,Vqq,Ib (66),(v)
79140: vdpps Vx,Hx,Wx,Ib (66)
79241: vdppd Vdq,Hdq,Wdq,Ib (66),(v1)
79342: vmpsadbw Vx,Hx,Wx,Ib (66),(v1)
79444: vpclmulqdq Vdq,Hdq,Wdq,Ib (66),(v1)
79546: vperm2i128 Vqq,Hqq,Wqq,Ib (66),(v)
7964a: vblendvps Vx,Hx,Wx,Lx (66),(v)
7974b: vblendvpd Vx,Hx,Wx,Lx (66),(v)
7984c: vpblendvb Vx,Hx,Wx,Lx (66),(v1)
79960: vpcmpestrm Vdq,Wdq,Ib (66),(v1)
80061: vpcmpestri Vdq,Wdq,Ib (66),(v1)
80162: vpcmpistrm Vdq,Wdq,Ib (66),(v1)
80263: vpcmpistri Vdq,Wdq,Ib (66),(v1)
Adrian Hunter3fe78d62015-09-02 15:15:28 +0300803cc: sha1rnds4 Vdq,Wdq,Ib
Masami Hiramatsua9c373d2011-12-05 21:05:57 +0900804df: VAESKEYGEN Vdq,Wdq,Ib (66),(v1)
805f0: RORX Gy,Ey,Ib (F2),(v)
Masami Hiramatsueb132962009-08-13 16:34:13 -0400806EndTable
807
808GrpTable: Grp1
8090: ADD
8101: OR
8112: ADC
8123: SBB
8134: AND
8145: SUB
8156: XOR
8167: CMP
817EndTable
818
819GrpTable: Grp1A
8200: POP
821EndTable
822
823GrpTable: Grp2
8240: ROL
8251: ROR
8262: RCL
8273: RCR
8284: SHL/SAL
8295: SHR
8306:
8317: SAR
832EndTable
833
834GrpTable: Grp3_1
8350: TEST Eb,Ib
8361:
8372: NOT Eb
8383: NEG Eb
8394: MUL AL,Eb
8405: IMUL AL,Eb
8416: DIV AL,Eb
8427: IDIV AL,Eb
843EndTable
844
845GrpTable: Grp3_2
8460: TEST Ev,Iz
8471:
8482: NOT Ev
8493: NEG Ev
8504: MUL rAX,Ev
8515: IMUL rAX,Ev
8526: DIV rAX,Ev
8537: IDIV rAX,Ev
854EndTable
855
856GrpTable: Grp4
8570: INC Eb
8581: DEC Eb
859EndTable
860
861GrpTable: Grp5
8620: INC Ev
8631: DEC Ev
Denys Vlasenkocbb53b92015-02-12 20:06:57 +0100864# Note: "forced64" is Intel CPU behavior (see comment about CALL insn).
Masami Hiramatsueb132962009-08-13 16:34:13 -04008652: CALLN Ev (f64)
8663: CALLF Ep
8674: JMPN Ev (f64)
Masami Hiramatsua9c373d2011-12-05 21:05:57 +09008685: JMPF Mp
Masami Hiramatsueb132962009-08-13 16:34:13 -04008696: PUSH Ev (d64)
8707:
871EndTable
872
873GrpTable: Grp6
8740: SLDT Rv/Mw
8751: STR Rv/Mw
8762: LLDT Ew
8773: LTR Ew
8784: VERR Ew
8795: VERW Ew
880EndTable
881
882GrpTable: Grp7
8830: SGDT Ms | VMCALL (001),(11B) | VMLAUNCH (010),(11B) | VMRESUME (011),(11B) | VMXOFF (100),(11B)
Masami Hiramatsu3e21bb02013-08-06 16:37:50 +09008841: SIDT Ms | MONITOR (000),(11B) | MWAIT (001),(11B) | CLAC (010),(11B) | STAC (011),(11B)
8852: LGDT Ms | XGETBV (000),(11B) | XSETBV (001),(11B) | VMFUNC (100),(11B) | XEND (101)(11B) | XTEST (110)(11B)
Masami Hiramatsueb132962009-08-13 16:34:13 -04008863: LIDT Ms
8874: SMSW Mw/Rv
Adrian Hunter978260c2015-09-02 15:15:30 +03008885: rdpkru (110),(11B) | wrpkru (111),(11B)
Masami Hiramatsueb132962009-08-13 16:34:13 -04008896: LMSW Ew
8907: INVLPG Mb | SWAPGS (o64),(000),(11B) | RDTSCP (001),(11B)
891EndTable
892
893GrpTable: Grp8
8944: BT
8955: BTS
8966: BTR
8977: BTC
898EndTable
899
900GrpTable: Grp9
9011: CMPXCHG8B/16B Mq/Mdq
Adrian Hunterf83b6b62015-09-02 15:15:31 +03009023: xrstors
9034: xsavec
9045: xsaves
Masami Hiramatsua9c373d2011-12-05 21:05:57 +09009056: VMPTRLD Mq | VMCLEAR Mq (66) | VMXON Mq (F3) | RDRAND Rv (11B)
Masami Hiramatsu3e21bb02013-08-06 16:37:50 +09009067: VMPTRST Mq | VMPTRST Mq (F3) | RDSEED Rv (11B)
Masami Hiramatsueb132962009-08-13 16:34:13 -0400907EndTable
908
909GrpTable: Grp10
910EndTable
911
Masami Hiramatsu3e21bb02013-08-06 16:37:50 +0900912# Grp11A and Grp11B are expressed as Grp11 in Intel SDM
913GrpTable: Grp11A
9140: MOV Eb,Ib
9157: XABORT Ib (000),(11B)
916EndTable
917
918GrpTable: Grp11B
9190: MOV Eb,Iz
9207: XBEGIN Jz (000),(11B)
Masami Hiramatsueb132962009-08-13 16:34:13 -0400921EndTable
922
923GrpTable: Grp12
Masami Hiramatsua9c373d2011-12-05 21:05:57 +09009242: psrlw Nq,Ib (11B) | vpsrlw Hx,Ux,Ib (66),(11B),(v1)
9254: psraw Nq,Ib (11B) | vpsraw Hx,Ux,Ib (66),(11B),(v1)
9266: psllw Nq,Ib (11B) | vpsllw Hx,Ux,Ib (66),(11B),(v1)
Masami Hiramatsueb132962009-08-13 16:34:13 -0400927EndTable
928
929GrpTable: Grp13
Masami Hiramatsua9c373d2011-12-05 21:05:57 +09009302: psrld Nq,Ib (11B) | vpsrld Hx,Ux,Ib (66),(11B),(v1)
9314: psrad Nq,Ib (11B) | vpsrad Hx,Ux,Ib (66),(11B),(v1)
9326: pslld Nq,Ib (11B) | vpslld Hx,Ux,Ib (66),(11B),(v1)
Masami Hiramatsueb132962009-08-13 16:34:13 -0400933EndTable
934
935GrpTable: Grp14
Masami Hiramatsua9c373d2011-12-05 21:05:57 +09009362: psrlq Nq,Ib (11B) | vpsrlq Hx,Ux,Ib (66),(11B),(v1)
9373: vpsrldq Hx,Ux,Ib (66),(11B),(v1)
9386: psllq Nq,Ib (11B) | vpsllq Hx,Ux,Ib (66),(11B),(v1)
9397: vpslldq Hx,Ux,Ib (66),(11B),(v1)
Masami Hiramatsueb132962009-08-13 16:34:13 -0400940EndTable
941
942GrpTable: Grp15
Masami Hiramatsua9c373d2011-12-05 21:05:57 +09009430: fxsave | RDFSBASE Ry (F3),(11B)
9441: fxstor | RDGSBASE Ry (F3),(11B)
9452: vldmxcsr Md (v1) | WRFSBASE Ry (F3),(11B)
9463: vstmxcsr Md (v1) | WRGSBASE Ry (F3),(11B)
Masami Hiramatsueb132962009-08-13 16:34:13 -04009474: XSAVE
9485: XRSTOR | lfence (11B)
Adrian Hunterac1c8852015-09-02 15:15:29 +03009496: XSAVEOPT | clwb (66) | mfence (11B)
9507: clflush | clflushopt (66) | sfence (11B) | pcommit (66),(11B)
Masami Hiramatsueb132962009-08-13 16:34:13 -0400951EndTable
952
953GrpTable: Grp16
9540: prefetch NTA
9551: prefetch T0
9562: prefetch T1
9573: prefetch T2
958EndTable
959
Masami Hiramatsua9c373d2011-12-05 21:05:57 +0900960GrpTable: Grp17
9611: BLSR By,Ey (v)
9622: BLSMSK By,Ey (v)
9633: BLSI By,Ey (v)
964EndTable
965
Masami Hiramatsud1baf5a2009-10-16 20:07:44 -0400966# AMD's Prefetch Group
967GrpTable: GrpP
9680: PREFETCH
9691: PREFETCHW
970EndTable
971
Masami Hiramatsuc0b11d32009-09-25 11:20:38 -0700972GrpTable: GrpPDLK
9730: MONTMUL
9741: XSHA1
9752: XSHA2
976EndTable
977
Masami Hiramatsueb132962009-08-13 16:34:13 -0400978GrpTable: GrpRNG
9790: xstore-rng
9801: xcrypt-ecb
9812: xcrypt-cbc
9824: xcrypt-cfb
9835: xcrypt-ofb
984EndTable