x86-opcode-map.txt 31 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064
  1. # x86 Opcode Maps
  2. #
  3. # This is (mostly) based on following documentations.
  4. # - Intel(R) 64 and IA-32 Architectures Software Developer's Manual Vol.2C
  5. # (#326018-047US, June 2013)
  6. #
  7. #<Opcode maps>
  8. # Table: table-name
  9. # Referrer: escaped-name
  10. # AVXcode: avx-code
  11. # opcode: mnemonic|GrpXXX [operand1[,operand2...]] [(extra1)[,(extra2)...] [| 2nd-mnemonic ...]
  12. # (or)
  13. # opcode: escape # escaped-name
  14. # EndTable
  15. #
  16. # mnemonics that begin with lowercase 'v' accept a VEX or EVEX prefix
  17. # mnemonics that begin with lowercase 'k' accept a VEX prefix
  18. #
  19. #<group maps>
  20. # GrpTable: GrpXXX
  21. # reg: mnemonic [operand1[,operand2...]] [(extra1)[,(extra2)...] [| 2nd-mnemonic ...]
  22. # EndTable
  23. #
  24. # AVX Superscripts
  25. # (ev): this opcode requires EVEX prefix.
  26. # (evo): this opcode is changed by EVEX prefix (EVEX opcode)
  27. # (v): this opcode requires VEX prefix.
  28. # (v1): this opcode only supports 128bit VEX.
  29. #
  30. # Last Prefix Superscripts
  31. # - (66): the last prefix is 0x66
  32. # - (F3): the last prefix is 0xF3
  33. # - (F2): the last prefix is 0xF2
  34. # - (!F3) : the last prefix is not 0xF3 (including non-last prefix case)
  35. # - (66&F2): Both 0x66 and 0xF2 prefixes are specified.
  36. Table: one byte opcode
  37. Referrer:
  38. AVXcode:
  39. # 0x00 - 0x0f
  40. 00: ADD Eb,Gb
  41. 01: ADD Ev,Gv
  42. 02: ADD Gb,Eb
  43. 03: ADD Gv,Ev
  44. 04: ADD AL,Ib
  45. 05: ADD rAX,Iz
  46. 06: PUSH ES (i64)
  47. 07: POP ES (i64)
  48. 08: OR Eb,Gb
  49. 09: OR Ev,Gv
  50. 0a: OR Gb,Eb
  51. 0b: OR Gv,Ev
  52. 0c: OR AL,Ib
  53. 0d: OR rAX,Iz
  54. 0e: PUSH CS (i64)
  55. 0f: escape # 2-byte escape
  56. # 0x10 - 0x1f
  57. 10: ADC Eb,Gb
  58. 11: ADC Ev,Gv
  59. 12: ADC Gb,Eb
  60. 13: ADC Gv,Ev
  61. 14: ADC AL,Ib
  62. 15: ADC rAX,Iz
  63. 16: PUSH SS (i64)
  64. 17: POP SS (i64)
  65. 18: SBB Eb,Gb
  66. 19: SBB Ev,Gv
  67. 1a: SBB Gb,Eb
  68. 1b: SBB Gv,Ev
  69. 1c: SBB AL,Ib
  70. 1d: SBB rAX,Iz
  71. 1e: PUSH DS (i64)
  72. 1f: POP DS (i64)
  73. # 0x20 - 0x2f
  74. 20: AND Eb,Gb
  75. 21: AND Ev,Gv
  76. 22: AND Gb,Eb
  77. 23: AND Gv,Ev
  78. 24: AND AL,Ib
  79. 25: AND rAx,Iz
  80. 26: SEG=ES (Prefix)
  81. 27: DAA (i64)
  82. 28: SUB Eb,Gb
  83. 29: SUB Ev,Gv
  84. 2a: SUB Gb,Eb
  85. 2b: SUB Gv,Ev
  86. 2c: SUB AL,Ib
  87. 2d: SUB rAX,Iz
  88. 2e: SEG=CS (Prefix)
  89. 2f: DAS (i64)
  90. # 0x30 - 0x3f
  91. 30: XOR Eb,Gb
  92. 31: XOR Ev,Gv
  93. 32: XOR Gb,Eb
  94. 33: XOR Gv,Ev
  95. 34: XOR AL,Ib
  96. 35: XOR rAX,Iz
  97. 36: SEG=SS (Prefix)
  98. 37: AAA (i64)
  99. 38: CMP Eb,Gb
  100. 39: CMP Ev,Gv
  101. 3a: CMP Gb,Eb
  102. 3b: CMP Gv,Ev
  103. 3c: CMP AL,Ib
  104. 3d: CMP rAX,Iz
  105. 3e: SEG=DS (Prefix)
  106. 3f: AAS (i64)
  107. # 0x40 - 0x4f
  108. 40: INC eAX (i64) | REX (o64)
  109. 41: INC eCX (i64) | REX.B (o64)
  110. 42: INC eDX (i64) | REX.X (o64)
  111. 43: INC eBX (i64) | REX.XB (o64)
  112. 44: INC eSP (i64) | REX.R (o64)
  113. 45: INC eBP (i64) | REX.RB (o64)
  114. 46: INC eSI (i64) | REX.RX (o64)
  115. 47: INC eDI (i64) | REX.RXB (o64)
  116. 48: DEC eAX (i64) | REX.W (o64)
  117. 49: DEC eCX (i64) | REX.WB (o64)
  118. 4a: DEC eDX (i64) | REX.WX (o64)
  119. 4b: DEC eBX (i64) | REX.WXB (o64)
  120. 4c: DEC eSP (i64) | REX.WR (o64)
  121. 4d: DEC eBP (i64) | REX.WRB (o64)
  122. 4e: DEC eSI (i64) | REX.WRX (o64)
  123. 4f: DEC eDI (i64) | REX.WRXB (o64)
  124. # 0x50 - 0x5f
  125. 50: PUSH rAX/r8 (d64)
  126. 51: PUSH rCX/r9 (d64)
  127. 52: PUSH rDX/r10 (d64)
  128. 53: PUSH rBX/r11 (d64)
  129. 54: PUSH rSP/r12 (d64)
  130. 55: PUSH rBP/r13 (d64)
  131. 56: PUSH rSI/r14 (d64)
  132. 57: PUSH rDI/r15 (d64)
  133. 58: POP rAX/r8 (d64)
  134. 59: POP rCX/r9 (d64)
  135. 5a: POP rDX/r10 (d64)
  136. 5b: POP rBX/r11 (d64)
  137. 5c: POP rSP/r12 (d64)
  138. 5d: POP rBP/r13 (d64)
  139. 5e: POP rSI/r14 (d64)
  140. 5f: POP rDI/r15 (d64)
  141. # 0x60 - 0x6f
  142. 60: PUSHA/PUSHAD (i64)
  143. 61: POPA/POPAD (i64)
  144. 62: BOUND Gv,Ma (i64) | EVEX (Prefix)
  145. 63: ARPL Ew,Gw (i64) | MOVSXD Gv,Ev (o64)
  146. 64: SEG=FS (Prefix)
  147. 65: SEG=GS (Prefix)
  148. 66: Operand-Size (Prefix)
  149. 67: Address-Size (Prefix)
  150. 68: PUSH Iz (d64)
  151. 69: IMUL Gv,Ev,Iz
  152. 6a: PUSH Ib (d64)
  153. 6b: IMUL Gv,Ev,Ib
  154. 6c: INS/INSB Yb,DX
  155. 6d: INS/INSW/INSD Yz,DX
  156. 6e: OUTS/OUTSB DX,Xb
  157. 6f: OUTS/OUTSW/OUTSD DX,Xz
  158. # 0x70 - 0x7f
  159. 70: JO Jb
  160. 71: JNO Jb
  161. 72: JB/JNAE/JC Jb
  162. 73: JNB/JAE/JNC Jb
  163. 74: JZ/JE Jb
  164. 75: JNZ/JNE Jb
  165. 76: JBE/JNA Jb
  166. 77: JNBE/JA Jb
  167. 78: JS Jb
  168. 79: JNS Jb
  169. 7a: JP/JPE Jb
  170. 7b: JNP/JPO Jb
  171. 7c: JL/JNGE Jb
  172. 7d: JNL/JGE Jb
  173. 7e: JLE/JNG Jb
  174. 7f: JNLE/JG Jb
  175. # 0x80 - 0x8f
  176. 80: Grp1 Eb,Ib (1A)
  177. 81: Grp1 Ev,Iz (1A)
  178. 82: Grp1 Eb,Ib (1A),(i64)
  179. 83: Grp1 Ev,Ib (1A)
  180. 84: TEST Eb,Gb
  181. 85: TEST Ev,Gv
  182. 86: XCHG Eb,Gb
  183. 87: XCHG Ev,Gv
  184. 88: MOV Eb,Gb
  185. 89: MOV Ev,Gv
  186. 8a: MOV Gb,Eb
  187. 8b: MOV Gv,Ev
  188. 8c: MOV Ev,Sw
  189. 8d: LEA Gv,M
  190. 8e: MOV Sw,Ew
  191. 8f: Grp1A (1A) | POP Ev (d64)
  192. # 0x90 - 0x9f
  193. 90: NOP | PAUSE (F3) | XCHG r8,rAX
  194. 91: XCHG rCX/r9,rAX
  195. 92: XCHG rDX/r10,rAX
  196. 93: XCHG rBX/r11,rAX
  197. 94: XCHG rSP/r12,rAX
  198. 95: XCHG rBP/r13,rAX
  199. 96: XCHG rSI/r14,rAX
  200. 97: XCHG rDI/r15,rAX
  201. 98: CBW/CWDE/CDQE
  202. 99: CWD/CDQ/CQO
  203. 9a: CALLF Ap (i64)
  204. 9b: FWAIT/WAIT
  205. 9c: PUSHF/D/Q Fv (d64)
  206. 9d: POPF/D/Q Fv (d64)
  207. 9e: SAHF
  208. 9f: LAHF
  209. # 0xa0 - 0xaf
  210. a0: MOV AL,Ob
  211. a1: MOV rAX,Ov
  212. a2: MOV Ob,AL
  213. a3: MOV Ov,rAX
  214. a4: MOVS/B Yb,Xb
  215. a5: MOVS/W/D/Q Yv,Xv
  216. a6: CMPS/B Xb,Yb
  217. a7: CMPS/W/D Xv,Yv
  218. a8: TEST AL,Ib
  219. a9: TEST rAX,Iz
  220. aa: STOS/B Yb,AL
  221. ab: STOS/W/D/Q Yv,rAX
  222. ac: LODS/B AL,Xb
  223. ad: LODS/W/D/Q rAX,Xv
  224. ae: SCAS/B AL,Yb
  225. # Note: The May 2011 Intel manual shows Xv for the second parameter of the
  226. # next instruction but Yv is correct
  227. af: SCAS/W/D/Q rAX,Yv
  228. # 0xb0 - 0xbf
  229. b0: MOV AL/R8L,Ib
  230. b1: MOV CL/R9L,Ib
  231. b2: MOV DL/R10L,Ib
  232. b3: MOV BL/R11L,Ib
  233. b4: MOV AH/R12L,Ib
  234. b5: MOV CH/R13L,Ib
  235. b6: MOV DH/R14L,Ib
  236. b7: MOV BH/R15L,Ib
  237. b8: MOV rAX/r8,Iv
  238. b9: MOV rCX/r9,Iv
  239. ba: MOV rDX/r10,Iv
  240. bb: MOV rBX/r11,Iv
  241. bc: MOV rSP/r12,Iv
  242. bd: MOV rBP/r13,Iv
  243. be: MOV rSI/r14,Iv
  244. bf: MOV rDI/r15,Iv
  245. # 0xc0 - 0xcf
  246. c0: Grp2 Eb,Ib (1A)
  247. c1: Grp2 Ev,Ib (1A)
  248. c2: RETN Iw (f64)
  249. c3: RETN
  250. c4: LES Gz,Mp (i64) | VEX+2byte (Prefix)
  251. c5: LDS Gz,Mp (i64) | VEX+1byte (Prefix)
  252. c6: Grp11A Eb,Ib (1A)
  253. c7: Grp11B Ev,Iz (1A)
  254. c8: ENTER Iw,Ib
  255. c9: LEAVE (d64)
  256. ca: RETF Iw
  257. cb: RETF
  258. cc: INT3
  259. cd: INT Ib
  260. ce: INTO (i64)
  261. cf: IRET/D/Q
  262. # 0xd0 - 0xdf
  263. d0: Grp2 Eb,1 (1A)
  264. d1: Grp2 Ev,1 (1A)
  265. d2: Grp2 Eb,CL (1A)
  266. d3: Grp2 Ev,CL (1A)
  267. d4: AAM Ib (i64)
  268. d5: AAD Ib (i64)
  269. d6:
  270. d7: XLAT/XLATB
  271. d8: ESC
  272. d9: ESC
  273. da: ESC
  274. db: ESC
  275. dc: ESC
  276. dd: ESC
  277. de: ESC
  278. df: ESC
  279. # 0xe0 - 0xef
  280. # Note: "forced64" is Intel CPU behavior: they ignore 0x66 prefix
  281. # in 64-bit mode. AMD CPUs accept 0x66 prefix, it causes RIP truncation
  282. # to 16 bits. In 32-bit mode, 0x66 is accepted by both Intel and AMD.
  283. e0: LOOPNE/LOOPNZ Jb (f64)
  284. e1: LOOPE/LOOPZ Jb (f64)
  285. e2: LOOP Jb (f64)
  286. e3: JrCXZ Jb (f64)
  287. e4: IN AL,Ib
  288. e5: IN eAX,Ib
  289. e6: OUT Ib,AL
  290. e7: OUT Ib,eAX
  291. # With 0x66 prefix in 64-bit mode, for AMD CPUs immediate offset
  292. # in "near" jumps and calls is 16-bit. For CALL,
  293. # push of return address is 16-bit wide, RSP is decremented by 2
  294. # but is not truncated to 16 bits, unlike RIP.
  295. e8: CALL Jz (f64)
  296. e9: JMP-near Jz (f64)
  297. ea: JMP-far Ap (i64)
  298. eb: JMP-short Jb (f64)
  299. ec: IN AL,DX
  300. ed: IN eAX,DX
  301. ee: OUT DX,AL
  302. ef: OUT DX,eAX
  303. # 0xf0 - 0xff
  304. f0: LOCK (Prefix)
  305. f1:
  306. f2: REPNE (Prefix) | XACQUIRE (Prefix)
  307. f3: REP/REPE (Prefix) | XRELEASE (Prefix)
  308. f4: HLT
  309. f5: CMC
  310. f6: Grp3_1 Eb (1A)
  311. f7: Grp3_2 Ev (1A)
  312. f8: CLC
  313. f9: STC
  314. fa: CLI
  315. fb: STI
  316. fc: CLD
  317. fd: STD
  318. fe: Grp4 (1A)
  319. ff: Grp5 (1A)
  320. EndTable
  321. Table: 2-byte opcode (0x0f)
  322. Referrer: 2-byte escape
  323. AVXcode: 1
  324. # 0x0f 0x00-0x0f
  325. 00: Grp6 (1A)
  326. 01: Grp7 (1A)
  327. 02: LAR Gv,Ew
  328. 03: LSL Gv,Ew
  329. 04:
  330. 05: SYSCALL (o64)
  331. 06: CLTS
  332. 07: SYSRET (o64)
  333. 08: INVD
  334. 09: WBINVD
  335. 0a:
  336. 0b: UD2 (1B)
  337. 0c:
  338. # AMD's prefetch group. Intel supports prefetchw(/1) only.
  339. 0d: GrpP
  340. 0e: FEMMS
  341. # 3DNow! uses the last imm byte as opcode extension.
  342. 0f: 3DNow! Pq,Qq,Ib
  343. # 0x0f 0x10-0x1f
  344. # NOTE: According to Intel SDM opcode map, vmovups and vmovupd has no operands
  345. # but it actually has operands. And also, vmovss and vmovsd only accept 128bit.
  346. # MOVSS/MOVSD has too many forms(3) on SDM. This map just shows a typical form.
  347. # Many AVX instructions lack v1 superscript, according to Intel AVX-Prgramming
  348. # Reference A.1
  349. 10: vmovups Vps,Wps | vmovupd Vpd,Wpd (66) | vmovss Vx,Hx,Wss (F3),(v1) | vmovsd Vx,Hx,Wsd (F2),(v1)
  350. 11: vmovups Wps,Vps | vmovupd Wpd,Vpd (66) | vmovss Wss,Hx,Vss (F3),(v1) | vmovsd Wsd,Hx,Vsd (F2),(v1)
  351. 12: vmovlps Vq,Hq,Mq (v1) | vmovhlps Vq,Hq,Uq (v1) | vmovlpd Vq,Hq,Mq (66),(v1) | vmovsldup Vx,Wx (F3) | vmovddup Vx,Wx (F2)
  352. 13: vmovlps Mq,Vq (v1) | vmovlpd Mq,Vq (66),(v1)
  353. 14: vunpcklps Vx,Hx,Wx | vunpcklpd Vx,Hx,Wx (66)
  354. 15: vunpckhps Vx,Hx,Wx | vunpckhpd Vx,Hx,Wx (66)
  355. 16: vmovhps Vdq,Hq,Mq (v1) | vmovlhps Vdq,Hq,Uq (v1) | vmovhpd Vdq,Hq,Mq (66),(v1) | vmovshdup Vx,Wx (F3)
  356. 17: vmovhps Mq,Vq (v1) | vmovhpd Mq,Vq (66),(v1)
  357. 18: Grp16 (1A)
  358. 19:
  359. # Intel SDM opcode map does not list MPX instructions. For now using Gv for
  360. # bnd registers and Ev for everything else is OK because the instruction
  361. # decoder does not use the information except as an indication that there is
  362. # a ModR/M byte.
  363. 1a: BNDCL Gv,Ev (F3) | BNDCU Gv,Ev (F2) | BNDMOV Gv,Ev (66) | BNDLDX Gv,Ev
  364. 1b: BNDCN Gv,Ev (F2) | BNDMOV Ev,Gv (66) | BNDMK Gv,Ev (F3) | BNDSTX Ev,Gv
  365. 1c:
  366. 1d:
  367. 1e:
  368. 1f: NOP Ev
  369. # 0x0f 0x20-0x2f
  370. 20: MOV Rd,Cd
  371. 21: MOV Rd,Dd
  372. 22: MOV Cd,Rd
  373. 23: MOV Dd,Rd
  374. 24:
  375. 25:
  376. 26:
  377. 27:
  378. 28: vmovaps Vps,Wps | vmovapd Vpd,Wpd (66)
  379. 29: vmovaps Wps,Vps | vmovapd Wpd,Vpd (66)
  380. 2a: cvtpi2ps Vps,Qpi | cvtpi2pd Vpd,Qpi (66) | vcvtsi2ss Vss,Hss,Ey (F3),(v1) | vcvtsi2sd Vsd,Hsd,Ey (F2),(v1)
  381. 2b: vmovntps Mps,Vps | vmovntpd Mpd,Vpd (66)
  382. 2c: cvttps2pi Ppi,Wps | cvttpd2pi Ppi,Wpd (66) | vcvttss2si Gy,Wss (F3),(v1) | vcvttsd2si Gy,Wsd (F2),(v1)
  383. 2d: cvtps2pi Ppi,Wps | cvtpd2pi Qpi,Wpd (66) | vcvtss2si Gy,Wss (F3),(v1) | vcvtsd2si Gy,Wsd (F2),(v1)
  384. 2e: vucomiss Vss,Wss (v1) | vucomisd Vsd,Wsd (66),(v1)
  385. 2f: vcomiss Vss,Wss (v1) | vcomisd Vsd,Wsd (66),(v1)
  386. # 0x0f 0x30-0x3f
  387. 30: WRMSR
  388. 31: RDTSC
  389. 32: RDMSR
  390. 33: RDPMC
  391. 34: SYSENTER
  392. 35: SYSEXIT
  393. 36:
  394. 37: GETSEC
  395. 38: escape # 3-byte escape 1
  396. 39:
  397. 3a: escape # 3-byte escape 2
  398. 3b:
  399. 3c:
  400. 3d:
  401. 3e:
  402. 3f:
  403. # 0x0f 0x40-0x4f
  404. 40: CMOVO Gv,Ev
  405. 41: CMOVNO Gv,Ev | kandw/q Vk,Hk,Uk | kandb/d Vk,Hk,Uk (66)
  406. 42: CMOVB/C/NAE Gv,Ev | kandnw/q Vk,Hk,Uk | kandnb/d Vk,Hk,Uk (66)
  407. 43: CMOVAE/NB/NC Gv,Ev
  408. 44: CMOVE/Z Gv,Ev | knotw/q Vk,Uk | knotb/d Vk,Uk (66)
  409. 45: CMOVNE/NZ Gv,Ev | korw/q Vk,Hk,Uk | korb/d Vk,Hk,Uk (66)
  410. 46: CMOVBE/NA Gv,Ev | kxnorw/q Vk,Hk,Uk | kxnorb/d Vk,Hk,Uk (66)
  411. 47: CMOVA/NBE Gv,Ev | kxorw/q Vk,Hk,Uk | kxorb/d Vk,Hk,Uk (66)
  412. 48: CMOVS Gv,Ev
  413. 49: CMOVNS Gv,Ev
  414. 4a: CMOVP/PE Gv,Ev | kaddw/q Vk,Hk,Uk | kaddb/d Vk,Hk,Uk (66)
  415. 4b: CMOVNP/PO Gv,Ev | kunpckbw Vk,Hk,Uk (66) | kunpckwd/dq Vk,Hk,Uk
  416. 4c: CMOVL/NGE Gv,Ev
  417. 4d: CMOVNL/GE Gv,Ev
  418. 4e: CMOVLE/NG Gv,Ev
  419. 4f: CMOVNLE/G Gv,Ev
  420. # 0x0f 0x50-0x5f
  421. 50: vmovmskps Gy,Ups | vmovmskpd Gy,Upd (66)
  422. 51: vsqrtps Vps,Wps | vsqrtpd Vpd,Wpd (66) | vsqrtss Vss,Hss,Wss (F3),(v1) | vsqrtsd Vsd,Hsd,Wsd (F2),(v1)
  423. 52: vrsqrtps Vps,Wps | vrsqrtss Vss,Hss,Wss (F3),(v1)
  424. 53: vrcpps Vps,Wps | vrcpss Vss,Hss,Wss (F3),(v1)
  425. 54: vandps Vps,Hps,Wps | vandpd Vpd,Hpd,Wpd (66)
  426. 55: vandnps Vps,Hps,Wps | vandnpd Vpd,Hpd,Wpd (66)
  427. 56: vorps Vps,Hps,Wps | vorpd Vpd,Hpd,Wpd (66)
  428. 57: vxorps Vps,Hps,Wps | vxorpd Vpd,Hpd,Wpd (66)
  429. 58: vaddps Vps,Hps,Wps | vaddpd Vpd,Hpd,Wpd (66) | vaddss Vss,Hss,Wss (F3),(v1) | vaddsd Vsd,Hsd,Wsd (F2),(v1)
  430. 59: vmulps Vps,Hps,Wps | vmulpd Vpd,Hpd,Wpd (66) | vmulss Vss,Hss,Wss (F3),(v1) | vmulsd Vsd,Hsd,Wsd (F2),(v1)
  431. 5a: vcvtps2pd Vpd,Wps | vcvtpd2ps Vps,Wpd (66) | vcvtss2sd Vsd,Hx,Wss (F3),(v1) | vcvtsd2ss Vss,Hx,Wsd (F2),(v1)
  432. 5b: vcvtdq2ps Vps,Wdq | vcvtqq2ps Vps,Wqq (evo) | vcvtps2dq Vdq,Wps (66) | vcvttps2dq Vdq,Wps (F3)
  433. 5c: vsubps Vps,Hps,Wps | vsubpd Vpd,Hpd,Wpd (66) | vsubss Vss,Hss,Wss (F3),(v1) | vsubsd Vsd,Hsd,Wsd (F2),(v1)
  434. 5d: vminps Vps,Hps,Wps | vminpd Vpd,Hpd,Wpd (66) | vminss Vss,Hss,Wss (F3),(v1) | vminsd Vsd,Hsd,Wsd (F2),(v1)
  435. 5e: vdivps Vps,Hps,Wps | vdivpd Vpd,Hpd,Wpd (66) | vdivss Vss,Hss,Wss (F3),(v1) | vdivsd Vsd,Hsd,Wsd (F2),(v1)
  436. 5f: vmaxps Vps,Hps,Wps | vmaxpd Vpd,Hpd,Wpd (66) | vmaxss Vss,Hss,Wss (F3),(v1) | vmaxsd Vsd,Hsd,Wsd (F2),(v1)
  437. # 0x0f 0x60-0x6f
  438. 60: punpcklbw Pq,Qd | vpunpcklbw Vx,Hx,Wx (66),(v1)
  439. 61: punpcklwd Pq,Qd | vpunpcklwd Vx,Hx,Wx (66),(v1)
  440. 62: punpckldq Pq,Qd | vpunpckldq Vx,Hx,Wx (66),(v1)
  441. 63: packsswb Pq,Qq | vpacksswb Vx,Hx,Wx (66),(v1)
  442. 64: pcmpgtb Pq,Qq | vpcmpgtb Vx,Hx,Wx (66),(v1)
  443. 65: pcmpgtw Pq,Qq | vpcmpgtw Vx,Hx,Wx (66),(v1)
  444. 66: pcmpgtd Pq,Qq | vpcmpgtd Vx,Hx,Wx (66),(v1)
  445. 67: packuswb Pq,Qq | vpackuswb Vx,Hx,Wx (66),(v1)
  446. 68: punpckhbw Pq,Qd | vpunpckhbw Vx,Hx,Wx (66),(v1)
  447. 69: punpckhwd Pq,Qd | vpunpckhwd Vx,Hx,Wx (66),(v1)
  448. 6a: punpckhdq Pq,Qd | vpunpckhdq Vx,Hx,Wx (66),(v1)
  449. 6b: packssdw Pq,Qd | vpackssdw Vx,Hx,Wx (66),(v1)
  450. 6c: vpunpcklqdq Vx,Hx,Wx (66),(v1)
  451. 6d: vpunpckhqdq Vx,Hx,Wx (66),(v1)
  452. 6e: movd/q Pd,Ey | vmovd/q Vy,Ey (66),(v1)
  453. 6f: movq Pq,Qq | vmovdqa Vx,Wx (66) | vmovdqa32/64 Vx,Wx (66),(evo) | vmovdqu Vx,Wx (F3) | vmovdqu32/64 Vx,Wx (F3),(evo) | vmovdqu8/16 Vx,Wx (F2),(ev)
  454. # 0x0f 0x70-0x7f
  455. 70: pshufw Pq,Qq,Ib | vpshufd Vx,Wx,Ib (66),(v1) | vpshufhw Vx,Wx,Ib (F3),(v1) | vpshuflw Vx,Wx,Ib (F2),(v1)
  456. 71: Grp12 (1A)
  457. 72: Grp13 (1A)
  458. 73: Grp14 (1A)
  459. 74: pcmpeqb Pq,Qq | vpcmpeqb Vx,Hx,Wx (66),(v1)
  460. 75: pcmpeqw Pq,Qq | vpcmpeqw Vx,Hx,Wx (66),(v1)
  461. 76: pcmpeqd Pq,Qq | vpcmpeqd Vx,Hx,Wx (66),(v1)
  462. # Note: Remove (v), because vzeroall and vzeroupper becomes emms without VEX.
  463. 77: emms | vzeroupper | vzeroall
  464. 78: VMREAD Ey,Gy | vcvttps2udq/pd2udq Vx,Wpd (evo) | vcvttsd2usi Gv,Wx (F2),(ev) | vcvttss2usi Gv,Wx (F3),(ev) | vcvttps2uqq/pd2uqq Vx,Wx (66),(ev)
  465. 79: VMWRITE Gy,Ey | vcvtps2udq/pd2udq Vx,Wpd (evo) | vcvtsd2usi Gv,Wx (F2),(ev) | vcvtss2usi Gv,Wx (F3),(ev) | vcvtps2uqq/pd2uqq Vx,Wx (66),(ev)
  466. 7a: vcvtudq2pd/uqq2pd Vpd,Wx (F3),(ev) | vcvtudq2ps/uqq2ps Vpd,Wx (F2),(ev) | vcvttps2qq/pd2qq Vx,Wx (66),(ev)
  467. 7b: vcvtusi2sd Vpd,Hpd,Ev (F2),(ev) | vcvtusi2ss Vps,Hps,Ev (F3),(ev) | vcvtps2qq/pd2qq Vx,Wx (66),(ev)
  468. 7c: vhaddpd Vpd,Hpd,Wpd (66) | vhaddps Vps,Hps,Wps (F2)
  469. 7d: vhsubpd Vpd,Hpd,Wpd (66) | vhsubps Vps,Hps,Wps (F2)
  470. 7e: movd/q Ey,Pd | vmovd/q Ey,Vy (66),(v1) | vmovq Vq,Wq (F3),(v1)
  471. 7f: movq Qq,Pq | vmovdqa Wx,Vx (66) | vmovdqa32/64 Wx,Vx (66),(evo) | vmovdqu Wx,Vx (F3) | vmovdqu32/64 Wx,Vx (F3),(evo) | vmovdqu8/16 Wx,Vx (F2),(ev)
  472. # 0x0f 0x80-0x8f
  473. # Note: "forced64" is Intel CPU behavior (see comment about CALL insn).
  474. 80: JO Jz (f64)
  475. 81: JNO Jz (f64)
  476. 82: JB/JC/JNAE Jz (f64)
  477. 83: JAE/JNB/JNC Jz (f64)
  478. 84: JE/JZ Jz (f64)
  479. 85: JNE/JNZ Jz (f64)
  480. 86: JBE/JNA Jz (f64)
  481. 87: JA/JNBE Jz (f64)
  482. 88: JS Jz (f64)
  483. 89: JNS Jz (f64)
  484. 8a: JP/JPE Jz (f64)
  485. 8b: JNP/JPO Jz (f64)
  486. 8c: JL/JNGE Jz (f64)
  487. 8d: JNL/JGE Jz (f64)
  488. 8e: JLE/JNG Jz (f64)
  489. 8f: JNLE/JG Jz (f64)
  490. # 0x0f 0x90-0x9f
  491. 90: SETO Eb | kmovw/q Vk,Wk | kmovb/d Vk,Wk (66)
  492. 91: SETNO Eb | kmovw/q Mv,Vk | kmovb/d Mv,Vk (66)
  493. 92: SETB/C/NAE Eb | kmovw Vk,Rv | kmovb Vk,Rv (66) | kmovq/d Vk,Rv (F2)
  494. 93: SETAE/NB/NC Eb | kmovw Gv,Uk | kmovb Gv,Uk (66) | kmovq/d Gv,Uk (F2)
  495. 94: SETE/Z Eb
  496. 95: SETNE/NZ Eb
  497. 96: SETBE/NA Eb
  498. 97: SETA/NBE Eb
  499. 98: SETS Eb | kortestw/q Vk,Uk | kortestb/d Vk,Uk (66)
  500. 99: SETNS Eb | ktestw/q Vk,Uk | ktestb/d Vk,Uk (66)
  501. 9a: SETP/PE Eb
  502. 9b: SETNP/PO Eb
  503. 9c: SETL/NGE Eb
  504. 9d: SETNL/GE Eb
  505. 9e: SETLE/NG Eb
  506. 9f: SETNLE/G Eb
  507. # 0x0f 0xa0-0xaf
  508. a0: PUSH FS (d64)
  509. a1: POP FS (d64)
  510. a2: CPUID
  511. a3: BT Ev,Gv
  512. a4: SHLD Ev,Gv,Ib
  513. a5: SHLD Ev,Gv,CL
  514. a6: GrpPDLK
  515. a7: GrpRNG
  516. a8: PUSH GS (d64)
  517. a9: POP GS (d64)
  518. aa: RSM
  519. ab: BTS Ev,Gv
  520. ac: SHRD Ev,Gv,Ib
  521. ad: SHRD Ev,Gv,CL
  522. ae: Grp15 (1A),(1C)
  523. af: IMUL Gv,Ev
  524. # 0x0f 0xb0-0xbf
  525. b0: CMPXCHG Eb,Gb
  526. b1: CMPXCHG Ev,Gv
  527. b2: LSS Gv,Mp
  528. b3: BTR Ev,Gv
  529. b4: LFS Gv,Mp
  530. b5: LGS Gv,Mp
  531. b6: MOVZX Gv,Eb
  532. b7: MOVZX Gv,Ew
  533. b8: JMPE (!F3) | POPCNT Gv,Ev (F3)
  534. b9: Grp10 (1A)
  535. ba: Grp8 Ev,Ib (1A)
  536. bb: BTC Ev,Gv
  537. bc: BSF Gv,Ev (!F3) | TZCNT Gv,Ev (F3)
  538. bd: BSR Gv,Ev (!F3) | LZCNT Gv,Ev (F3)
  539. be: MOVSX Gv,Eb
  540. bf: MOVSX Gv,Ew
  541. # 0x0f 0xc0-0xcf
  542. c0: XADD Eb,Gb
  543. c1: XADD Ev,Gv
  544. c2: 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)
  545. c3: movnti My,Gy
  546. c4: pinsrw Pq,Ry/Mw,Ib | vpinsrw Vdq,Hdq,Ry/Mw,Ib (66),(v1)
  547. c5: pextrw Gd,Nq,Ib | vpextrw Gd,Udq,Ib (66),(v1)
  548. c6: vshufps Vps,Hps,Wps,Ib | vshufpd Vpd,Hpd,Wpd,Ib (66)
  549. c7: Grp9 (1A)
  550. c8: BSWAP RAX/EAX/R8/R8D
  551. c9: BSWAP RCX/ECX/R9/R9D
  552. ca: BSWAP RDX/EDX/R10/R10D
  553. cb: BSWAP RBX/EBX/R11/R11D
  554. cc: BSWAP RSP/ESP/R12/R12D
  555. cd: BSWAP RBP/EBP/R13/R13D
  556. ce: BSWAP RSI/ESI/R14/R14D
  557. cf: BSWAP RDI/EDI/R15/R15D
  558. # 0x0f 0xd0-0xdf
  559. d0: vaddsubpd Vpd,Hpd,Wpd (66) | vaddsubps Vps,Hps,Wps (F2)
  560. d1: psrlw Pq,Qq | vpsrlw Vx,Hx,Wx (66),(v1)
  561. d2: psrld Pq,Qq | vpsrld Vx,Hx,Wx (66),(v1)
  562. d3: psrlq Pq,Qq | vpsrlq Vx,Hx,Wx (66),(v1)
  563. d4: paddq Pq,Qq | vpaddq Vx,Hx,Wx (66),(v1)
  564. d5: pmullw Pq,Qq | vpmullw Vx,Hx,Wx (66),(v1)
  565. d6: vmovq Wq,Vq (66),(v1) | movq2dq Vdq,Nq (F3) | movdq2q Pq,Uq (F2)
  566. d7: pmovmskb Gd,Nq | vpmovmskb Gd,Ux (66),(v1)
  567. d8: psubusb Pq,Qq | vpsubusb Vx,Hx,Wx (66),(v1)
  568. d9: psubusw Pq,Qq | vpsubusw Vx,Hx,Wx (66),(v1)
  569. da: pminub Pq,Qq | vpminub Vx,Hx,Wx (66),(v1)
  570. db: pand Pq,Qq | vpand Vx,Hx,Wx (66),(v1) | vpandd/q Vx,Hx,Wx (66),(evo)
  571. dc: paddusb Pq,Qq | vpaddusb Vx,Hx,Wx (66),(v1)
  572. dd: paddusw Pq,Qq | vpaddusw Vx,Hx,Wx (66),(v1)
  573. de: pmaxub Pq,Qq | vpmaxub Vx,Hx,Wx (66),(v1)
  574. df: pandn Pq,Qq | vpandn Vx,Hx,Wx (66),(v1) | vpandnd/q Vx,Hx,Wx (66),(evo)
  575. # 0x0f 0xe0-0xef
  576. e0: pavgb Pq,Qq | vpavgb Vx,Hx,Wx (66),(v1)
  577. e1: psraw Pq,Qq | vpsraw Vx,Hx,Wx (66),(v1)
  578. e2: psrad Pq,Qq | vpsrad Vx,Hx,Wx (66),(v1)
  579. e3: pavgw Pq,Qq | vpavgw Vx,Hx,Wx (66),(v1)
  580. e4: pmulhuw Pq,Qq | vpmulhuw Vx,Hx,Wx (66),(v1)
  581. e5: pmulhw Pq,Qq | vpmulhw Vx,Hx,Wx (66),(v1)
  582. e6: vcvttpd2dq Vx,Wpd (66) | vcvtdq2pd Vx,Wdq (F3) | vcvtdq2pd/qq2pd Vx,Wdq (F3),(evo) | vcvtpd2dq Vx,Wpd (F2)
  583. e7: movntq Mq,Pq | vmovntdq Mx,Vx (66)
  584. e8: psubsb Pq,Qq | vpsubsb Vx,Hx,Wx (66),(v1)
  585. e9: psubsw Pq,Qq | vpsubsw Vx,Hx,Wx (66),(v1)
  586. ea: pminsw Pq,Qq | vpminsw Vx,Hx,Wx (66),(v1)
  587. eb: por Pq,Qq | vpor Vx,Hx,Wx (66),(v1) | vpord/q Vx,Hx,Wx (66),(evo)
  588. ec: paddsb Pq,Qq | vpaddsb Vx,Hx,Wx (66),(v1)
  589. ed: paddsw Pq,Qq | vpaddsw Vx,Hx,Wx (66),(v1)
  590. ee: pmaxsw Pq,Qq | vpmaxsw Vx,Hx,Wx (66),(v1)
  591. ef: pxor Pq,Qq | vpxor Vx,Hx,Wx (66),(v1) | vpxord/q Vx,Hx,Wx (66),(evo)
  592. # 0x0f 0xf0-0xff
  593. f0: vlddqu Vx,Mx (F2)
  594. f1: psllw Pq,Qq | vpsllw Vx,Hx,Wx (66),(v1)
  595. f2: pslld Pq,Qq | vpslld Vx,Hx,Wx (66),(v1)
  596. f3: psllq Pq,Qq | vpsllq Vx,Hx,Wx (66),(v1)
  597. f4: pmuludq Pq,Qq | vpmuludq Vx,Hx,Wx (66),(v1)
  598. f5: pmaddwd Pq,Qq | vpmaddwd Vx,Hx,Wx (66),(v1)
  599. f6: psadbw Pq,Qq | vpsadbw Vx,Hx,Wx (66),(v1)
  600. f7: maskmovq Pq,Nq | vmaskmovdqu Vx,Ux (66),(v1)
  601. f8: psubb Pq,Qq | vpsubb Vx,Hx,Wx (66),(v1)
  602. f9: psubw Pq,Qq | vpsubw Vx,Hx,Wx (66),(v1)
  603. fa: psubd Pq,Qq | vpsubd Vx,Hx,Wx (66),(v1)
  604. fb: psubq Pq,Qq | vpsubq Vx,Hx,Wx (66),(v1)
  605. fc: paddb Pq,Qq | vpaddb Vx,Hx,Wx (66),(v1)
  606. fd: paddw Pq,Qq | vpaddw Vx,Hx,Wx (66),(v1)
  607. fe: paddd Pq,Qq | vpaddd Vx,Hx,Wx (66),(v1)
  608. ff:
  609. EndTable
  610. Table: 3-byte opcode 1 (0x0f 0x38)
  611. Referrer: 3-byte escape 1
  612. AVXcode: 2
  613. # 0x0f 0x38 0x00-0x0f
  614. 00: pshufb Pq,Qq | vpshufb Vx,Hx,Wx (66),(v1)
  615. 01: phaddw Pq,Qq | vphaddw Vx,Hx,Wx (66),(v1)
  616. 02: phaddd Pq,Qq | vphaddd Vx,Hx,Wx (66),(v1)
  617. 03: phaddsw Pq,Qq | vphaddsw Vx,Hx,Wx (66),(v1)
  618. 04: pmaddubsw Pq,Qq | vpmaddubsw Vx,Hx,Wx (66),(v1)
  619. 05: phsubw Pq,Qq | vphsubw Vx,Hx,Wx (66),(v1)
  620. 06: phsubd Pq,Qq | vphsubd Vx,Hx,Wx (66),(v1)
  621. 07: phsubsw Pq,Qq | vphsubsw Vx,Hx,Wx (66),(v1)
  622. 08: psignb Pq,Qq | vpsignb Vx,Hx,Wx (66),(v1)
  623. 09: psignw Pq,Qq | vpsignw Vx,Hx,Wx (66),(v1)
  624. 0a: psignd Pq,Qq | vpsignd Vx,Hx,Wx (66),(v1)
  625. 0b: pmulhrsw Pq,Qq | vpmulhrsw Vx,Hx,Wx (66),(v1)
  626. 0c: vpermilps Vx,Hx,Wx (66),(v)
  627. 0d: vpermilpd Vx,Hx,Wx (66),(v)
  628. 0e: vtestps Vx,Wx (66),(v)
  629. 0f: vtestpd Vx,Wx (66),(v)
  630. # 0x0f 0x38 0x10-0x1f
  631. 10: pblendvb Vdq,Wdq (66) | vpsrlvw Vx,Hx,Wx (66),(evo) | vpmovuswb Wx,Vx (F3),(ev)
  632. 11: vpmovusdb Wx,Vd (F3),(ev) | vpsravw Vx,Hx,Wx (66),(ev)
  633. 12: vpmovusqb Wx,Vq (F3),(ev) | vpsllvw Vx,Hx,Wx (66),(ev)
  634. 13: vcvtph2ps Vx,Wx (66),(v) | vpmovusdw Wx,Vd (F3),(ev)
  635. 14: blendvps Vdq,Wdq (66) | vpmovusqw Wx,Vq (F3),(ev) | vprorvd/q Vx,Hx,Wx (66),(evo)
  636. 15: blendvpd Vdq,Wdq (66) | vpmovusqd Wx,Vq (F3),(ev) | vprolvd/q Vx,Hx,Wx (66),(evo)
  637. 16: vpermps Vqq,Hqq,Wqq (66),(v) | vpermps/d Vqq,Hqq,Wqq (66),(evo)
  638. 17: vptest Vx,Wx (66)
  639. 18: vbroadcastss Vx,Wd (66),(v)
  640. 19: vbroadcastsd Vqq,Wq (66),(v) | vbroadcastf32x2 Vqq,Wq (66),(evo)
  641. 1a: vbroadcastf128 Vqq,Mdq (66),(v) | vbroadcastf32x4/64x2 Vqq,Wq (66),(evo)
  642. 1b: vbroadcastf32x8/64x4 Vqq,Mdq (66),(ev)
  643. 1c: pabsb Pq,Qq | vpabsb Vx,Wx (66),(v1)
  644. 1d: pabsw Pq,Qq | vpabsw Vx,Wx (66),(v1)
  645. 1e: pabsd Pq,Qq | vpabsd Vx,Wx (66),(v1)
  646. 1f: vpabsq Vx,Wx (66),(ev)
  647. # 0x0f 0x38 0x20-0x2f
  648. 20: vpmovsxbw Vx,Ux/Mq (66),(v1) | vpmovswb Wx,Vx (F3),(ev)
  649. 21: vpmovsxbd Vx,Ux/Md (66),(v1) | vpmovsdb Wx,Vd (F3),(ev)
  650. 22: vpmovsxbq Vx,Ux/Mw (66),(v1) | vpmovsqb Wx,Vq (F3),(ev)
  651. 23: vpmovsxwd Vx,Ux/Mq (66),(v1) | vpmovsdw Wx,Vd (F3),(ev)
  652. 24: vpmovsxwq Vx,Ux/Md (66),(v1) | vpmovsqw Wx,Vq (F3),(ev)
  653. 25: vpmovsxdq Vx,Ux/Mq (66),(v1) | vpmovsqd Wx,Vq (F3),(ev)
  654. 26: vptestmb/w Vk,Hx,Wx (66),(ev) | vptestnmb/w Vk,Hx,Wx (F3),(ev)
  655. 27: vptestmd/q Vk,Hx,Wx (66),(ev) | vptestnmd/q Vk,Hx,Wx (F3),(ev)
  656. 28: vpmuldq Vx,Hx,Wx (66),(v1) | vpmovm2b/w Vx,Uk (F3),(ev)
  657. 29: vpcmpeqq Vx,Hx,Wx (66),(v1) | vpmovb2m/w2m Vk,Ux (F3),(ev)
  658. 2a: vmovntdqa Vx,Mx (66),(v1) | vpbroadcastmb2q Vx,Uk (F3),(ev)
  659. 2b: vpackusdw Vx,Hx,Wx (66),(v1)
  660. 2c: vmaskmovps Vx,Hx,Mx (66),(v) | vscalefps/d Vx,Hx,Wx (66),(evo)
  661. 2d: vmaskmovpd Vx,Hx,Mx (66),(v) | vscalefss/d Vx,Hx,Wx (66),(evo)
  662. 2e: vmaskmovps Mx,Hx,Vx (66),(v)
  663. 2f: vmaskmovpd Mx,Hx,Vx (66),(v)
  664. # 0x0f 0x38 0x30-0x3f
  665. 30: vpmovzxbw Vx,Ux/Mq (66),(v1) | vpmovwb Wx,Vx (F3),(ev)
  666. 31: vpmovzxbd Vx,Ux/Md (66),(v1) | vpmovdb Wx,Vd (F3),(ev)
  667. 32: vpmovzxbq Vx,Ux/Mw (66),(v1) | vpmovqb Wx,Vq (F3),(ev)
  668. 33: vpmovzxwd Vx,Ux/Mq (66),(v1) | vpmovdw Wx,Vd (F3),(ev)
  669. 34: vpmovzxwq Vx,Ux/Md (66),(v1) | vpmovqw Wx,Vq (F3),(ev)
  670. 35: vpmovzxdq Vx,Ux/Mq (66),(v1) | vpmovqd Wx,Vq (F3),(ev)
  671. 36: vpermd Vqq,Hqq,Wqq (66),(v) | vpermd/q Vqq,Hqq,Wqq (66),(evo)
  672. 37: vpcmpgtq Vx,Hx,Wx (66),(v1)
  673. 38: vpminsb Vx,Hx,Wx (66),(v1) | vpmovm2d/q Vx,Uk (F3),(ev)
  674. 39: vpminsd Vx,Hx,Wx (66),(v1) | vpminsd/q Vx,Hx,Wx (66),(evo) | vpmovd2m/q2m Vk,Ux (F3),(ev)
  675. 3a: vpminuw Vx,Hx,Wx (66),(v1) | vpbroadcastmw2d Vx,Uk (F3),(ev)
  676. 3b: vpminud Vx,Hx,Wx (66),(v1) | vpminud/q Vx,Hx,Wx (66),(evo)
  677. 3c: vpmaxsb Vx,Hx,Wx (66),(v1)
  678. 3d: vpmaxsd Vx,Hx,Wx (66),(v1) | vpmaxsd/q Vx,Hx,Wx (66),(evo)
  679. 3e: vpmaxuw Vx,Hx,Wx (66),(v1)
  680. 3f: vpmaxud Vx,Hx,Wx (66),(v1) | vpmaxud/q Vx,Hx,Wx (66),(evo)
  681. # 0x0f 0x38 0x40-0x8f
  682. 40: vpmulld Vx,Hx,Wx (66),(v1) | vpmulld/q Vx,Hx,Wx (66),(evo)
  683. 41: vphminposuw Vdq,Wdq (66),(v1)
  684. 42: vgetexpps/d Vx,Wx (66),(ev)
  685. 43: vgetexpss/d Vx,Hx,Wx (66),(ev)
  686. 44: vplzcntd/q Vx,Wx (66),(ev)
  687. 45: vpsrlvd/q Vx,Hx,Wx (66),(v)
  688. 46: vpsravd Vx,Hx,Wx (66),(v) | vpsravd/q Vx,Hx,Wx (66),(evo)
  689. 47: vpsllvd/q Vx,Hx,Wx (66),(v)
  690. # Skip 0x48-0x4b
  691. 4c: vrcp14ps/d Vpd,Wpd (66),(ev)
  692. 4d: vrcp14ss/d Vsd,Hpd,Wsd (66),(ev)
  693. 4e: vrsqrt14ps/d Vpd,Wpd (66),(ev)
  694. 4f: vrsqrt14ss/d Vsd,Hsd,Wsd (66),(ev)
  695. # Skip 0x50-0x57
  696. 58: vpbroadcastd Vx,Wx (66),(v)
  697. 59: vpbroadcastq Vx,Wx (66),(v) | vbroadcasti32x2 Vx,Wx (66),(evo)
  698. 5a: vbroadcasti128 Vqq,Mdq (66),(v) | vbroadcasti32x4/64x2 Vx,Wx (66),(evo)
  699. 5b: vbroadcasti32x8/64x4 Vqq,Mdq (66),(ev)
  700. # Skip 0x5c-0x63
  701. 64: vpblendmd/q Vx,Hx,Wx (66),(ev)
  702. 65: vblendmps/d Vx,Hx,Wx (66),(ev)
  703. 66: vpblendmb/w Vx,Hx,Wx (66),(ev)
  704. # Skip 0x67-0x74
  705. 75: vpermi2b/w Vx,Hx,Wx (66),(ev)
  706. 76: vpermi2d/q Vx,Hx,Wx (66),(ev)
  707. 77: vpermi2ps/d Vx,Hx,Wx (66),(ev)
  708. 78: vpbroadcastb Vx,Wx (66),(v)
  709. 79: vpbroadcastw Vx,Wx (66),(v)
  710. 7a: vpbroadcastb Vx,Rv (66),(ev)
  711. 7b: vpbroadcastw Vx,Rv (66),(ev)
  712. 7c: vpbroadcastd/q Vx,Rv (66),(ev)
  713. 7d: vpermt2b/w Vx,Hx,Wx (66),(ev)
  714. 7e: vpermt2d/q Vx,Hx,Wx (66),(ev)
  715. 7f: vpermt2ps/d Vx,Hx,Wx (66),(ev)
  716. 80: INVEPT Gy,Mdq (66)
  717. 81: INVPID Gy,Mdq (66)
  718. 82: INVPCID Gy,Mdq (66)
  719. 83: vpmultishiftqb Vx,Hx,Wx (66),(ev)
  720. 88: vexpandps/d Vpd,Wpd (66),(ev)
  721. 89: vpexpandd/q Vx,Wx (66),(ev)
  722. 8a: vcompressps/d Wx,Vx (66),(ev)
  723. 8b: vpcompressd/q Wx,Vx (66),(ev)
  724. 8c: vpmaskmovd/q Vx,Hx,Mx (66),(v)
  725. 8d: vpermb/w Vx,Hx,Wx (66),(ev)
  726. 8e: vpmaskmovd/q Mx,Vx,Hx (66),(v)
  727. # 0x0f 0x38 0x90-0xbf (FMA)
  728. 90: vgatherdd/q Vx,Hx,Wx (66),(v) | vpgatherdd/q Vx,Wx (66),(evo)
  729. 91: vgatherqd/q Vx,Hx,Wx (66),(v) | vpgatherqd/q Vx,Wx (66),(evo)
  730. 92: vgatherdps/d Vx,Hx,Wx (66),(v)
  731. 93: vgatherqps/d Vx,Hx,Wx (66),(v)
  732. 94:
  733. 95:
  734. 96: vfmaddsub132ps/d Vx,Hx,Wx (66),(v)
  735. 97: vfmsubadd132ps/d Vx,Hx,Wx (66),(v)
  736. 98: vfmadd132ps/d Vx,Hx,Wx (66),(v)
  737. 99: vfmadd132ss/d Vx,Hx,Wx (66),(v),(v1)
  738. 9a: vfmsub132ps/d Vx,Hx,Wx (66),(v)
  739. 9b: vfmsub132ss/d Vx,Hx,Wx (66),(v),(v1)
  740. 9c: vfnmadd132ps/d Vx,Hx,Wx (66),(v)
  741. 9d: vfnmadd132ss/d Vx,Hx,Wx (66),(v),(v1)
  742. 9e: vfnmsub132ps/d Vx,Hx,Wx (66),(v)
  743. 9f: vfnmsub132ss/d Vx,Hx,Wx (66),(v),(v1)
  744. a0: vpscatterdd/q Wx,Vx (66),(ev)
  745. a1: vpscatterqd/q Wx,Vx (66),(ev)
  746. a2: vscatterdps/d Wx,Vx (66),(ev)
  747. a3: vscatterqps/d Wx,Vx (66),(ev)
  748. a6: vfmaddsub213ps/d Vx,Hx,Wx (66),(v)
  749. a7: vfmsubadd213ps/d Vx,Hx,Wx (66),(v)
  750. a8: vfmadd213ps/d Vx,Hx,Wx (66),(v)
  751. a9: vfmadd213ss/d Vx,Hx,Wx (66),(v),(v1)
  752. aa: vfmsub213ps/d Vx,Hx,Wx (66),(v)
  753. ab: vfmsub213ss/d Vx,Hx,Wx (66),(v),(v1)
  754. ac: vfnmadd213ps/d Vx,Hx,Wx (66),(v)
  755. ad: vfnmadd213ss/d Vx,Hx,Wx (66),(v),(v1)
  756. ae: vfnmsub213ps/d Vx,Hx,Wx (66),(v)
  757. af: vfnmsub213ss/d Vx,Hx,Wx (66),(v),(v1)
  758. b4: vpmadd52luq Vx,Hx,Wx (66),(ev)
  759. b5: vpmadd52huq Vx,Hx,Wx (66),(ev)
  760. b6: vfmaddsub231ps/d Vx,Hx,Wx (66),(v)
  761. b7: vfmsubadd231ps/d Vx,Hx,Wx (66),(v)
  762. b8: vfmadd231ps/d Vx,Hx,Wx (66),(v)
  763. b9: vfmadd231ss/d Vx,Hx,Wx (66),(v),(v1)
  764. ba: vfmsub231ps/d Vx,Hx,Wx (66),(v)
  765. bb: vfmsub231ss/d Vx,Hx,Wx (66),(v),(v1)
  766. bc: vfnmadd231ps/d Vx,Hx,Wx (66),(v)
  767. bd: vfnmadd231ss/d Vx,Hx,Wx (66),(v),(v1)
  768. be: vfnmsub231ps/d Vx,Hx,Wx (66),(v)
  769. bf: vfnmsub231ss/d Vx,Hx,Wx (66),(v),(v1)
  770. # 0x0f 0x38 0xc0-0xff
  771. c4: vpconflictd/q Vx,Wx (66),(ev)
  772. c6: Grp18 (1A)
  773. c7: Grp19 (1A)
  774. c8: sha1nexte Vdq,Wdq | vexp2ps/d Vx,Wx (66),(ev)
  775. c9: sha1msg1 Vdq,Wdq
  776. ca: sha1msg2 Vdq,Wdq | vrcp28ps/d Vx,Wx (66),(ev)
  777. cb: sha256rnds2 Vdq,Wdq | vrcp28ss/d Vx,Hx,Wx (66),(ev)
  778. cc: sha256msg1 Vdq,Wdq | vrsqrt28ps/d Vx,Wx (66),(ev)
  779. cd: sha256msg2 Vdq,Wdq | vrsqrt28ss/d Vx,Hx,Wx (66),(ev)
  780. db: VAESIMC Vdq,Wdq (66),(v1)
  781. dc: VAESENC Vdq,Hdq,Wdq (66),(v1)
  782. dd: VAESENCLAST Vdq,Hdq,Wdq (66),(v1)
  783. de: VAESDEC Vdq,Hdq,Wdq (66),(v1)
  784. df: VAESDECLAST Vdq,Hdq,Wdq (66),(v1)
  785. f0: MOVBE Gy,My | MOVBE Gw,Mw (66) | CRC32 Gd,Eb (F2) | CRC32 Gd,Eb (66&F2)
  786. f1: MOVBE My,Gy | MOVBE Mw,Gw (66) | CRC32 Gd,Ey (F2) | CRC32 Gd,Ew (66&F2)
  787. f2: ANDN Gy,By,Ey (v)
  788. f3: Grp17 (1A)
  789. f5: BZHI Gy,Ey,By (v) | PEXT Gy,By,Ey (F3),(v) | PDEP Gy,By,Ey (F2),(v)
  790. f6: ADCX Gy,Ey (66) | ADOX Gy,Ey (F3) | MULX By,Gy,rDX,Ey (F2),(v)
  791. f7: BEXTR Gy,Ey,By (v) | SHLX Gy,Ey,By (66),(v) | SARX Gy,Ey,By (F3),(v) | SHRX Gy,Ey,By (F2),(v)
  792. EndTable
  793. Table: 3-byte opcode 2 (0x0f 0x3a)
  794. Referrer: 3-byte escape 2
  795. AVXcode: 3
  796. # 0x0f 0x3a 0x00-0xff
  797. 00: vpermq Vqq,Wqq,Ib (66),(v)
  798. 01: vpermpd Vqq,Wqq,Ib (66),(v)
  799. 02: vpblendd Vx,Hx,Wx,Ib (66),(v)
  800. 03: valignd/q Vx,Hx,Wx,Ib (66),(ev)
  801. 04: vpermilps Vx,Wx,Ib (66),(v)
  802. 05: vpermilpd Vx,Wx,Ib (66),(v)
  803. 06: vperm2f128 Vqq,Hqq,Wqq,Ib (66),(v)
  804. 07:
  805. 08: vroundps Vx,Wx,Ib (66) | vrndscaleps Vx,Wx,Ib (66),(evo)
  806. 09: vroundpd Vx,Wx,Ib (66) | vrndscalepd Vx,Wx,Ib (66),(evo)
  807. 0a: vroundss Vss,Wss,Ib (66),(v1) | vrndscaless Vx,Hx,Wx,Ib (66),(evo)
  808. 0b: vroundsd Vsd,Wsd,Ib (66),(v1) | vrndscalesd Vx,Hx,Wx,Ib (66),(evo)
  809. 0c: vblendps Vx,Hx,Wx,Ib (66)
  810. 0d: vblendpd Vx,Hx,Wx,Ib (66)
  811. 0e: vpblendw Vx,Hx,Wx,Ib (66),(v1)
  812. 0f: palignr Pq,Qq,Ib | vpalignr Vx,Hx,Wx,Ib (66),(v1)
  813. 14: vpextrb Rd/Mb,Vdq,Ib (66),(v1)
  814. 15: vpextrw Rd/Mw,Vdq,Ib (66),(v1)
  815. 16: vpextrd/q Ey,Vdq,Ib (66),(v1)
  816. 17: vextractps Ed,Vdq,Ib (66),(v1)
  817. 18: vinsertf128 Vqq,Hqq,Wqq,Ib (66),(v) | vinsertf32x4/64x2 Vqq,Hqq,Wqq,Ib (66),(evo)
  818. 19: vextractf128 Wdq,Vqq,Ib (66),(v) | vextractf32x4/64x2 Wdq,Vqq,Ib (66),(evo)
  819. 1a: vinsertf32x8/64x4 Vqq,Hqq,Wqq,Ib (66),(ev)
  820. 1b: vextractf32x8/64x4 Wdq,Vqq,Ib (66),(ev)
  821. 1d: vcvtps2ph Wx,Vx,Ib (66),(v)
  822. 1e: vpcmpud/q Vk,Hd,Wd,Ib (66),(ev)
  823. 1f: vpcmpd/q Vk,Hd,Wd,Ib (66),(ev)
  824. 20: vpinsrb Vdq,Hdq,Ry/Mb,Ib (66),(v1)
  825. 21: vinsertps Vdq,Hdq,Udq/Md,Ib (66),(v1)
  826. 22: vpinsrd/q Vdq,Hdq,Ey,Ib (66),(v1)
  827. 23: vshuff32x4/64x2 Vx,Hx,Wx,Ib (66),(ev)
  828. 25: vpternlogd/q Vx,Hx,Wx,Ib (66),(ev)
  829. 26: vgetmantps/d Vx,Wx,Ib (66),(ev)
  830. 27: vgetmantss/d Vx,Hx,Wx,Ib (66),(ev)
  831. 30: kshiftrb/w Vk,Uk,Ib (66),(v)
  832. 31: kshiftrd/q Vk,Uk,Ib (66),(v)
  833. 32: kshiftlb/w Vk,Uk,Ib (66),(v)
  834. 33: kshiftld/q Vk,Uk,Ib (66),(v)
  835. 38: vinserti128 Vqq,Hqq,Wqq,Ib (66),(v) | vinserti32x4/64x2 Vqq,Hqq,Wqq,Ib (66),(evo)
  836. 39: vextracti128 Wdq,Vqq,Ib (66),(v) | vextracti32x4/64x2 Wdq,Vqq,Ib (66),(evo)
  837. 3a: vinserti32x8/64x4 Vqq,Hqq,Wqq,Ib (66),(ev)
  838. 3b: vextracti32x8/64x4 Wdq,Vqq,Ib (66),(ev)
  839. 3e: vpcmpub/w Vk,Hk,Wx,Ib (66),(ev)
  840. 3f: vpcmpb/w Vk,Hk,Wx,Ib (66),(ev)
  841. 40: vdpps Vx,Hx,Wx,Ib (66)
  842. 41: vdppd Vdq,Hdq,Wdq,Ib (66),(v1)
  843. 42: vmpsadbw Vx,Hx,Wx,Ib (66),(v1) | vdbpsadbw Vx,Hx,Wx,Ib (66),(evo)
  844. 43: vshufi32x4/64x2 Vx,Hx,Wx,Ib (66),(ev)
  845. 44: vpclmulqdq Vdq,Hdq,Wdq,Ib (66),(v1)
  846. 46: vperm2i128 Vqq,Hqq,Wqq,Ib (66),(v)
  847. 4a: vblendvps Vx,Hx,Wx,Lx (66),(v)
  848. 4b: vblendvpd Vx,Hx,Wx,Lx (66),(v)
  849. 4c: vpblendvb Vx,Hx,Wx,Lx (66),(v1)
  850. 50: vrangeps/d Vx,Hx,Wx,Ib (66),(ev)
  851. 51: vrangess/d Vx,Hx,Wx,Ib (66),(ev)
  852. 54: vfixupimmps/d Vx,Hx,Wx,Ib (66),(ev)
  853. 55: vfixupimmss/d Vx,Hx,Wx,Ib (66),(ev)
  854. 56: vreduceps/d Vx,Wx,Ib (66),(ev)
  855. 57: vreducess/d Vx,Hx,Wx,Ib (66),(ev)
  856. 60: vpcmpestrm Vdq,Wdq,Ib (66),(v1)
  857. 61: vpcmpestri Vdq,Wdq,Ib (66),(v1)
  858. 62: vpcmpistrm Vdq,Wdq,Ib (66),(v1)
  859. 63: vpcmpistri Vdq,Wdq,Ib (66),(v1)
  860. 66: vfpclassps/d Vk,Wx,Ib (66),(ev)
  861. 67: vfpclassss/d Vk,Wx,Ib (66),(ev)
  862. cc: sha1rnds4 Vdq,Wdq,Ib
  863. df: VAESKEYGEN Vdq,Wdq,Ib (66),(v1)
  864. f0: RORX Gy,Ey,Ib (F2),(v)
  865. EndTable
  866. GrpTable: Grp1
  867. 0: ADD
  868. 1: OR
  869. 2: ADC
  870. 3: SBB
  871. 4: AND
  872. 5: SUB
  873. 6: XOR
  874. 7: CMP
  875. EndTable
  876. GrpTable: Grp1A
  877. 0: POP
  878. EndTable
  879. GrpTable: Grp2
  880. 0: ROL
  881. 1: ROR
  882. 2: RCL
  883. 3: RCR
  884. 4: SHL/SAL
  885. 5: SHR
  886. 6:
  887. 7: SAR
  888. EndTable
  889. GrpTable: Grp3_1
  890. 0: TEST Eb,Ib
  891. 1: TEST Eb,Ib
  892. 2: NOT Eb
  893. 3: NEG Eb
  894. 4: MUL AL,Eb
  895. 5: IMUL AL,Eb
  896. 6: DIV AL,Eb
  897. 7: IDIV AL,Eb
  898. EndTable
  899. GrpTable: Grp3_2
  900. 0: TEST Ev,Iz
  901. 1:
  902. 2: NOT Ev
  903. 3: NEG Ev
  904. 4: MUL rAX,Ev
  905. 5: IMUL rAX,Ev
  906. 6: DIV rAX,Ev
  907. 7: IDIV rAX,Ev
  908. EndTable
  909. GrpTable: Grp4
  910. 0: INC Eb
  911. 1: DEC Eb
  912. EndTable
  913. GrpTable: Grp5
  914. 0: INC Ev
  915. 1: DEC Ev
  916. # Note: "forced64" is Intel CPU behavior (see comment about CALL insn).
  917. 2: CALLN Ev (f64)
  918. 3: CALLF Ep
  919. 4: JMPN Ev (f64)
  920. 5: JMPF Mp
  921. 6: PUSH Ev (d64)
  922. 7:
  923. EndTable
  924. GrpTable: Grp6
  925. 0: SLDT Rv/Mw
  926. 1: STR Rv/Mw
  927. 2: LLDT Ew
  928. 3: LTR Ew
  929. 4: VERR Ew
  930. 5: VERW Ew
  931. EndTable
  932. GrpTable: Grp7
  933. 0: SGDT Ms | VMCALL (001),(11B) | VMLAUNCH (010),(11B) | VMRESUME (011),(11B) | VMXOFF (100),(11B)
  934. 1: SIDT Ms | MONITOR (000),(11B) | MWAIT (001),(11B) | CLAC (010),(11B) | STAC (011),(11B)
  935. 2: LGDT Ms | XGETBV (000),(11B) | XSETBV (001),(11B) | VMFUNC (100),(11B) | XEND (101)(11B) | XTEST (110)(11B)
  936. 3: LIDT Ms
  937. 4: SMSW Mw/Rv
  938. 5: rdpkru (110),(11B) | wrpkru (111),(11B)
  939. 6: LMSW Ew
  940. 7: INVLPG Mb | SWAPGS (o64),(000),(11B) | RDTSCP (001),(11B)
  941. EndTable
  942. GrpTable: Grp8
  943. 4: BT
  944. 5: BTS
  945. 6: BTR
  946. 7: BTC
  947. EndTable
  948. GrpTable: Grp9
  949. 1: CMPXCHG8B/16B Mq/Mdq
  950. 3: xrstors
  951. 4: xsavec
  952. 5: xsaves
  953. 6: VMPTRLD Mq | VMCLEAR Mq (66) | VMXON Mq (F3) | RDRAND Rv (11B)
  954. 7: VMPTRST Mq | VMPTRST Mq (F3) | RDSEED Rv (11B)
  955. EndTable
  956. GrpTable: Grp10
  957. EndTable
  958. # Grp11A and Grp11B are expressed as Grp11 in Intel SDM
  959. GrpTable: Grp11A
  960. 0: MOV Eb,Ib
  961. 7: XABORT Ib (000),(11B)
  962. EndTable
  963. GrpTable: Grp11B
  964. 0: MOV Eb,Iz
  965. 7: XBEGIN Jz (000),(11B)
  966. EndTable
  967. GrpTable: Grp12
  968. 2: psrlw Nq,Ib (11B) | vpsrlw Hx,Ux,Ib (66),(11B),(v1)
  969. 4: psraw Nq,Ib (11B) | vpsraw Hx,Ux,Ib (66),(11B),(v1)
  970. 6: psllw Nq,Ib (11B) | vpsllw Hx,Ux,Ib (66),(11B),(v1)
  971. EndTable
  972. GrpTable: Grp13
  973. 0: vprord/q Hx,Wx,Ib (66),(ev)
  974. 1: vprold/q Hx,Wx,Ib (66),(ev)
  975. 2: psrld Nq,Ib (11B) | vpsrld Hx,Ux,Ib (66),(11B),(v1)
  976. 4: psrad Nq,Ib (11B) | vpsrad Hx,Ux,Ib (66),(11B),(v1) | vpsrad/q Hx,Ux,Ib (66),(evo)
  977. 6: pslld Nq,Ib (11B) | vpslld Hx,Ux,Ib (66),(11B),(v1)
  978. EndTable
  979. GrpTable: Grp14
  980. 2: psrlq Nq,Ib (11B) | vpsrlq Hx,Ux,Ib (66),(11B),(v1)
  981. 3: vpsrldq Hx,Ux,Ib (66),(11B),(v1)
  982. 6: psllq Nq,Ib (11B) | vpsllq Hx,Ux,Ib (66),(11B),(v1)
  983. 7: vpslldq Hx,Ux,Ib (66),(11B),(v1)
  984. EndTable
  985. GrpTable: Grp15
  986. 0: fxsave | RDFSBASE Ry (F3),(11B)
  987. 1: fxstor | RDGSBASE Ry (F3),(11B)
  988. 2: vldmxcsr Md (v1) | WRFSBASE Ry (F3),(11B)
  989. 3: vstmxcsr Md (v1) | WRGSBASE Ry (F3),(11B)
  990. 4: XSAVE
  991. 5: XRSTOR | lfence (11B)
  992. 6: XSAVEOPT | clwb (66) | mfence (11B)
  993. 7: clflush | clflushopt (66) | sfence (11B)
  994. EndTable
  995. GrpTable: Grp16
  996. 0: prefetch NTA
  997. 1: prefetch T0
  998. 2: prefetch T1
  999. 3: prefetch T2
  1000. EndTable
  1001. GrpTable: Grp17
  1002. 1: BLSR By,Ey (v)
  1003. 2: BLSMSK By,Ey (v)
  1004. 3: BLSI By,Ey (v)
  1005. EndTable
  1006. GrpTable: Grp18
  1007. 1: vgatherpf0dps/d Wx (66),(ev)
  1008. 2: vgatherpf1dps/d Wx (66),(ev)
  1009. 5: vscatterpf0dps/d Wx (66),(ev)
  1010. 6: vscatterpf1dps/d Wx (66),(ev)
  1011. EndTable
  1012. GrpTable: Grp19
  1013. 1: vgatherpf0qps/d Wx (66),(ev)
  1014. 2: vgatherpf1qps/d Wx (66),(ev)
  1015. 5: vscatterpf0qps/d Wx (66),(ev)
  1016. 6: vscatterpf1qps/d Wx (66),(ev)
  1017. EndTable
  1018. # AMD's Prefetch Group
  1019. GrpTable: GrpP
  1020. 0: PREFETCH
  1021. 1: PREFETCHW
  1022. EndTable
  1023. GrpTable: GrpPDLK
  1024. 0: MONTMUL
  1025. 1: XSHA1
  1026. 2: XSHA2
  1027. EndTable
  1028. GrpTable: GrpRNG
  1029. 0: xstore-rng
  1030. 1: xcrypt-ecb
  1031. 2: xcrypt-cbc
  1032. 4: xcrypt-cfb
  1033. 5: xcrypt-ofb
  1034. EndTable