+2021-03-10 Jan Beulich <jbeulich@suse.com>
+
+ * opcodes/i386-dis.c (EVEX_LEN_0F6E, EVEX_LEN_0F7E_P_1,
+ EVEX_LEN_0F7E_P_2, EVEX_LEN_0FC4, EVEX_LEN_0FC5, EVEX_LEN_0FD6,
+ EVEX_LEN_0F3816, EVEX_LEN_0F3A14, EVEX_LEN_0F3A15,
+ EVEX_LEN_0F3A16, EVEX_LEN_0F3A17, EVEX_LEN_0F3A20,
+ EVEX_LEN_0F3A21_W_0, EVEX_LEN_0F3A22, EVEX_W_0FD6_L_0): Delete.
+ (EVEX_LEN_0F3816, EVEX_W_0FD6): New.
+ (get_valid_dis386): Also handle 512-bit vector length when
+ vectoring into vex_len_table[].
+ * i386-dis-evex.h (evex_table): Adjust opcode 0F6E, 0FC4, 0FC5,
+ 0FD6, 0F3A14, 0F3A15, 0F3A16, 0F3A17, 0F3A20, and 0F3A22
+ entries.
+ * i386-dis-evex-len.h: Delete opcode 0F6E, 0FC4, 0FC5, 0FD6,
+ 0F3A14, 0F3A15, 0F3A16, 0F3A17, 0F3A20, and 0F3A22 entries.
+ * i386-dis-evex-prefix.h: Adjust 0F7E entry.
+ * i386-dis-evex-w.h: Adjust 0F7E, 0F7F, 0FD6, and 0F3A21
+ entries.
+
2021-03-10 Jan Beulich <jbeulich@suse.com>
* opcodes/i386-dis.c (EVEX_LEN_0F3A00_W_1, EVEX_LEN_0F3A01_W_1):
static const struct dis386 evex_len_table[][3] = {
- /* EVEX_LEN_0F6E */
- {
- { "vmovK", { XMScalar, Edq }, PREFIX_DATA },
- },
-
- /* EVEX_LEN_0F7E_P_1 */
- {
- { VEX_W_TABLE (EVEX_W_0F7E_P_1) },
- },
-
- /* EVEX_LEN_0F7E_P_2 */
- {
- { "vmovK", { Edq, XMScalar }, 0 },
- },
-
- /* EVEX_LEN_0FC4 */
- {
- { "vpinsrw", { XM, Vex, Edqw, Ib }, PREFIX_DATA },
- },
-
- /* EVEX_LEN_0FC5 */
- {
- { "vpextrw", { Gdq, XS, Ib }, PREFIX_DATA },
- },
-
- /* EVEX_LEN_0FD6 */
- {
- { VEX_W_TABLE (EVEX_W_0FD6_L_0) },
- },
-
/* EVEX_LEN_0F3816 */
{
{ Bad_Opcode },
{ VEX_W_TABLE (VEX_W_0F3A01_L_1) },
},
- /* EVEX_LEN_0F3A14 */
- {
- { "vpextrb", { Edqb, XM, Ib }, PREFIX_DATA },
- },
-
- /* EVEX_LEN_0F3A15 */
- {
- { "vpextrw", { Edqw, XM, Ib }, PREFIX_DATA },
- },
-
- /* EVEX_LEN_0F3A16 */
- {
- { "vpextrK", { Edq, XM, Ib }, PREFIX_DATA },
- },
-
- /* EVEX_LEN_0F3A17 */
- {
- { "vextractps", { Edqd, XMM, Ib }, PREFIX_DATA },
- },
-
/* EVEX_LEN_0F3A18 */
{
{ Bad_Opcode },
{ VEX_W_TABLE (EVEX_W_0F3A1B_L_2) },
},
- /* EVEX_LEN_0F3A20 */
- {
- { "vpinsrb", { XM, Vex, Edqb, Ib }, PREFIX_DATA },
- },
-
- /* EVEX_LEN_0F3A21_W_0 */
- {
- { "vinsertps", { XMM, Vex, EXxmm_md, Ib }, PREFIX_DATA },
- },
-
- /* EVEX_LEN_0F3A22 */
- {
- { "vpinsrK", { XM, Vex, Edq, Ib }, PREFIX_DATA },
- },
-
/* EVEX_LEN_0F3A23 */
{
{ Bad_Opcode },
/* PREFIX_EVEX_0F7E */
{
{ Bad_Opcode },
- { EVEX_LEN_TABLE (EVEX_LEN_0F7E_P_1) },
- { EVEX_LEN_TABLE (EVEX_LEN_0F7E_P_2) },
+ { VEX_W_TABLE (EVEX_W_0F7E_P_1) },
+ { VEX_LEN_TABLE (VEX_LEN_0F7E_P_2) },
},
/* PREFIX_EVEX_0F7F */
{
/* EVEX_W_0F7E_P_1 */
{
{ Bad_Opcode },
- { "vmovq", { XMScalar, EXxmm_mq }, 0 },
+ { VEX_LEN_TABLE (VEX_LEN_0F7E_P_1) },
},
/* EVEX_W_0F7F_P_1 */
{
{ Bad_Opcode },
{ "vpaddq", { XM, Vex, EXx }, PREFIX_DATA },
},
- /* EVEX_W_0FD6_L_0 */
+ /* EVEX_W_0FD6 */
{
{ Bad_Opcode },
- { "vmovq", { EXqS, XMScalar }, PREFIX_DATA },
+ { VEX_LEN_TABLE (VEX_LEN_0FD6) },
},
/* EVEX_W_0FE6_P_1 */
{
},
/* EVEX_W_0F3A21 */
{
- { EVEX_LEN_TABLE (EVEX_LEN_0F3A21_W_0) },
+ { VEX_LEN_TABLE (VEX_LEN_0F3A21) },
},
/* EVEX_W_0F3A23_L_n */
{
{ VEX_W_TABLE (EVEX_W_0F6B) },
{ VEX_W_TABLE (EVEX_W_0F6C) },
{ VEX_W_TABLE (EVEX_W_0F6D) },
- { EVEX_LEN_TABLE (EVEX_LEN_0F6E) },
+ { VEX_LEN_TABLE (VEX_LEN_0F6E) },
{ PREFIX_TABLE (PREFIX_EVEX_0F6F) },
/* 70 */
{ PREFIX_TABLE (PREFIX_EVEX_0F70) },
{ Bad_Opcode },
{ PREFIX_TABLE (PREFIX_EVEX_0FC2) },
{ Bad_Opcode },
- { EVEX_LEN_TABLE (EVEX_LEN_0FC4) },
- { EVEX_LEN_TABLE (EVEX_LEN_0FC5) },
+ { VEX_LEN_TABLE (VEX_LEN_0FC4) },
+ { VEX_LEN_TABLE (VEX_LEN_0FC5) },
{ "vshufpX", { XM, Vex, EXx, Ib }, PREFIX_OPCODE },
{ Bad_Opcode },
/* C8 */
{ VEX_W_TABLE (EVEX_W_0FD3) },
{ VEX_W_TABLE (EVEX_W_0FD4) },
{ "vpmullw", { XM, Vex, EXx }, PREFIX_DATA },
- { EVEX_LEN_TABLE (EVEX_LEN_0FD6) },
+ { VEX_W_TABLE (EVEX_W_0FD6) },
{ Bad_Opcode },
/* D8 */
{ "vpsubusb", { XM, Vex, EXx }, PREFIX_DATA },
{ Bad_Opcode },
{ Bad_Opcode },
{ Bad_Opcode },
- { EVEX_LEN_TABLE (EVEX_LEN_0F3A14) },
- { EVEX_LEN_TABLE (EVEX_LEN_0F3A15) },
- { EVEX_LEN_TABLE (EVEX_LEN_0F3A16) },
- { EVEX_LEN_TABLE (EVEX_LEN_0F3A17) },
+ { VEX_LEN_TABLE (VEX_LEN_0F3A14) },
+ { VEX_LEN_TABLE (VEX_LEN_0F3A15) },
+ { VEX_LEN_TABLE (VEX_LEN_0F3A16) },
+ { VEX_LEN_TABLE (VEX_LEN_0F3A17) },
/* 18 */
{ EVEX_LEN_TABLE (EVEX_LEN_0F3A18) },
{ EVEX_LEN_TABLE (EVEX_LEN_0F3A19) },
{ "vpcmpu%DQ", { XMask, Vex, EXx, VPCMP }, PREFIX_DATA },
{ "vpcmp%DQ", { XMask, Vex, EXx, VPCMP }, PREFIX_DATA },
/* 20 */
- { EVEX_LEN_TABLE (EVEX_LEN_0F3A20) },
+ { VEX_LEN_TABLE (VEX_LEN_0F3A20) },
{ VEX_W_TABLE (EVEX_W_0F3A21) },
- { EVEX_LEN_TABLE (EVEX_LEN_0F3A22) },
+ { VEX_LEN_TABLE (VEX_LEN_0F3A22) },
{ EVEX_LEN_TABLE (EVEX_LEN_0F3A23) },
{ Bad_Opcode },
{ "vpternlog%DQ", { XM, Vex, EXx, Ib }, PREFIX_DATA },
enum
{
- EVEX_LEN_0F6E = 0,
- EVEX_LEN_0F7E_P_1,
- EVEX_LEN_0F7E_P_2,
- EVEX_LEN_0FC4,
- EVEX_LEN_0FC5,
- EVEX_LEN_0FD6,
- EVEX_LEN_0F3816,
+ EVEX_LEN_0F3816 = 0,
EVEX_LEN_0F3819,
EVEX_LEN_0F381A_M_0,
EVEX_LEN_0F381B_M_0,
EVEX_LEN_0F38C7_M_0,
EVEX_LEN_0F3A00,
EVEX_LEN_0F3A01,
- EVEX_LEN_0F3A14,
- EVEX_LEN_0F3A15,
- EVEX_LEN_0F3A16,
- EVEX_LEN_0F3A17,
EVEX_LEN_0F3A18,
EVEX_LEN_0F3A19,
EVEX_LEN_0F3A1A,
EVEX_LEN_0F3A1B,
- EVEX_LEN_0F3A20,
- EVEX_LEN_0F3A21_W_0,
- EVEX_LEN_0F3A22,
EVEX_LEN_0F3A23,
EVEX_LEN_0F3A38,
EVEX_LEN_0F3A39,
EVEX_W_0FD2,
EVEX_W_0FD3,
EVEX_W_0FD4,
- EVEX_W_0FD6_L_0,
+ EVEX_W_0FD6,
EVEX_W_0FE6_P_1,
EVEX_W_0FE6_P_2,
EVEX_W_0FE6_P_3,
case 128:
vindex = 0;
break;
+ case 512:
+ /* This allows re-using in particular table entries where only
+ 128-bit operand size (VEX.L=0 / EVEX.L'L=0) are valid. */
+ if (vex.evex)
+ {
case 256:
- vindex = 1;
- break;
+ vindex = 1;
+ break;
+ }
+ /* Fall through. */
default:
abort ();
break;