From: Jan Beulich Date: Mon, 6 Jul 2020 11:43:34 +0000 (+0200) Subject: x86: most VBROADCAST{F,I}{32,64}x* only accept memory operands X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=bc152a17ff2f4a476df198d681d37e064f599fae;p=binutils-gdb.git x86: most VBROADCAST{F,I}{32,64}x* only accept memory operands VBROADCAST{F,I}32x2 are the only exceptions here. --- diff --git a/opcodes/ChangeLog b/opcodes/ChangeLog index edd60b91301..1ee200f0d2e 100644 --- a/opcodes/ChangeLog +++ b/opcodes/ChangeLog @@ -1,3 +1,29 @@ +2020-07-06 Jan Beulich + + * i386-dis.c (MOD_EVEX_0F381A_P_2_W_0, MOD_EVEX_0F381A_P_2_W_1, + MOD_EVEX_0F381B_P_2_W_0, MOD_EVEX_0F381B_P_2_W_1, + MOD_EVEX_0F385A_P_2_W_0, MOD_EVEX_0F385A_P_2_W_1, + MOD_EVEX_0F385B_P_2_W_0, MOD_EVEX_0F385B_P_2_W_1): New + enumerators. + (EVEX_LEN_0F381A_P_2_W_0, EVEX_LEN_0F381A_P_2_W_1, + EVEX_LEN_0F381B_P_2_W_0, EVEX_LEN_0F381B_P_2_W_1, + EVEX_LEN_0F385A_P_2_W_0, EVEX_LEN_0F385A_P_2_W_1, + EVEX_LEN_0F385B_P_2_W_0, EVEX_LEN_0F385B_P_2_W_1): Rename to ... + (EVEX_LEN_0F381A_P_2_W_0_M_0, EVEX_LEN_0F381A_P_2_W_1_M_0, + EVEX_LEN_0F381B_P_2_W_0_M_0, EVEX_LEN_0F381B_P_2_W_1_M_0, + EVEX_LEN_0F385A_P_2_W_0_M_0, EVEX_LEN_0F385A_P_2_W_1_M_0, + EVEX_LEN_0F385B_P_2_W_0_M_0, EVEX_LEN_0F385B_P_2_W_1_M_0): ... + these, respectively. + * i386-dis-evex-len.h: Adjust comments. + * i386-dis-evex-mod.h: New MOD_EVEX_0F381A_P_2_W_0, + MOD_EVEX_0F381A_P_2_W_1, MOD_EVEX_0F381B_P_2_W_0, + MOD_EVEX_0F381B_P_2_W_1, MOD_EVEX_0F385A_P_2_W_0, + MOD_EVEX_0F385A_P_2_W_1, MOD_EVEX_0F385B_P_2_W_0, and + MOD_EVEX_0F385B_P_2_W_1 table entries. + * i386-dis-evex-w.h: Reference mod_table[] for + EVEX_W_0F381A_P_2, EVEX_W_0F381B_P_2, EVEX_W_0F385A_P_2, and + EVEX_W_0F385B_P_2. + 2020-07-06 Jan Beulich * i386-dis-evex-len.h (vbroadcastf32x8, vbroadcasti32x8, diff --git a/opcodes/i386-dis-evex-len.h b/opcodes/i386-dis-evex-len.h index 278d7225c8a..f844ed05fac 100644 --- a/opcodes/i386-dis-evex-len.h +++ b/opcodes/i386-dis-evex-len.h @@ -50,28 +50,28 @@ static const struct dis386 evex_len_table[][3] = { { "vbroadcastsd", { XM, EXxmm_mq }, 0 }, }, - /* EVEX_LEN_0F381A_P_2_W_0 */ + /* EVEX_LEN_0F381A_P_2_W_0_M_0 */ { { Bad_Opcode }, { "vbroadcastf32x4", { XM, EXxmm }, 0 }, { "vbroadcastf32x4", { XM, EXxmm }, 0 }, }, - /* EVEX_LEN_0F381A_P_2_W_1 */ + /* EVEX_LEN_0F381A_P_2_W_1_M_0 */ { { Bad_Opcode }, { "vbroadcastf64x2", { XM, EXxmm }, 0 }, { "vbroadcastf64x2", { XM, EXxmm }, 0 }, }, - /* EVEX_LEN_0F381B_P_2_W_0 */ + /* EVEX_LEN_0F381B_P_2_W_0_M_0 */ { { Bad_Opcode }, { Bad_Opcode }, { "vbroadcastf32x8", { XM, EXymm }, 0 }, }, - /* EVEX_LEN_0F381B_P_2_W_1 */ + /* EVEX_LEN_0F381B_P_2_W_1_M_0 */ { { Bad_Opcode }, { Bad_Opcode }, @@ -85,28 +85,28 @@ static const struct dis386 evex_len_table[][3] = { { "vperm%LW", { XM, Vex, EXx }, 0 }, }, - /* EVEX_LEN_0F385A_P_2_W_0 */ + /* EVEX_LEN_0F385A_P_2_W_0_M_0 */ { { Bad_Opcode }, { "vbroadcasti32x4", { XM, EXxmm }, 0 }, { "vbroadcasti32x4", { XM, EXxmm }, 0 }, }, - /* EVEX_LEN_0F385A_P_2_W_1 */ + /* EVEX_LEN_0F385A_P_2_W_1_M_0 */ { { Bad_Opcode }, { "vbroadcasti64x2", { XM, EXxmm }, 0 }, { "vbroadcasti64x2", { XM, EXxmm }, 0 }, }, - /* EVEX_LEN_0F385B_P_2_W_0 */ + /* EVEX_LEN_0F385B_P_2_W_0_M_0 */ { { Bad_Opcode }, { Bad_Opcode }, { "vbroadcasti32x8", { XM, EXymm }, 0 }, }, - /* EVEX_LEN_0F385B_P_2_W_1 */ + /* EVEX_LEN_0F385B_P_2_W_1_M_0 */ { { Bad_Opcode }, { Bad_Opcode }, diff --git a/opcodes/i386-dis-evex-mod.h b/opcodes/i386-dis-evex-mod.h index 657e40a575b..0c81822c414 100644 --- a/opcodes/i386-dis-evex-mod.h +++ b/opcodes/i386-dis-evex-mod.h @@ -28,6 +28,38 @@ /* MOD_EVEX_0F2B */ { "vmovntpX", { EXx, XM }, PREFIX_OPCODE }, }, + /* MOD_EVEX_0F381A_P_2_W_0 */ + { + { EVEX_LEN_TABLE (EVEX_LEN_0F381A_P_2_W_0_M_0) }, + }, + /* MOD_EVEX_0F381A_P_2_W_1 */ + { + { EVEX_LEN_TABLE (EVEX_LEN_0F381A_P_2_W_1_M_0) }, + }, + /* MOD_EVEX_0F381B_P_2_W_0 */ + { + { EVEX_LEN_TABLE (EVEX_LEN_0F381B_P_2_W_0_M_0) }, + }, + /* MOD_EVEX_0F381B_P_2_W_1 */ + { + { EVEX_LEN_TABLE (EVEX_LEN_0F381B_P_2_W_1_M_0) }, + }, + /* MOD_EVEX_0F385A_P_2_W_0 */ + { + { EVEX_LEN_TABLE (EVEX_LEN_0F385A_P_2_W_0_M_0) }, + }, + /* MOD_EVEX_0F385A_P_2_W_1 */ + { + { EVEX_LEN_TABLE (EVEX_LEN_0F385A_P_2_W_1_M_0) }, + }, + /* MOD_EVEX_0F385B_P_2_W_0 */ + { + { EVEX_LEN_TABLE (EVEX_LEN_0F385B_P_2_W_0_M_0) }, + }, + /* MOD_EVEX_0F385B_P_2_W_1 */ + { + { EVEX_LEN_TABLE (EVEX_LEN_0F385B_P_2_W_1_M_0) }, + }, { /* MOD_EVEX_0F38C6_REG_1 */ { PREFIX_TABLE (PREFIX_EVEX_0F38C6_REG_1) }, diff --git a/opcodes/i386-dis-evex-w.h b/opcodes/i386-dis-evex-w.h index 86cb68e9234..1370c5cc4e7 100644 --- a/opcodes/i386-dis-evex-w.h +++ b/opcodes/i386-dis-evex-w.h @@ -397,13 +397,13 @@ }, /* EVEX_W_0F381A_P_2 */ { - { EVEX_LEN_TABLE (EVEX_LEN_0F381A_P_2_W_0) }, - { EVEX_LEN_TABLE (EVEX_LEN_0F381A_P_2_W_1) }, + { MOD_TABLE (MOD_EVEX_0F381A_P_2_W_0) }, + { MOD_TABLE (MOD_EVEX_0F381A_P_2_W_1) }, }, /* EVEX_W_0F381B_P_2 */ { - { EVEX_LEN_TABLE (EVEX_LEN_0F381B_P_2_W_0) }, - { EVEX_LEN_TABLE (EVEX_LEN_0F381B_P_2_W_1) }, + { MOD_TABLE (MOD_EVEX_0F381B_P_2_W_0) }, + { MOD_TABLE (MOD_EVEX_0F381B_P_2_W_1) }, }, /* EVEX_W_0F381E_P_2 */ { @@ -559,13 +559,13 @@ }, /* EVEX_W_0F385A_P_2 */ { - { EVEX_LEN_TABLE (EVEX_LEN_0F385A_P_2_W_0) }, - { EVEX_LEN_TABLE (EVEX_LEN_0F385A_P_2_W_1) }, + { MOD_TABLE (MOD_EVEX_0F385A_P_2_W_0) }, + { MOD_TABLE (MOD_EVEX_0F385A_P_2_W_1) }, }, /* EVEX_W_0F385B_P_2 */ { - { EVEX_LEN_TABLE (EVEX_LEN_0F385B_P_2_W_0) }, - { EVEX_LEN_TABLE (EVEX_LEN_0F385B_P_2_W_1) }, + { MOD_TABLE (MOD_EVEX_0F385B_P_2_W_0) }, + { MOD_TABLE (MOD_EVEX_0F385B_P_2_W_1) }, }, /* EVEX_W_0F3862_P_2 */ { diff --git a/opcodes/i386-dis.c b/opcodes/i386-dis.c index 55af1eb54dc..3133d8eee62 100644 --- a/opcodes/i386-dis.c +++ b/opcodes/i386-dis.c @@ -932,6 +932,14 @@ enum MOD_EVEX_0F16_PREFIX_2, MOD_EVEX_0F17, MOD_EVEX_0F2B, + MOD_EVEX_0F381A_P_2_W_0, + MOD_EVEX_0F381A_P_2_W_1, + MOD_EVEX_0F381B_P_2_W_0, + MOD_EVEX_0F381B_P_2_W_1, + MOD_EVEX_0F385A_P_2_W_0, + MOD_EVEX_0F385A_P_2_W_1, + MOD_EVEX_0F385B_P_2_W_0, + MOD_EVEX_0F385B_P_2_W_1, MOD_EVEX_0F38C6_REG_1, MOD_EVEX_0F38C6_REG_2, MOD_EVEX_0F38C6_REG_5, @@ -1821,15 +1829,15 @@ enum EVEX_LEN_0F3816_P_2, EVEX_LEN_0F3819_P_2_W_0, EVEX_LEN_0F3819_P_2_W_1, - EVEX_LEN_0F381A_P_2_W_0, - EVEX_LEN_0F381A_P_2_W_1, - EVEX_LEN_0F381B_P_2_W_0, - EVEX_LEN_0F381B_P_2_W_1, + EVEX_LEN_0F381A_P_2_W_0_M_0, + EVEX_LEN_0F381A_P_2_W_1_M_0, + EVEX_LEN_0F381B_P_2_W_0_M_0, + EVEX_LEN_0F381B_P_2_W_1_M_0, EVEX_LEN_0F3836_P_2, - EVEX_LEN_0F385A_P_2_W_0, - EVEX_LEN_0F385A_P_2_W_1, - EVEX_LEN_0F385B_P_2_W_0, - EVEX_LEN_0F385B_P_2_W_1, + EVEX_LEN_0F385A_P_2_W_0_M_0, + EVEX_LEN_0F385A_P_2_W_1_M_0, + EVEX_LEN_0F385B_P_2_W_0_M_0, + EVEX_LEN_0F385B_P_2_W_1_M_0, EVEX_LEN_0F38C6_REG_1_PREFIX_2, EVEX_LEN_0F38C6_REG_2_PREFIX_2, EVEX_LEN_0F38C6_REG_5_PREFIX_2,