diff options
author | Jan Beulich <jbeulich@suse.com> | 2022-10-24 09:30:58 +0200 |
---|---|---|
committer | Jan Beulich <jbeulich@suse.com> | 2022-10-24 09:30:58 +0200 |
commit | f7cfcddd16c3f9d8385e0375d1089fa80bad1c74 (patch) | |
tree | 4cf427629233237df552ebe85b0fce2c3912440a /opcodes | |
parent | b347f578952a29ff9b02090b0dafec563520c80b (diff) | |
download | gdb-f7cfcddd16c3f9d8385e0375d1089fa80bad1c74.zip gdb-f7cfcddd16c3f9d8385e0375d1089fa80bad1c74.tar.gz gdb-f7cfcddd16c3f9d8385e0375d1089fa80bad1c74.tar.bz2 |
x86: emit {evex} prefix when disassembling ambiguous AVX512VL insns
When no AVX512-specific functionality is in use, the disassembly of
AVX512VL insns is indistinguishable from their AVX counterparts (if such
exist). Emit the {evex} pseudo-prefix in such cases.
Where applicable drop stray uses of PREFIX_OPCODE from table entries.
Diffstat (limited to 'opcodes')
-rw-r--r-- | opcodes/i386-dis-evex-len.h | 4 | ||||
-rw-r--r-- | opcodes/i386-dis-evex-prefix.h | 48 | ||||
-rw-r--r-- | opcodes/i386-dis-evex-reg.h | 12 | ||||
-rw-r--r-- | opcodes/i386-dis-evex-w.h | 60 | ||||
-rw-r--r-- | opcodes/i386-dis-evex.h | 174 | ||||
-rw-r--r-- | opcodes/i386-dis.c | 208 |
6 files changed, 271 insertions, 235 deletions
diff --git a/opcodes/i386-dis-evex-len.h b/opcodes/i386-dis-evex-len.h index 60dec67..e69c024 100644 --- a/opcodes/i386-dis-evex-len.h +++ b/opcodes/i386-dis-evex-len.h @@ -2,7 +2,7 @@ static const struct dis386 evex_len_table[][3] = { /* EVEX_LEN_0F3816 */ { { Bad_Opcode }, - { "vpermp%XW", { XM, Vex, EXx }, PREFIX_DATA }, + { "%XEvpermp%XW", { XM, Vex, EXx }, PREFIX_DATA }, { "vpermp%XW", { XM, Vex, EXx }, PREFIX_DATA }, }, @@ -30,7 +30,7 @@ static const struct dis386 evex_len_table[][3] = { /* EVEX_LEN_0F3836 */ { { Bad_Opcode }, - { "vperm%DQ", { XM, Vex, EXx }, PREFIX_DATA }, + { "%XEvperm%DQ", { XM, Vex, EXx }, PREFIX_DATA }, { "vperm%DQ", { XM, Vex, EXx }, PREFIX_DATA }, }, diff --git a/opcodes/i386-dis-evex-prefix.h b/opcodes/i386-dis-evex-prefix.h index e48ce41..a6fdca7 100644 --- a/opcodes/i386-dis-evex-prefix.h +++ b/opcodes/i386-dis-evex-prefix.h @@ -1,8 +1,8 @@ /* PREFIX_EVEX_0F5B */ { { VEX_W_TABLE (EVEX_W_0F5B_P_0) }, - { "vcvttp%XS2dq", { XM, EXx, EXxEVexS }, 0 }, - { "vcvtp%XS2dq", { XM, EXx, EXxEVexR }, 0 }, + { "%XEvcvttp%XS2dq", { XM, EXx, EXxEVexS }, 0 }, + { "%XEvcvtp%XS2dq", { XM, EXx, EXxEVexR }, 0 }, }, /* PREFIX_EVEX_0F6F */ { @@ -14,9 +14,9 @@ /* PREFIX_EVEX_0F70 */ { { Bad_Opcode }, - { "vpshufhw", { XM, EXx, Ib }, 0 }, + { "%XEvpshufhw", { XM, EXx, Ib }, 0 }, { VEX_W_TABLE (EVEX_W_0F70_P_2) }, - { "vpshuflw", { XM, EXx, Ib }, 0 }, + { "%XEvpshuflw", { XM, EXx, Ib }, 0 }, }, /* PREFIX_EVEX_0F78 */ { @@ -70,8 +70,8 @@ { { Bad_Opcode }, { VEX_W_TABLE (EVEX_W_0FE6_P_1) }, - { "vcvttp%XD2dq%XY", { XMxmmq, EXx, EXxEVexS }, 0 }, - { "vcvtp%XD2dq%XY", { XMxmmq, EXx, EXxEVexR }, 0 }, + { "%XEvcvttp%XD2dq%XY", { XMxmmq, EXx, EXxEVexS }, 0 }, + { "%XEvcvtp%XD2dq%XY", { XMxmmq, EXx, EXxEVexR }, 0 }, }, /* PREFIX_EVEX_0F3810 */ { @@ -95,7 +95,7 @@ { { Bad_Opcode }, { VEX_W_TABLE (EVEX_W_0F3813_P_1) }, - { "vcvtph2p%XS", { XM, EXxmmq, EXxEVexS }, 0 }, + { "%XEvcvtph2p%XS", { XM, EXxmmq, EXxEVexS }, 0 }, }, /* PREFIX_EVEX_0F3814 */ { @@ -113,31 +113,31 @@ { { Bad_Opcode }, { VEX_W_TABLE (EVEX_W_0F3820_P_1) }, - { "vpmovsxbw", { XM, EXxmmq }, 0 }, + { "%XEvpmovsxbw", { XM, EXxmmq }, 0 }, }, /* PREFIX_EVEX_0F3821 */ { { Bad_Opcode }, { VEX_W_TABLE (EVEX_W_0F3821_P_1) }, - { "vpmovsxbd", { XM, EXxmmqd }, 0 }, + { "%XEvpmovsxbd", { XM, EXxmmqd }, 0 }, }, /* PREFIX_EVEX_0F3822 */ { { Bad_Opcode }, { VEX_W_TABLE (EVEX_W_0F3822_P_1) }, - { "vpmovsxbq", { XM, EXxmmdw }, 0 }, + { "%XEvpmovsxbq", { XM, EXxmmdw }, 0 }, }, /* PREFIX_EVEX_0F3823 */ { { Bad_Opcode }, { VEX_W_TABLE (EVEX_W_0F3823_P_1) }, - { "vpmovsxwd", { XM, EXxmmq }, 0 }, + { "%XEvpmovsxwd", { XM, EXxmmq }, 0 }, }, /* PREFIX_EVEX_0F3824 */ { { Bad_Opcode }, { VEX_W_TABLE (EVEX_W_0F3824_P_1) }, - { "vpmovsxwq", { XM, EXxmmqd }, 0 }, + { "%XEvpmovsxwq", { XM, EXxmmqd }, 0 }, }, /* PREFIX_EVEX_0F3825 */ { @@ -179,31 +179,31 @@ { { Bad_Opcode }, { VEX_W_TABLE (EVEX_W_0F3830_P_1) }, - { "vpmovzxbw", { XM, EXxmmq }, 0 }, + { "%XEvpmovzxbw", { XM, EXxmmq }, 0 }, }, /* PREFIX_EVEX_0F3831 */ { { Bad_Opcode }, { VEX_W_TABLE (EVEX_W_0F3831_P_1) }, - { "vpmovzxbd", { XM, EXxmmqd }, 0 }, + { "%XEvpmovzxbd", { XM, EXxmmqd }, 0 }, }, /* PREFIX_EVEX_0F3832 */ { { Bad_Opcode }, { VEX_W_TABLE (EVEX_W_0F3832_P_1) }, - { "vpmovzxbq", { XM, EXxmmdw }, 0 }, + { "%XEvpmovzxbq", { XM, EXxmmdw }, 0 }, }, /* PREFIX_EVEX_0F3833 */ { { Bad_Opcode }, { VEX_W_TABLE (EVEX_W_0F3833_P_1) }, - { "vpmovzxwd", { XM, EXxmmq }, 0 }, + { "%XEvpmovzxwd", { XM, EXxmmq }, 0 }, }, /* PREFIX_EVEX_0F3834 */ { { Bad_Opcode }, { VEX_W_TABLE (EVEX_W_0F3834_P_1) }, - { "vpmovzxwq", { XM, EXxmmqd }, 0 }, + { "%XEvpmovzxwq", { XM, EXxmmqd }, 0 }, }, /* PREFIX_EVEX_0F3835 */ { @@ -215,19 +215,19 @@ { { Bad_Opcode }, { MOD_TABLE (MOD_EVEX_0F3838_P_1) }, - { "vpminsb", { XM, Vex, EXx }, 0 }, + { "%XEvpminsb", { XM, Vex, EXx }, 0 }, }, /* PREFIX_EVEX_0F3839 */ { { Bad_Opcode }, { "vpmov%DQ2m", { MaskG, EXx }, 0 }, - { "vpmins%DQ", { XM, Vex, EXx }, 0 }, + { "%XEvpmins%DQ", { XM, Vex, EXx }, 0 }, }, /* PREFIX_EVEX_0F383A */ { { Bad_Opcode }, { VEX_W_TABLE (EVEX_W_0F383A_P_1) }, - { "vpminuw", { XM, Vex, EXx }, 0 }, + { "%XEvpminuw", { XM, Vex, EXx }, 0 }, }, /* PREFIX_EVEX_0F3852 */ { @@ -261,28 +261,28 @@ { { Bad_Opcode }, { Bad_Opcode }, - { "vfmsub132p%XW", { XM, Vex, EXx, EXxEVexR }, 0 }, + { "%XEvfmsub132p%XW", { XM, Vex, EXx, EXxEVexR }, 0 }, { "v4fmaddp%XS", { XM, Vex, Mxmm }, 0 }, }, /* PREFIX_EVEX_0F389B */ { { Bad_Opcode }, { Bad_Opcode }, - { "vfmsub132s%XW", { XMScalar, VexScalar, EXdq, EXxEVexR }, 0 }, + { "%XEvfmsub132s%XW", { XMScalar, VexScalar, EXdq, EXxEVexR }, 0 }, { "v4fmadds%XS", { XMScalar, VexScalar, Mxmm }, 0 }, }, /* PREFIX_EVEX_0F38AA */ { { Bad_Opcode }, { Bad_Opcode }, - { "vfmsub213p%XW", { XM, Vex, EXx, EXxEVexR }, 0 }, + { "%XEvfmsub213p%XW", { XM, Vex, EXx, EXxEVexR }, 0 }, { "v4fnmaddp%XS", { XM, Vex, Mxmm }, 0 }, }, /* PREFIX_EVEX_0F38AB */ { { Bad_Opcode }, { Bad_Opcode }, - { "vfmsub213s%XW", { XMScalar, VexScalar, EXdq, EXxEVexR }, 0 }, + { "%XEvfmsub213s%XW", { XMScalar, VexScalar, EXdq, EXxEVexR }, 0 }, { "v4fnmadds%XS", { XMScalar, VexScalar, Mxmm }, 0 }, }, /* PREFIX_EVEX_0F3A08 */ diff --git a/opcodes/i386-dis-evex-reg.h b/opcodes/i386-dis-evex-reg.h index 5ae6c00..c0f55c3 100644 --- a/opcodes/i386-dis-evex-reg.h +++ b/opcodes/i386-dis-evex-reg.h @@ -2,11 +2,11 @@ { { Bad_Opcode }, { Bad_Opcode }, - { "vpsrlw", { Vex, EXx, Ib }, PREFIX_DATA }, + { "%XEvpsrlw", { Vex, EXx, Ib }, PREFIX_DATA }, { Bad_Opcode }, - { "vpsraw", { Vex, EXx, Ib }, PREFIX_DATA }, + { "%XEvpsraw", { Vex, EXx, Ib }, PREFIX_DATA }, { Bad_Opcode }, - { "vpsllw", { Vex, EXx, Ib }, PREFIX_DATA }, + { "%XEvpsllw", { Vex, EXx, Ib }, PREFIX_DATA }, }, /* REG_EVEX_0F72 */ { @@ -14,7 +14,7 @@ { "vprol%DQ", { Vex, EXx, Ib }, PREFIX_DATA }, { VEX_W_TABLE (EVEX_W_0F72_R_2) }, { Bad_Opcode }, - { "vpsra%DQ", { Vex, EXx, Ib }, PREFIX_DATA }, + { "%XEvpsra%DQ", { Vex, EXx, Ib }, PREFIX_DATA }, { Bad_Opcode }, { VEX_W_TABLE (EVEX_W_0F72_R_6) }, }, @@ -23,11 +23,11 @@ { Bad_Opcode }, { Bad_Opcode }, { VEX_W_TABLE (EVEX_W_0F73_R_2) }, - { "vpsrldq", { Vex, EXx, Ib }, PREFIX_DATA }, + { "%XEvpsrldq", { Vex, EXx, Ib }, PREFIX_DATA }, { Bad_Opcode }, { Bad_Opcode }, { VEX_W_TABLE (EVEX_W_0F73_R_6) }, - { "vpslldq", { Vex, EXx, Ib }, PREFIX_DATA }, + { "%XEvpslldq", { Vex, EXx, Ib }, PREFIX_DATA }, }, /* REG_EVEX_0F38C6_M_0_L_2 */ { diff --git a/opcodes/i386-dis-evex-w.h b/opcodes/i386-dis-evex-w.h index 9b4bb6a..ba3b195 100644 --- a/opcodes/i386-dis-evex-w.h +++ b/opcodes/i386-dis-evex-w.h @@ -1,11 +1,11 @@ /* EVEX_W_0F5B_P_0 */ { - { "vcvtdq2ps", { XM, EXx, EXxEVexR }, 0 }, + { "%XEvcvtdq2ps", { XM, EXx, EXxEVexR }, 0 }, { "vcvtqq2ps%XY", { XMxmmq, EXx, EXxEVexR }, 0 }, }, /* EVEX_W_0F62 */ { - { "vpunpckldq", { XM, Vex, EXx }, PREFIX_DATA }, + { "%XEvpunpckldq", { XM, Vex, EXx }, PREFIX_DATA }, }, /* EVEX_W_0F66 */ { @@ -13,21 +13,21 @@ }, /* EVEX_W_0F6A */ { - { "vpunpckhdq", { XM, Vex, EXx }, PREFIX_DATA }, + { "%XEvpunpckhdq", { XM, Vex, EXx }, PREFIX_DATA }, }, /* EVEX_W_0F6B */ { - { "vpackssdw", { XM, Vex, EXx }, PREFIX_DATA }, + { "%XEvpackssdw", { XM, Vex, EXx }, PREFIX_DATA }, }, /* EVEX_W_0F6C */ { { Bad_Opcode }, - { "vpunpcklqdq", { XM, Vex, EXx }, PREFIX_DATA }, + { "%XEvpunpcklqdq", { XM, Vex, EXx }, PREFIX_DATA }, }, /* EVEX_W_0F6D */ { { Bad_Opcode }, - { "vpunpckhqdq", { XM, Vex, EXx }, PREFIX_DATA }, + { "%XEvpunpckhqdq", { XM, Vex, EXx }, PREFIX_DATA }, }, /* EVEX_W_0F6F_P_1 */ { @@ -46,25 +46,25 @@ }, /* EVEX_W_0F70_P_2 */ { - { "vpshufd", { XM, EXx, Ib }, 0 }, + { "%XEvpshufd", { XM, EXx, Ib }, 0 }, }, /* EVEX_W_0F72_R_2 */ { - { "vpsrld", { Vex, EXx, Ib }, PREFIX_DATA }, + { "%XEvpsrld", { Vex, EXx, Ib }, PREFIX_DATA }, }, /* EVEX_W_0F72_R_6 */ { - { "vpslld", { Vex, EXx, Ib }, PREFIX_DATA }, + { "%XEvpslld", { Vex, EXx, Ib }, PREFIX_DATA }, }, /* EVEX_W_0F73_R_2 */ { { Bad_Opcode }, - { "vpsrlq", { Vex, EXx, Ib }, PREFIX_DATA }, + { "%XEvpsrlq", { Vex, EXx, Ib }, PREFIX_DATA }, }, /* EVEX_W_0F73_R_6 */ { { Bad_Opcode }, - { "vpsllq", { Vex, EXx, Ib }, PREFIX_DATA }, + { "%XEvpsllq", { Vex, EXx, Ib }, PREFIX_DATA }, }, /* EVEX_W_0F76 */ { @@ -132,17 +132,17 @@ }, /* EVEX_W_0FD2 */ { - { "vpsrld", { XM, Vex, EXxmm }, PREFIX_DATA }, + { "%XEvpsrld", { XM, Vex, EXxmm }, PREFIX_DATA }, }, /* EVEX_W_0FD3 */ { { Bad_Opcode }, - { "vpsrlq", { XM, Vex, EXxmm }, PREFIX_DATA }, + { "%XEvpsrlq", { XM, Vex, EXxmm }, PREFIX_DATA }, }, /* EVEX_W_0FD4 */ { { Bad_Opcode }, - { "vpaddq", { XM, Vex, EXx }, PREFIX_DATA }, + { "%XEvpaddq", { XM, Vex, EXx }, PREFIX_DATA }, }, /* EVEX_W_0FD6 */ { @@ -151,39 +151,39 @@ }, /* EVEX_W_0FE6_P_1 */ { - { "vcvtdq2pd", { XM, EXEvexHalfBcstXmmq }, 0 }, + { "%XEvcvtdq2pd", { XM, EXEvexHalfBcstXmmq }, 0 }, { "vcvtqq2pd", { XM, EXx, EXxEVexR }, 0 }, }, /* EVEX_W_0FE7 */ { - { "vmovntdq", { EXEvexXNoBcst, XM }, PREFIX_DATA }, + { "%XEvmovntdq", { EXEvexXNoBcst, XM }, PREFIX_DATA }, }, /* EVEX_W_0FF2 */ { - { "vpslld", { XM, Vex, EXxmm }, PREFIX_DATA }, + { "%XEvpslld", { XM, Vex, EXxmm }, PREFIX_DATA }, }, /* EVEX_W_0FF3 */ { { Bad_Opcode }, - { "vpsllq", { XM, Vex, EXxmm }, PREFIX_DATA }, + { "%XEvpsllq", { XM, Vex, EXxmm }, PREFIX_DATA }, }, /* EVEX_W_0FF4 */ { { Bad_Opcode }, - { "vpmuludq", { XM, Vex, EXx }, PREFIX_DATA }, + { "%XEvpmuludq", { XM, Vex, EXx }, PREFIX_DATA }, }, /* EVEX_W_0FFA */ { - { "vpsubd", { XM, Vex, EXx }, PREFIX_DATA }, + { "%XEvpsubd", { XM, Vex, EXx }, PREFIX_DATA }, }, /* EVEX_W_0FFB */ { { Bad_Opcode }, - { "vpsubq", { XM, Vex, EXx }, PREFIX_DATA }, + { "%XEvpsubq", { XM, Vex, EXx }, PREFIX_DATA }, }, /* EVEX_W_0FFE */ { - { "vpaddd", { XM, Vex, EXx }, PREFIX_DATA }, + { "%XEvpaddd", { XM, Vex, EXx }, PREFIX_DATA }, }, /* EVEX_W_0F3810_P_1 */ { @@ -227,7 +227,7 @@ /* EVEX_W_0F3819_L_n */ { { "vbroadcastf32x2", { XM, EXq }, PREFIX_DATA }, - { "vbroadcastsd", { XM, EXq }, PREFIX_DATA }, + { "%XEvbroadcastsd", { XM, EXq }, PREFIX_DATA }, }, /* EVEX_W_0F381A_M_0_L_n */ { @@ -241,7 +241,7 @@ }, /* EVEX_W_0F381E */ { - { "vpabsd", { XM, EXx }, PREFIX_DATA }, + { "%XEvpabsd", { XM, EXx }, PREFIX_DATA }, }, /* EVEX_W_0F381F */ { @@ -274,12 +274,12 @@ }, /* EVEX_W_0F3825_P_2 */ { - { "vpmovsxdq", { XM, EXxmmq }, 0 }, + { "%XEvpmovsxdq", { XM, EXxmmq }, 0 }, }, /* EVEX_W_0F3828_P_2 */ { { Bad_Opcode }, - { "vpmuldq", { XM, Vex, EXx }, 0 }, + { "%XEvpmuldq", { XM, Vex, EXx }, 0 }, }, /* EVEX_W_0F3829_P_2 */ { @@ -293,11 +293,11 @@ }, /* EVEX_W_0F382A_P_2 */ { - { "vmovntdqa", { XM, EXEvexXNoBcst }, 0 }, + { "%XEvmovntdqa", { XM, EXEvexXNoBcst }, 0 }, }, /* EVEX_W_0F382B */ { - { "vpackusdw", { XM, Vex, EXx }, PREFIX_DATA }, + { "%XEvpackusdw", { XM, Vex, EXx }, PREFIX_DATA }, }, /* EVEX_W_0F3830_P_1 */ { @@ -325,7 +325,7 @@ }, /* EVEX_W_0F3835_P_2 */ { - { "vpmovzxdq", { XM, EXxmmq }, 0 }, + { "%XEvpmovzxdq", { XM, EXxmmq }, 0 }, }, /* EVEX_W_0F3837 */ { @@ -339,7 +339,7 @@ /* EVEX_W_0F3859 */ { { "vbroadcasti32x2", { XM, EXq }, PREFIX_DATA }, - { "vpbroadcastq", { XM, EXq }, PREFIX_DATA }, + { "%XEvpbroadcastq", { XM, EXq }, PREFIX_DATA }, }, /* EVEX_W_0F385A_M_0_L_n */ { diff --git a/opcodes/i386-dis-evex.h b/opcodes/i386-dis-evex.h index 9353c9c..070af85 100644 --- a/opcodes/i386-dis-evex.h +++ b/opcodes/i386-dis-evex.h @@ -24,8 +24,8 @@ static const struct dis386 evex_table[][256] = { { PREFIX_TABLE (PREFIX_VEX_0F11) }, { PREFIX_TABLE (PREFIX_VEX_0F12) }, { MOD_TABLE (MOD_VEX_0F13) }, - { "vunpcklpX", { XM, Vex, EXx }, PREFIX_OPCODE }, - { "vunpckhpX", { XM, Vex, EXx }, PREFIX_OPCODE }, + { "%XEvunpcklpX", { XM, Vex, EXx }, PREFIX_OPCODE }, + { "%XEvunpckhpX", { XM, Vex, EXx }, PREFIX_OPCODE }, { PREFIX_TABLE (PREFIX_VEX_0F16) }, { MOD_TABLE (MOD_VEX_0F17) }, /* 18 */ @@ -47,8 +47,8 @@ static const struct dis386 evex_table[][256] = { { Bad_Opcode }, { Bad_Opcode }, /* 28 */ - { "vmovapX", { XM, EXx }, PREFIX_OPCODE }, - { "vmovapX", { EXxS, XM }, PREFIX_OPCODE }, + { "%XEvmovapX", { XM, EXx }, PREFIX_OPCODE }, + { "%XEvmovapX", { EXxS, XM }, PREFIX_OPCODE }, { PREFIX_TABLE (PREFIX_VEX_0F2A) }, { MOD_TABLE (MOD_VEX_0F2B) }, { PREFIX_TABLE (PREFIX_VEX_0F2C) }, @@ -96,10 +96,10 @@ static const struct dis386 evex_table[][256] = { { PREFIX_TABLE (PREFIX_VEX_0F51) }, { Bad_Opcode }, { Bad_Opcode }, - { "vandpX", { XM, Vex, EXx }, PREFIX_OPCODE }, - { "vandnpX", { XM, Vex, EXx }, PREFIX_OPCODE }, - { "vorpX", { XM, Vex, EXx }, PREFIX_OPCODE }, - { "vxorpX", { XM, Vex, EXx }, PREFIX_OPCODE }, + { "%XEvandpX", { XM, Vex, EXx }, PREFIX_OPCODE }, + { "%XEvandnpX", { XM, Vex, EXx }, PREFIX_OPCODE }, + { "%XEvorpX", { XM, Vex, EXx }, PREFIX_OPCODE }, + { "%XEvxorpX", { XM, Vex, EXx }, PREFIX_OPCODE }, /* 58 */ { PREFIX_TABLE (PREFIX_VEX_0F58) }, { PREFIX_TABLE (PREFIX_VEX_0F59) }, @@ -110,17 +110,17 @@ static const struct dis386 evex_table[][256] = { { PREFIX_TABLE (PREFIX_VEX_0F5E) }, { PREFIX_TABLE (PREFIX_VEX_0F5F) }, /* 60 */ - { "vpunpcklbw", { XM, Vex, EXx }, PREFIX_DATA }, - { "vpunpcklwd", { XM, Vex, EXx }, PREFIX_DATA }, + { "%XEvpunpcklbw", { XM, Vex, EXx }, PREFIX_DATA }, + { "%XEvpunpcklwd", { XM, Vex, EXx }, PREFIX_DATA }, { VEX_W_TABLE (EVEX_W_0F62) }, - { "vpacksswb", { XM, Vex, EXx }, PREFIX_DATA }, + { "%XEvpacksswb", { XM, Vex, EXx }, PREFIX_DATA }, { "vpcmpgtb", { MaskG, Vex, EXx }, PREFIX_DATA }, { "vpcmpgtw", { MaskG, Vex, EXx }, PREFIX_DATA }, { VEX_W_TABLE (EVEX_W_0F66) }, - { "vpackuswb", { XM, Vex, EXx }, PREFIX_DATA }, + { "%XEvpackuswb", { XM, Vex, EXx }, PREFIX_DATA }, /* 68 */ - { "vpunpckhbw", { XM, Vex, EXx }, PREFIX_DATA }, - { "vpunpckhwd", { XM, Vex, EXx }, PREFIX_DATA }, + { "%XEvpunpckhbw", { XM, Vex, EXx }, PREFIX_DATA }, + { "%XEvpunpckhwd", { XM, Vex, EXx }, PREFIX_DATA }, { VEX_W_TABLE (EVEX_W_0F6A) }, { VEX_W_TABLE (EVEX_W_0F6B) }, { VEX_W_TABLE (EVEX_W_0F6C) }, @@ -224,7 +224,7 @@ static const struct dis386 evex_table[][256] = { { Bad_Opcode }, { VEX_LEN_TABLE (VEX_LEN_0FC4) }, { VEX_LEN_TABLE (VEX_LEN_0FC5) }, - { "vshufpX", { XM, Vex, EXx, Ib }, PREFIX_OPCODE }, + { "%XEvshufpX", { XM, Vex, EXx, Ib }, PREFIX_OPCODE }, { Bad_Opcode }, /* C8 */ { Bad_Opcode }, @@ -237,67 +237,67 @@ static const struct dis386 evex_table[][256] = { { Bad_Opcode }, /* D0 */ { Bad_Opcode }, - { "vpsrlw", { XM, Vex, EXxmm }, PREFIX_DATA }, + { "%XEvpsrlw", { XM, Vex, EXxmm }, PREFIX_DATA }, { VEX_W_TABLE (EVEX_W_0FD2) }, { VEX_W_TABLE (EVEX_W_0FD3) }, { VEX_W_TABLE (EVEX_W_0FD4) }, - { "vpmullw", { XM, Vex, EXx }, PREFIX_DATA }, + { "%XEvpmullw", { XM, Vex, EXx }, PREFIX_DATA }, { VEX_W_TABLE (EVEX_W_0FD6) }, { Bad_Opcode }, /* D8 */ - { "vpsubusb", { XM, Vex, EXx }, PREFIX_DATA }, - { "vpsubusw", { XM, Vex, EXx }, PREFIX_DATA }, - { "vpminub", { XM, Vex, EXx }, PREFIX_DATA }, + { "%XEvpsubusb", { XM, Vex, EXx }, PREFIX_DATA }, + { "%XEvpsubusw", { XM, Vex, EXx }, PREFIX_DATA }, + { "%XEvpminub", { XM, Vex, EXx }, PREFIX_DATA }, { "vpand%DQ", { XM, Vex, EXx }, PREFIX_DATA }, - { "vpaddusb", { XM, Vex, EXx }, PREFIX_DATA }, - { "vpaddusw", { XM, Vex, EXx }, PREFIX_DATA }, - { "vpmaxub", { XM, Vex, EXx }, PREFIX_DATA }, + { "%XEvpaddusb", { XM, Vex, EXx }, PREFIX_DATA }, + { "%XEvpaddusw", { XM, Vex, EXx }, PREFIX_DATA }, + { "%XEvpmaxub", { XM, Vex, EXx }, PREFIX_DATA }, { "vpandn%DQ", { XM, Vex, EXx }, PREFIX_DATA }, /* E0 */ - { "vpavgb", { XM, Vex, EXx }, PREFIX_DATA }, - { "vpsraw", { XM, Vex, EXxmm }, PREFIX_DATA }, - { "vpsra%DQ", { XM, Vex, EXxmm }, PREFIX_DATA }, - { "vpavgw", { XM, Vex, EXx }, PREFIX_DATA }, - { "vpmulhuw", { XM, Vex, EXx }, PREFIX_DATA }, - { "vpmulhw", { XM, Vex, EXx }, PREFIX_DATA }, + { "%XEvpavgb", { XM, Vex, EXx }, PREFIX_DATA }, + { "%XEvpsraw", { XM, Vex, EXxmm }, PREFIX_DATA }, + { "%XEvpsra%DQ", { XM, Vex, EXxmm }, PREFIX_DATA }, + { "%XEvpavgw", { XM, Vex, EXx }, PREFIX_DATA }, + { "%XEvpmulhuw", { XM, Vex, EXx }, PREFIX_DATA }, + { "%XEvpmulhw", { XM, Vex, EXx }, PREFIX_DATA }, { PREFIX_TABLE (PREFIX_EVEX_0FE6) }, { VEX_W_TABLE (EVEX_W_0FE7) }, /* E8 */ - { "vpsubsb", { XM, Vex, EXx }, PREFIX_DATA }, - { "vpsubsw", { XM, Vex, EXx }, PREFIX_DATA }, - { "vpminsw", { XM, Vex, EXx }, PREFIX_DATA }, + { "%XEvpsubsb", { XM, Vex, EXx }, PREFIX_DATA }, + { "%XEvpsubsw", { XM, Vex, EXx }, PREFIX_DATA }, + { "%XEvpminsw", { XM, Vex, EXx }, PREFIX_DATA }, { "vpor%DQ", { XM, Vex, EXx }, PREFIX_DATA }, - { "vpaddsb", { XM, Vex, EXx }, PREFIX_DATA }, - { "vpaddsw", { XM, Vex, EXx }, PREFIX_DATA }, - { "vpmaxsw", { XM, Vex, EXx }, PREFIX_DATA }, + { "%XEvpaddsb", { XM, Vex, EXx }, PREFIX_DATA }, + { "%XEvpaddsw", { XM, Vex, EXx }, PREFIX_DATA }, + { "%XEvpmaxsw", { XM, Vex, EXx }, PREFIX_DATA }, { "vpxor%DQ", { XM, Vex, EXx }, PREFIX_DATA }, /* F0 */ { Bad_Opcode }, - { "vpsllw", { XM, Vex, EXxmm }, PREFIX_DATA }, + { "%XEvpsllw", { XM, Vex, EXxmm }, PREFIX_DATA }, { VEX_W_TABLE (EVEX_W_0FF2) }, { VEX_W_TABLE (EVEX_W_0FF3) }, { VEX_W_TABLE (EVEX_W_0FF4) }, - { "vpmaddwd", { XM, Vex, EXx }, PREFIX_DATA }, - { "vpsadbw", { XM, Vex, EXx }, PREFIX_DATA }, + { "%XEvpmaddwd", { XM, Vex, EXx }, PREFIX_DATA }, + { "%XEvpsadbw", { XM, Vex, EXx }, PREFIX_DATA }, { Bad_Opcode }, /* F8 */ - { "vpsubb", { XM, Vex, EXx }, PREFIX_DATA }, - { "vpsubw", { XM, Vex, EXx }, PREFIX_DATA }, + { "%XEvpsubb", { XM, Vex, EXx }, PREFIX_DATA }, + { "%XEvpsubw", { XM, Vex, EXx }, PREFIX_DATA }, { VEX_W_TABLE (EVEX_W_0FFA) }, { VEX_W_TABLE (EVEX_W_0FFB) }, - { "vpaddb", { XM, Vex, EXx }, PREFIX_DATA }, - { "vpaddw", { XM, Vex, EXx }, PREFIX_DATA }, + { "%XEvpaddb", { XM, Vex, EXx }, PREFIX_DATA }, + { "%XEvpaddw", { XM, Vex, EXx }, PREFIX_DATA }, { VEX_W_TABLE (EVEX_W_0FFE) }, { Bad_Opcode }, }, /* EVEX_0F38 */ { /* 00 */ - { "vpshufb", { XM, Vex, EXx }, PREFIX_DATA }, + { "%XEvpshufb", { XM, Vex, EXx }, PREFIX_DATA }, { Bad_Opcode }, { Bad_Opcode }, { Bad_Opcode }, - { "vpmaddubsw", { XM, Vex, EXx }, PREFIX_DATA }, + { "%XEvpmaddubsw", { XM, Vex, EXx }, PREFIX_DATA }, { Bad_Opcode }, { Bad_Opcode }, { Bad_Opcode }, @@ -305,9 +305,9 @@ static const struct dis386 evex_table[][256] = { { Bad_Opcode }, { Bad_Opcode }, { Bad_Opcode }, - { "vpmulhrsw", { XM, Vex, EXx }, PREFIX_DATA }, + { "%XEvpmulhrsw", { XM, Vex, EXx }, PREFIX_DATA }, { VEX_W_TABLE (VEX_W_0F380C) }, - { "vpermilp%XD", { XM, Vex, EXx }, PREFIX_DATA }, + { "%XEvpermilp%XD", { XM, Vex, EXx }, PREFIX_DATA }, { Bad_Opcode }, { Bad_Opcode }, /* 10 */ @@ -324,8 +324,8 @@ static const struct dis386 evex_table[][256] = { { EVEX_LEN_TABLE (EVEX_LEN_0F3819) }, { MOD_TABLE (MOD_EVEX_0F381A) }, { MOD_TABLE (MOD_EVEX_0F381B) }, - { "vpabsb", { XM, EXx }, PREFIX_DATA }, - { "vpabsw", { XM, EXx }, PREFIX_DATA }, + { "%XEvpabsb", { XM, EXx }, PREFIX_DATA }, + { "%XEvpabsw", { XM, EXx }, PREFIX_DATA }, { VEX_W_TABLE (EVEX_W_0F381E) }, { VEX_W_TABLE (EVEX_W_0F381F) }, /* 20 */ @@ -359,13 +359,13 @@ static const struct dis386 evex_table[][256] = { { PREFIX_TABLE (PREFIX_EVEX_0F3838) }, { PREFIX_TABLE (PREFIX_EVEX_0F3839) }, { PREFIX_TABLE (PREFIX_EVEX_0F383A) }, - { "vpminu%DQ", { XM, Vex, EXx }, PREFIX_DATA }, - { "vpmaxsb", { XM, Vex, EXx }, PREFIX_DATA }, - { "vpmaxs%DQ", { XM, Vex, EXx }, PREFIX_DATA }, - { "vpmaxuw", { XM, Vex, EXx }, PREFIX_DATA }, - { "vpmaxu%DQ", { XM, Vex, EXx }, PREFIX_DATA }, + { "%XEvpminu%DQ", { XM, Vex, EXx }, PREFIX_DATA }, + { "%XEvpmaxsb", { XM, Vex, EXx }, PREFIX_DATA }, + { "%XEvpmaxs%DQ", { XM, Vex, EXx }, PREFIX_DATA }, + { "%XEvpmaxuw", { XM, Vex, EXx }, PREFIX_DATA }, + { "%XEvpmaxu%DQ", { XM, Vex, EXx }, PREFIX_DATA }, /* 40 */ - { "vpmull%DQ", { XM, Vex, EXx }, PREFIX_DATA }, + { "%XEvpmull%DQ", { XM, Vex, EXx }, PREFIX_DATA }, { Bad_Opcode }, { "vgetexpp%XW", { XM, EXx, EXxEVexS }, PREFIX_DATA }, { "vgetexps%XW", { XMScalar, VexScalar, EXdq, EXxEVexS }, PREFIX_DATA }, @@ -461,17 +461,17 @@ static const struct dis386 evex_table[][256] = { { "vgatherqp%XW", { XMGatherQ, MVexVSIBQWpX }, PREFIX_DATA }, { Bad_Opcode }, { Bad_Opcode }, - { "vfmaddsub132p%XW", { XM, Vex, EXx, EXxEVexR }, PREFIX_DATA }, - { "vfmsubadd132p%XW", { XM, Vex, EXx, EXxEVexR }, PREFIX_DATA }, + { "%XEvfmaddsub132p%XW", { XM, Vex, EXx, EXxEVexR }, PREFIX_DATA }, + { "%XEvfmsubadd132p%XW", { XM, Vex, EXx, EXxEVexR }, PREFIX_DATA }, /* 98 */ - { "vfmadd132p%XW", { XM, Vex, EXx, EXxEVexR }, PREFIX_DATA }, - { "vfmadd132s%XW", { XMScalar, VexScalar, EXdq, EXxEVexR }, PREFIX_DATA }, + { "%XEvfmadd132p%XW", { XM, Vex, EXx, EXxEVexR }, PREFIX_DATA }, + { "%XEvfmadd132s%XW", { XMScalar, VexScalar, EXdq, EXxEVexR }, PREFIX_DATA }, { PREFIX_TABLE (PREFIX_EVEX_0F389A) }, { PREFIX_TABLE (PREFIX_EVEX_0F389B) }, - { "vfnmadd132p%XW", { XM, Vex, EXx, EXxEVexR }, PREFIX_DATA }, - { "vfnmadd132s%XW", { XMScalar, VexScalar, EXdq, EXxEVexR }, PREFIX_DATA }, - { "vfnmsub132p%XW", { XM, Vex, EXx, EXxEVexR }, PREFIX_DATA }, - { "vfnmsub132s%XW", { XMScalar, VexScalar, EXdq, EXxEVexR }, PREFIX_DATA }, + { "%XEvfnmadd132p%XW", { XM, Vex, EXx, EXxEVexR }, PREFIX_DATA }, + { "%XEvfnmadd132s%XW", { XMScalar, VexScalar, EXdq, EXxEVexR }, PREFIX_DATA }, + { "%XEvfnmsub132p%XW", { XM, Vex, EXx, EXxEVexR }, PREFIX_DATA }, + { "%XEvfnmsub132s%XW", { XMScalar, VexScalar, EXdq, EXxEVexR }, PREFIX_DATA }, /* A0 */ { "vpscatterd%DQ", { MVexVSIBDWpX, XM }, PREFIX_DATA }, { "vpscatterq%DQ", { MVexVSIBQWpX, XMGatherQ }, PREFIX_DATA }, @@ -479,17 +479,17 @@ static const struct dis386 evex_table[][256] = { { "vscatterqp%XW", { MVexVSIBQWpX, XMGatherQ }, PREFIX_DATA }, { Bad_Opcode }, { Bad_Opcode }, - { "vfmaddsub213p%XW", { XM, Vex, EXx, EXxEVexR }, PREFIX_DATA }, - { "vfmsubadd213p%XW", { XM, Vex, EXx, EXxEVexR }, PREFIX_DATA }, + { "%XEvfmaddsub213p%XW", { XM, Vex, EXx, EXxEVexR }, PREFIX_DATA }, + { "%XEvfmsubadd213p%XW", { XM, Vex, EXx, EXxEVexR }, PREFIX_DATA }, /* A8 */ - { "vfmadd213p%XW", { XM, Vex, EXx, EXxEVexR }, PREFIX_DATA }, - { "vfmadd213s%XW", { XMScalar, VexScalar, EXdq, EXxEVexR }, PREFIX_DATA }, + { "%XEvfmadd213p%XW", { XM, Vex, EXx, EXxEVexR }, PREFIX_DATA }, + { "%XEvfmadd213s%XW", { XMScalar, VexScalar, EXdq, EXxEVexR }, PREFIX_DATA }, { PREFIX_TABLE (PREFIX_EVEX_0F38AA) }, { PREFIX_TABLE (PREFIX_EVEX_0F38AB) }, - { "vfnmadd213p%XW", { XM, Vex, EXx, EXxEVexR }, PREFIX_DATA }, - { "vfnmadd213s%XW", { XMScalar, VexScalar, EXdq, EXxEVexR }, PREFIX_DATA }, - { "vfnmsub213p%XW", { XM, Vex, EXx, EXxEVexR }, PREFIX_DATA }, - { "vfnmsub213s%XW", { XMScalar, VexScalar, EXdq, EXxEVexR }, PREFIX_DATA }, + { "%XEvfnmadd213p%XW", { XM, Vex, EXx, EXxEVexR }, PREFIX_DATA }, + { "%XEvfnmadd213s%XW", { XMScalar, VexScalar, EXdq, EXxEVexR }, PREFIX_DATA }, + { "%XEvfnmsub213p%XW", { XM, Vex, EXx, EXxEVexR }, PREFIX_DATA }, + { "%XEvfnmsub213s%XW", { XMScalar, VexScalar, EXdq, EXxEVexR }, PREFIX_DATA }, /* B0 */ { Bad_Opcode }, { Bad_Opcode }, @@ -497,17 +497,17 @@ static const struct dis386 evex_table[][256] = { { Bad_Opcode }, { "vpmadd52luq", { XM, Vex, EXx }, PREFIX_DATA }, { "vpmadd52huq", { XM, Vex, EXx }, PREFIX_DATA }, - { "vfmaddsub231p%XW", { XM, Vex, EXx, EXxEVexR }, PREFIX_DATA }, - { "vfmsubadd231p%XW", { XM, Vex, EXx, EXxEVexR }, PREFIX_DATA }, + { "%XEvfmaddsub231p%XW", { XM, Vex, EXx, EXxEVexR }, PREFIX_DATA }, + { "%XEvfmsubadd231p%XW", { XM, Vex, EXx, EXxEVexR }, PREFIX_DATA }, /* B8 */ - { "vfmadd231p%XW", { XM, Vex, EXx, EXxEVexR }, PREFIX_DATA }, - { "vfmadd231s%XW", { XMScalar, VexScalar, EXdq, EXxEVexR }, PREFIX_DATA }, - { "vfmsub231p%XW", { XM, Vex, EXx, EXxEVexR }, PREFIX_DATA }, - { "vfmsub231s%XW", { XMScalar, VexScalar, EXdq, EXxEVexR }, PREFIX_DATA }, - { "vfnmadd231p%XW", { XM, Vex, EXx, EXxEVexR }, PREFIX_DATA }, - { "vfnmadd231s%XW", { XMScalar, VexScalar, EXdq, EXxEVexR }, PREFIX_DATA }, - { "vfnmsub231p%XW", { XM, Vex, EXx, EXxEVexR }, PREFIX_DATA }, - { "vfnmsub231s%XW", { XMScalar, VexScalar, EXdq, EXxEVexR }, PREFIX_DATA }, + { "%XEvfmadd231p%XW", { XM, Vex, EXx, EXxEVexR }, PREFIX_DATA }, + { "%XEvfmadd231s%XW", { XMScalar, VexScalar, EXdq, EXxEVexR }, PREFIX_DATA }, + { "%XEvfmsub231p%XW", { XM, Vex, EXx, EXxEVexR }, PREFIX_DATA }, + { "%XEvfmsub231s%XW", { XMScalar, VexScalar, EXdq, EXxEVexR }, PREFIX_DATA }, + { "%XEvfnmadd231p%XW", { XM, Vex, EXx, EXxEVexR }, PREFIX_DATA }, + { "%XEvfnmadd231s%XW", { XMScalar, VexScalar, EXdq, EXxEVexR }, PREFIX_DATA }, + { "%XEvfnmsub231p%XW", { XM, Vex, EXx, EXxEVexR }, PREFIX_DATA }, + { "%XEvfnmsub231s%XW", { XMScalar, VexScalar, EXdq, EXxEVexR }, PREFIX_DATA }, /* C0 */ { Bad_Opcode }, { Bad_Opcode }, @@ -540,10 +540,10 @@ static const struct dis386 evex_table[][256] = { { Bad_Opcode }, { Bad_Opcode }, { Bad_Opcode }, - { "vaesenc", { XM, Vex, EXx }, PREFIX_DATA }, - { "vaesenclast", { XM, Vex, EXx }, PREFIX_DATA }, - { "vaesdec", { XM, Vex, EXx }, PREFIX_DATA }, - { "vaesdeclast", { XM, Vex, EXx }, PREFIX_DATA }, + { "%XEvaesenc", { XM, Vex, EXx }, PREFIX_DATA }, + { "%XEvaesenclast", { XM, Vex, EXx }, PREFIX_DATA }, + { "%XEvaesdec", { XM, Vex, EXx }, PREFIX_DATA }, + { "%XEvaesdeclast", { XM, Vex, EXx }, PREFIX_DATA }, /* E0 */ { Bad_Opcode }, { Bad_Opcode }, @@ -589,7 +589,7 @@ static const struct dis386 evex_table[][256] = { { Bad_Opcode }, { "valign%DQ", { XM, Vex, EXx, Ib }, PREFIX_DATA }, { VEX_W_TABLE (VEX_W_0F3A04) }, - { "vpermilp%XD", { XM, EXx, Ib }, PREFIX_DATA }, + { "%XEvpermilp%XD", { XM, EXx, Ib }, PREFIX_DATA }, { Bad_Opcode }, { Bad_Opcode }, /* 08 */ @@ -600,7 +600,7 @@ static const struct dis386 evex_table[][256] = { { Bad_Opcode }, { Bad_Opcode }, { Bad_Opcode }, - { "vpalignr", { XM, Vex, EXx, Ib }, PREFIX_DATA }, + { "%XEvpalignr", { XM, Vex, EXx, Ib }, PREFIX_DATA }, /* 10 */ { Bad_Opcode }, { Bad_Opcode }, @@ -660,7 +660,7 @@ static const struct dis386 evex_table[][256] = { { Bad_Opcode }, { VEX_W_TABLE (EVEX_W_0F3A42) }, { EVEX_LEN_TABLE (EVEX_LEN_0F3A43) }, - { "vpclmulqdq", { XM, Vex, EXx, PCLMUL }, PREFIX_DATA }, + { "%XEvpclmulqdq", { XM, Vex, EXx, PCLMUL }, PREFIX_DATA }, { Bad_Opcode }, { Bad_Opcode }, { Bad_Opcode }, diff --git a/opcodes/i386-dis.c b/opcodes/i386-dis.c index fce05e0..d94d6ad 100644 --- a/opcodes/i386-dis.c +++ b/opcodes/i386-dis.c @@ -1759,6 +1759,8 @@ struct dis386 { "XH" => print 'h' if EVEX.W=0, EVEX.W=1 is not a valid encoding (for FP16) "XS" => print 's' if !EVEX or EVEX.W=0, EVEX.W=1 is not a valid encoding "XV" => print "{vex} " pseudo prefix + "XE" => print "{evex} " pseudo prefix if no EVEX-specific functionality is + is used by an EVEX-encoded (AVX512VL) instruction. "LQ" => print 'l' ('d' in Intel mode) or 'q' for memory operand, cond being false, or no operand at all in 64bit mode, or if suffix_always is true. @@ -3564,71 +3566,71 @@ static const struct dis386 prefix_table[][4] = { /* PREFIX_VEX_0F10 */ { - { "vmovupX", { XM, EXEvexXNoBcst }, PREFIX_OPCODE }, - { "vmovs%XS", { XMScalar, VexScalarR, EXd }, 0 }, - { "vmovupX", { XM, EXEvexXNoBcst }, PREFIX_OPCODE }, - { "vmovs%XD", { XMScalar, VexScalarR, EXq }, 0 }, + { "%XEvmovupX", { XM, EXEvexXNoBcst }, 0 }, + { "%XEvmovs%XS", { XMScalar, VexScalarR, EXd }, 0 }, + { "%XEvmovupX", { XM, EXEvexXNoBcst }, 0 }, + { "%XEvmovs%XD", { XMScalar, VexScalarR, EXq }, 0 }, }, /* PREFIX_VEX_0F11 */ { - { "vmovupX", { EXxS, XM }, PREFIX_OPCODE }, - { "vmovs%XS", { EXdS, VexScalarR, XMScalar }, 0 }, - { "vmovupX", { EXxS, XM }, PREFIX_OPCODE }, - { "vmovs%XD", { EXqS, VexScalarR, XMScalar }, 0 }, + { "%XEvmovupX", { EXxS, XM }, 0 }, + { "%XEvmovs%XS", { EXdS, VexScalarR, XMScalar }, 0 }, + { "%XEvmovupX", { EXxS, XM }, 0 }, + { "%XEvmovs%XD", { EXqS, VexScalarR, XMScalar }, 0 }, }, /* PREFIX_VEX_0F12 */ { { MOD_TABLE (MOD_VEX_0F12_PREFIX_0) }, - { "vmov%XSldup", { XM, EXEvexXNoBcst }, 0 }, + { "%XEvmov%XSldup", { XM, EXEvexXNoBcst }, 0 }, { MOD_TABLE (MOD_VEX_0F12_PREFIX_2) }, - { "vmov%XDdup", { XM, EXymmq }, 0 }, + { "%XEvmov%XDdup", { XM, EXymmq }, 0 }, }, /* PREFIX_VEX_0F16 */ { { MOD_TABLE (MOD_VEX_0F16_PREFIX_0) }, - { "vmov%XShdup", { XM, EXEvexXNoBcst }, 0 }, + { "%XEvmov%XShdup", { XM, EXEvexXNoBcst }, 0 }, { MOD_TABLE (MOD_VEX_0F16_PREFIX_2) }, }, /* PREFIX_VEX_0F2A */ { { Bad_Opcode }, - { "vcvtsi2ss{%LQ|}", { XMScalar, VexScalar, EXxEVexR, Edq }, 0 }, + { "%XEvcvtsi2ss{%LQ|}", { XMScalar, VexScalar, EXxEVexR, Edq }, 0 }, { Bad_Opcode }, - { "vcvtsi2sd{%LQ|}", { XMScalar, VexScalar, EXxEVexR64, Edq }, 0 }, + { "%XEvcvtsi2sd{%LQ|}", { XMScalar, VexScalar, EXxEVexR64, Edq }, 0 }, }, /* PREFIX_VEX_0F2C */ { { Bad_Opcode }, - { "vcvttss2si", { Gdq, EXd, EXxEVexS }, 0 }, + { "%XEvcvttss2si", { Gdq, EXd, EXxEVexS }, 0 }, { Bad_Opcode }, - { "vcvttsd2si", { Gdq, EXq, EXxEVexS }, 0 }, + { "%XEvcvttsd2si", { Gdq, EXq, EXxEVexS }, 0 }, }, /* PREFIX_VEX_0F2D */ { { Bad_Opcode }, - { "vcvtss2si", { Gdq, EXd, EXxEVexR }, 0 }, + { "%XEvcvtss2si", { Gdq, EXd, EXxEVexR }, 0 }, { Bad_Opcode }, - { "vcvtsd2si", { Gdq, EXq, EXxEVexR }, 0 }, + { "%XEvcvtsd2si", { Gdq, EXq, EXxEVexR }, 0 }, }, /* PREFIX_VEX_0F2E */ { - { "vucomisX", { XMScalar, EXd, EXxEVexS }, PREFIX_OPCODE }, + { "%XEvucomisX", { XMScalar, EXd, EXxEVexS }, 0 }, { Bad_Opcode }, - { "vucomisX", { XMScalar, EXq, EXxEVexS }, PREFIX_OPCODE }, + { "%XEvucomisX", { XMScalar, EXq, EXxEVexS }, 0 }, }, /* PREFIX_VEX_0F2F */ { - { "vcomisX", { XMScalar, EXd, EXxEVexS }, PREFIX_OPCODE }, + { "%XEvcomisX", { XMScalar, EXd, EXxEVexS }, 0 }, { Bad_Opcode }, - { "vcomisX", { XMScalar, EXq, EXxEVexS }, PREFIX_OPCODE }, + { "%XEvcomisX", { XMScalar, EXq, EXxEVexS }, 0 }, }, /* PREFIX_VEX_0F41_L_1_M_1_W_0 */ @@ -3743,10 +3745,10 @@ static const struct dis386 prefix_table[][4] = { /* PREFIX_VEX_0F51 */ { - { "vsqrtpX", { XM, EXx, EXxEVexR }, PREFIX_OPCODE }, - { "vsqrts%XS", { XMScalar, VexScalar, EXd, EXxEVexR }, 0 }, - { "vsqrtpX", { XM, EXx, EXxEVexR }, PREFIX_OPCODE }, - { "vsqrts%XD", { XMScalar, VexScalar, EXq, EXxEVexR }, 0 }, + { "%XEvsqrtpX", { XM, EXx, EXxEVexR }, 0 }, + { "%XEvsqrts%XS", { XMScalar, VexScalar, EXd, EXxEVexR }, 0 }, + { "%XEvsqrtpX", { XM, EXx, EXxEVexR }, 0 }, + { "%XEvsqrts%XD", { XMScalar, VexScalar, EXq, EXxEVexR }, 0 }, }, /* PREFIX_VEX_0F52 */ @@ -3763,26 +3765,26 @@ static const struct dis386 prefix_table[][4] = { /* PREFIX_VEX_0F58 */ { - { "vaddpX", { XM, Vex, EXx, EXxEVexR }, PREFIX_OPCODE }, - { "vadds%XS", { XMScalar, VexScalar, EXd, EXxEVexR }, 0 }, - { "vaddpX", { XM, Vex, EXx, EXxEVexR }, PREFIX_OPCODE }, - { "vadds%XD", { XMScalar, VexScalar, EXq, EXxEVexR }, 0 }, + { "%XEvaddpX", { XM, Vex, EXx, EXxEVexR }, 0 }, + { "%XEvadds%XS", { XMScalar, VexScalar, EXd, EXxEVexR }, 0 }, + { "%XEvaddpX", { XM, Vex, EXx, EXxEVexR }, 0 }, + { "%XEvadds%XD", { XMScalar, VexScalar, EXq, EXxEVexR }, 0 }, }, /* PREFIX_VEX_0F59 */ { - { "vmulpX", { XM, Vex, EXx, EXxEVexR }, PREFIX_OPCODE }, - { "vmuls%XS", { XMScalar, VexScalar, EXd, EXxEVexR }, 0 }, - { "vmulpX", { XM, Vex, EXx, EXxEVexR }, PREFIX_OPCODE }, - { "vmuls%XD", { XMScalar, VexScalar, EXq, EXxEVexR }, 0 }, + { "%XEvmulpX", { XM, Vex, EXx, EXxEVexR }, 0 }, + { "%XEvmuls%XS", { XMScalar, VexScalar, EXd, EXxEVexR }, 0 }, + { "%XEvmulpX", { XM, Vex, EXx, EXxEVexR }, 0 }, + { "%XEvmuls%XD", { XMScalar, VexScalar, EXq, EXxEVexR }, 0 }, }, /* PREFIX_VEX_0F5A */ { - { "vcvtp%XS2pd", { XM, EXEvexHalfBcstXmmq, EXxEVexS }, 0 }, - { "vcvts%XS2sd", { XMScalar, VexScalar, EXd, EXxEVexS }, 0 }, - { "vcvtp%XD2ps%XY", { XMxmmq, EXx, EXxEVexR }, 0 }, - { "vcvts%XD2ss", { XMScalar, VexScalar, EXq, EXxEVexR }, 0 }, + { "%XEvcvtp%XS2pd", { XM, EXEvexHalfBcstXmmq, EXxEVexS }, 0 }, + { "%XEvcvts%XS2sd", { XMScalar, VexScalar, EXd, EXxEVexS }, 0 }, + { "%XEvcvtp%XD2ps%XY", { XMxmmq, EXx, EXxEVexR }, 0 }, + { "%XEvcvts%XD2ss", { XMScalar, VexScalar, EXq, EXxEVexR }, 0 }, }, /* PREFIX_VEX_0F5B */ @@ -3794,34 +3796,34 @@ static const struct dis386 prefix_table[][4] = { /* PREFIX_VEX_0F5C */ { - { "vsubpX", { XM, Vex, EXx, EXxEVexR }, PREFIX_OPCODE }, - { "vsubs%XS", { XMScalar, VexScalar, EXd, EXxEVexR }, 0 }, - { "vsubpX", { XM, Vex, EXx, EXxEVexR }, PREFIX_OPCODE }, - { "vsubs%XD", { XMScalar, VexScalar, EXq, EXxEVexR }, 0 }, + { "%XEvsubpX", { XM, Vex, EXx, EXxEVexR }, 0 }, + { "%XEvsubs%XS", { XMScalar, VexScalar, EXd, EXxEVexR }, 0 }, + { "%XEvsubpX", { XM, Vex, EXx, EXxEVexR }, 0 }, + { "%XEvsubs%XD", { XMScalar, VexScalar, EXq, EXxEVexR }, 0 }, }, /* PREFIX_VEX_0F5D */ { - { "vminpX", { XM, Vex, EXx, EXxEVexS }, PREFIX_OPCODE }, - { "vmins%XS", { XMScalar, VexScalar, EXd, EXxEVexS }, 0 }, - { "vminpX", { XM, Vex, EXx, EXxEVexS }, PREFIX_OPCODE }, - { "vmins%XD", { XMScalar, VexScalar, EXq, EXxEVexS }, 0 }, + { "%XEvminpX", { XM, Vex, EXx, EXxEVexS }, 0 }, + { "%XEvmins%XS", { XMScalar, VexScalar, EXd, EXxEVexS }, 0 }, + { "%XEvminpX", { XM, Vex, EXx, EXxEVexS }, 0 }, + { "%XEvmins%XD", { XMScalar, VexScalar, EXq, EXxEVexS }, 0 }, }, /* PREFIX_VEX_0F5E */ { - { "vdivpX", { XM, Vex, EXx, EXxEVexR }, PREFIX_OPCODE }, - { "vdivs%XS", { XMScalar, VexScalar, EXd, EXxEVexR }, 0 }, - { "vdivpX", { XM, Vex, EXx, EXxEVexR }, PREFIX_OPCODE }, - { "vdivs%XD", { XMScalar, VexScalar, EXq, EXxEVexR }, 0 }, + { "%XEvdivpX", { XM, Vex, EXx, EXxEVexR }, 0 }, + { "%XEvdivs%XS", { XMScalar, VexScalar, EXd, EXxEVexR }, 0 }, + { "%XEvdivpX", { XM, Vex, EXx, EXxEVexR }, 0 }, + { "%XEvdivs%XD", { XMScalar, VexScalar, EXq, EXxEVexR }, 0 }, }, /* PREFIX_VEX_0F5F */ { - { "vmaxpX", { XM, Vex, EXx, EXxEVexS }, PREFIX_OPCODE }, - { "vmaxs%XS", { XMScalar, VexScalar, EXd, EXxEVexS }, 0 }, - { "vmaxpX", { XM, Vex, EXx, EXxEVexS }, PREFIX_OPCODE }, - { "vmaxs%XD", { XMScalar, VexScalar, EXq, EXxEVexS }, 0 }, + { "%XEvmaxpX", { XM, Vex, EXx, EXxEVexS }, 0 }, + { "%XEvmaxs%XS", { XMScalar, VexScalar, EXd, EXxEVexS }, 0 }, + { "%XEvmaxpX", { XM, Vex, EXx, EXxEVexS }, 0 }, + { "%XEvmaxs%XD", { XMScalar, VexScalar, EXq, EXxEVexS }, 0 }, }, /* PREFIX_VEX_0F6F */ @@ -6681,32 +6683,32 @@ static const struct dis386 vex_table[][256] = { static const struct dis386 vex_len_table[][2] = { /* VEX_LEN_0F12_P_0_M_0 / VEX_LEN_0F12_P_2_M_0 */ { - { "vmovlpX", { XM, Vex, EXq }, PREFIX_OPCODE }, + { "%XEvmovlpX", { XM, Vex, EXq }, 0 }, }, /* VEX_LEN_0F12_P_0_M_1 */ { - { "vmovhlp%XS", { XM, Vex, EXq }, 0 }, + { "%XEvmovhlp%XS", { XM, Vex, EXq }, 0 }, }, /* VEX_LEN_0F13_M_0 */ { - { "vmovlpX", { EXq, XM }, PREFIX_OPCODE }, + { "%XEvmovlpX", { EXq, XM }, PREFIX_OPCODE }, }, /* VEX_LEN_0F16_P_0_M_0 / VEX_LEN_0F16_P_2_M_0 */ { - { "vmovhpX", { XM, Vex, EXq }, PREFIX_OPCODE }, + { "%XEvmovhpX", { XM, Vex, EXq }, 0 }, }, /* VEX_LEN_0F16_P_0_M_1 */ { - { "vmovlhp%XS", { XM, Vex, EXq }, 0 }, + { "%XEvmovlhp%XS", { XM, Vex, EXq }, 0 }, }, /* VEX_LEN_0F17_M_0 */ { - { "vmovhpX", { EXq, XM }, PREFIX_OPCODE }, + { "%XEvmovhpX", { EXq, XM }, PREFIX_OPCODE }, }, /* VEX_LEN_0F41 */ @@ -6758,7 +6760,7 @@ static const struct dis386 vex_len_table[][2] = { /* VEX_LEN_0F6E */ { - { "vmovK", { XMScalar, Edq }, PREFIX_DATA }, + { "%XEvmovK", { XMScalar, Edq }, PREFIX_DATA }, }, /* VEX_LEN_0F77 */ @@ -6769,12 +6771,12 @@ static const struct dis386 vex_len_table[][2] = { /* VEX_LEN_0F7E_P_1 */ { - { "vmovq", { XMScalar, EXq }, 0 }, + { "%XEvmovq", { XMScalar, EXq }, 0 }, }, /* VEX_LEN_0F7E_P_2 */ { - { "vmovK", { Edq, XMScalar }, 0 }, + { "%XEvmovK", { Edq, XMScalar }, 0 }, }, /* VEX_LEN_0F90 */ @@ -6819,17 +6821,17 @@ static const struct dis386 vex_len_table[][2] = { /* VEX_LEN_0FC4 */ { - { "vpinsrw", { XM, Vex, Edw, Ib }, PREFIX_DATA }, + { "%XEvpinsrw", { XM, Vex, Edw, Ib }, PREFIX_DATA }, }, /* VEX_LEN_0FC5 */ { - { "vpextrw", { Gd, XS, Ib }, PREFIX_DATA }, + { "%XEvpextrw", { Gd, XS, Ib }, PREFIX_DATA }, }, /* VEX_LEN_0FD6 */ { - { "vmovq", { EXqS, XMScalar }, PREFIX_DATA }, + { "%XEvmovq", { EXqS, XMScalar }, PREFIX_DATA }, }, /* VEX_LEN_0FF7 */ @@ -6986,22 +6988,22 @@ static const struct dis386 vex_len_table[][2] = { /* VEX_LEN_0F3A14 */ { - { "vpextrb", { Edb, XM, Ib }, PREFIX_DATA }, + { "%XEvpextrb", { Edb, XM, Ib }, PREFIX_DATA }, }, /* VEX_LEN_0F3A15 */ { - { "vpextrw", { Edw, XM, Ib }, PREFIX_DATA }, + { "%XEvpextrw", { Edw, XM, Ib }, PREFIX_DATA }, }, /* VEX_LEN_0F3A16 */ { - { "vpextrK", { Edq, XM, Ib }, PREFIX_DATA }, + { "%XEvpextrK", { Edq, XM, Ib }, PREFIX_DATA }, }, /* VEX_LEN_0F3A17 */ { - { "vextractps", { Ed, XM, Ib }, PREFIX_DATA }, + { "%XEvextractps", { Ed, XM, Ib }, PREFIX_DATA }, }, /* VEX_LEN_0F3A18 */ @@ -7018,17 +7020,17 @@ static const struct dis386 vex_len_table[][2] = { /* VEX_LEN_0F3A20 */ { - { "vpinsrb", { XM, Vex, Edb, Ib }, PREFIX_DATA }, + { "%XEvpinsrb", { XM, Vex, Edb, Ib }, PREFIX_DATA }, }, /* VEX_LEN_0F3A21 */ { - { "vinsertps", { XM, Vex, EXd, Ib }, PREFIX_DATA }, + { "%XEvinsertps", { XM, Vex, EXd, Ib }, PREFIX_DATA }, }, /* VEX_LEN_0F3A22 */ { - { "vpinsrK", { XM, Vex, Edq, Ib }, PREFIX_DATA }, + { "%XEvpinsrK", { XM, Vex, Edq, Ib }, PREFIX_DATA }, }, /* VEX_LEN_0F3A30 */ @@ -7470,7 +7472,7 @@ static const struct dis386 vex_w_table[][2] = { }, { /* VEX_W_0F380C */ - { "vpermilps", { XM, Vex, EXx }, PREFIX_DATA }, + { "%XEvpermilps", { XM, Vex, EXx }, PREFIX_DATA }, }, { /* VEX_W_0F380D */ @@ -7494,7 +7496,7 @@ static const struct dis386 vex_w_table[][2] = { }, { /* VEX_W_0F3818 */ - { "vbroadcastss", { XM, EXd }, PREFIX_DATA }, + { "%XEvbroadcastss", { XM, EXd }, PREFIX_DATA }, }, { /* VEX_W_0F3819_L_1 */ @@ -7570,7 +7572,7 @@ static const struct dis386 vex_w_table[][2] = { }, { /* VEX_W_0F3858 */ - { "vpbroadcastd", { XM, EXd }, PREFIX_DATA }, + { "%XEvpbroadcastd", { XM, EXd }, PREFIX_DATA }, }, { /* VEX_W_0F3859 */ @@ -7606,25 +7608,25 @@ static const struct dis386 vex_w_table[][2] = { }, { /* VEX_W_0F3878 */ - { "vpbroadcastb", { XM, EXb }, PREFIX_DATA }, + { "%XEvpbroadcastb", { XM, EXb }, PREFIX_DATA }, }, { /* VEX_W_0F3879 */ - { "vpbroadcastw", { XM, EXw }, PREFIX_DATA }, + { "%XEvpbroadcastw", { XM, EXw }, PREFIX_DATA }, }, { /* VEX_W_0F38CF */ - { "vgf2p8mulb", { XM, Vex, EXx }, PREFIX_DATA }, + { "%XEvgf2p8mulb", { XM, Vex, EXx }, PREFIX_DATA }, }, { /* VEX_W_0F3A00_L_1 */ { Bad_Opcode }, - { "vpermq", { XM, EXx, Ib }, PREFIX_DATA }, + { "%XEvpermq", { XM, EXx, Ib }, PREFIX_DATA }, }, { /* VEX_W_0F3A01_L_1 */ { Bad_Opcode }, - { "vpermpd", { XM, EXx, Ib }, PREFIX_DATA }, + { "%XEvpermpd", { XM, EXx, Ib }, PREFIX_DATA }, }, { /* VEX_W_0F3A02 */ @@ -7632,7 +7634,7 @@ static const struct dis386 vex_w_table[][2] = { }, { /* VEX_W_0F3A04 */ - { "vpermilps", { XM, EXx, Ib }, PREFIX_DATA }, + { "%XEvpermilps", { XM, EXx, Ib }, PREFIX_DATA }, }, { /* VEX_W_0F3A05 */ @@ -7652,7 +7654,7 @@ static const struct dis386 vex_w_table[][2] = { }, { /* VEX_W_0F3A1D */ - { "vcvtps2ph", { EXxmmq, XM, EXxEVexS, Ib }, PREFIX_DATA }, + { "%XEvcvtps2ph", { EXxmmq, XM, EXxEVexS, Ib }, PREFIX_DATA }, }, { /* VEX_W_0F3A38_L_1 */ @@ -7681,12 +7683,12 @@ static const struct dis386 vex_w_table[][2] = { { /* VEX_W_0F3ACE */ { Bad_Opcode }, - { "vgf2p8affineqb", { XM, Vex, EXx, Ib }, PREFIX_DATA }, + { "%XEvgf2p8affineqb", { XM, Vex, EXx, Ib }, PREFIX_DATA }, }, { /* VEX_W_0F3ACF */ { Bad_Opcode }, - { "vgf2p8affineinvqb", { XM, Vex, EXx, Ib }, PREFIX_DATA }, + { "%XEvgf2p8affineinvqb", { XM, Vex, EXx, Ib }, PREFIX_DATA }, }, /* VEX_W_0FXOP_08_85_L_0 */ { @@ -8218,7 +8220,7 @@ static const struct dis386 mod_table[][2] = { }, { /* MOD_VEX_0F2B */ - { "vmovntpX", { Mx, XM }, PREFIX_OPCODE }, + { "%XEvmovntpX", { Mx, XM }, PREFIX_OPCODE }, }, { /* MOD_VEX_0F41_L_1 */ @@ -10469,7 +10471,41 @@ putop (instr_info *ins, const char *in_template, int sizeflag) else *ins->obufp++ = 'w'; break; - case 'E': /* For jcxz/jecxz */ + case 'E': + if (l == 1) + { + switch (last[0]) + { + case 'X': + if (!ins->vex.evex || ins->vex.b || ins->vex.ll >= 2 + || !ins->vex.r + || (ins->modrm.mod == 3 && (ins->rex & REX_X)) + || !ins->vex.v || ins->vex.mask_register_specifier) + break; + /* AVX512 extends a number of V*D insns to also have V*Q variants, + merely distinguished by EVEX.W. Look for a use of the + respective macro. */ + if (ins->vex.w) + { + const char *pct = strchr (p + 1, '%'); + + if (pct != NULL && pct[1] == 'D' && pct[2] == 'Q') + break; + } + *ins->obufp++ = '{'; + *ins->obufp++ = 'e'; + *ins->obufp++ = 'v'; + *ins->obufp++ = 'e'; + *ins->obufp++ = 'x'; + *ins->obufp++ = '}'; + *ins->obufp++ = ' '; + break; + default: + abort (); + } + break; + } + /* For jcxz/jecxz */ if (ins->address_mode == mode_64bit) { if (sizeflag & AFLAG) |