From: Jan Beulich Date: Mon, 6 Jul 2020 11:40:40 +0000 (+0200) Subject: x86: honor VEX.W for VCVT{PH2PS,PS2PH} X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=6431c8015b1d8a75facbd2d0ec6a4f1e98167f72;p=binutils-gdb.git x86: honor VEX.W for VCVT{PH2PS,PS2PH} Unlike for the EVEX-encoded versions, the VEX ones failed to decode VEX.W. Once the necessary adjustments are done, it becomes obvious that the EVEX and VEX table entries for VCVTPS2PH are identical and can hence be folded. --- diff --git a/opcodes/ChangeLog b/opcodes/ChangeLog index f5463b0b58f..296ef264a2c 100644 --- a/opcodes/ChangeLog +++ b/opcodes/ChangeLog @@ -1,3 +1,17 @@ +2020-07-06 Jan Beulich + + * i386-dis.c (PREFIX_EVEX_0F3A1D, EVEX_W_0F3A1D_P_2): Delete. + (VEX_W_0F3813_P_2, VEX_W_0F3A1D_P_2): New enumerators. + (prefix_table): Reference VEX_W_0F3813_P_2 and VEX_W_0F3A1D_P_2 + respectively. + (vex_w_table): New VEX_W_0F3813_P_2 and VEX_W_0F3A1D_P_2 table + entries. + * i386-dis-evex.h (evex_table): Reference VEX table entry for + opcode 0F3A1D. + * i386-dis-evex-prefix.h (PREFIX_EVEX_0F3A1D): Delete table + entry. + * i386-dis-evex-w.h (EVEX_W_0F3A1D_P_2): Likewise. + 2020-07-06 Jan Beulich * i386-dis.c (PREFIX_EVEX_0F60, PREFIX_EVEX_0F61, diff --git a/opcodes/i386-dis-evex-prefix.h b/opcodes/i386-dis-evex-prefix.h index 413fd9724ec..01998c58232 100644 --- a/opcodes/i386-dis-evex-prefix.h +++ b/opcodes/i386-dis-evex-prefix.h @@ -1235,12 +1235,6 @@ { Bad_Opcode }, { VEX_W_TABLE (EVEX_W_0F3A1B_P_2) }, }, - /* PREFIX_EVEX_0F3A1D */ - { - { Bad_Opcode }, - { Bad_Opcode }, - { VEX_W_TABLE (EVEX_W_0F3A1D_P_2) }, - }, /* PREFIX_EVEX_0F3A1E */ { { Bad_Opcode }, diff --git a/opcodes/i386-dis-evex-w.h b/opcodes/i386-dis-evex-w.h index dd3caad33c0..ed7968a5460 100644 --- a/opcodes/i386-dis-evex-w.h +++ b/opcodes/i386-dis-evex-w.h @@ -738,10 +738,6 @@ { EVEX_LEN_TABLE (EVEX_LEN_0F3A1B_P_2_W_0) }, { EVEX_LEN_TABLE (EVEX_LEN_0F3A1B_P_2_W_1) }, }, - /* EVEX_W_0F3A1D_P_2 */ - { - { "vcvtps2ph", { EXxmmq, XM, EXxEVexS, Ib }, 0 }, - }, /* EVEX_W_0F3A21_P_2 */ { { "vinsertps", { XMM, Vex, EXxmm_md, Ib }, 0 }, diff --git a/opcodes/i386-dis-evex.h b/opcodes/i386-dis-evex.h index 249812b8304..667d39d43f2 100644 --- a/opcodes/i386-dis-evex.h +++ b/opcodes/i386-dis-evex.h @@ -616,7 +616,7 @@ static const struct dis386 evex_table[][256] = { { PREFIX_TABLE (PREFIX_EVEX_0F3A1A) }, { PREFIX_TABLE (PREFIX_EVEX_0F3A1B) }, { Bad_Opcode }, - { PREFIX_TABLE (PREFIX_EVEX_0F3A1D) }, + { PREFIX_TABLE (PREFIX_VEX_0F3A1D) }, { PREFIX_TABLE (PREFIX_EVEX_0F3A1E) }, { PREFIX_TABLE (PREFIX_EVEX_0F3A1F) }, /* 20 */ diff --git a/opcodes/i386-dis.c b/opcodes/i386-dis.c index 62f42815d8d..7f521b2766f 100644 --- a/opcodes/i386-dis.c +++ b/opcodes/i386-dis.c @@ -1615,7 +1615,6 @@ enum PREFIX_EVEX_0F3A19, PREFIX_EVEX_0F3A1A, PREFIX_EVEX_0F3A1B, - PREFIX_EVEX_0F3A1D, PREFIX_EVEX_0F3A1E, PREFIX_EVEX_0F3A1F, PREFIX_EVEX_0F3A20, @@ -1910,6 +1909,7 @@ enum VEX_W_0F380D_P_2, VEX_W_0F380E_P_2, VEX_W_0F380F_P_2, + VEX_W_0F3813_P_2, VEX_W_0F3816_P_2, VEX_W_0F3818_P_2, VEX_W_0F3819_P_2, @@ -1934,6 +1934,7 @@ enum VEX_W_0F3A06_P_2, VEX_W_0F3A18_P_2, VEX_W_0F3A19_P_2, + VEX_W_0F3A1D_P_2, VEX_W_0F3A30_P_2_LEN_0, VEX_W_0F3A31_P_2_LEN_0, VEX_W_0F3A32_P_2_LEN_0, @@ -2110,7 +2111,6 @@ enum EVEX_W_0F3A19_P_2, EVEX_W_0F3A1A_P_2, EVEX_W_0F3A1B_P_2, - EVEX_W_0F3A1D_P_2, EVEX_W_0F3A21_P_2, EVEX_W_0F3A23_P_2, EVEX_W_0F3A38_P_2, @@ -5504,7 +5504,7 @@ static const struct dis386 prefix_table[][4] = { { { Bad_Opcode }, { Bad_Opcode }, - { "vcvtph2ps", { XM, EXxmmq }, 0 }, + { VEX_W_TABLE (VEX_W_0F3813_P_2) }, }, /* PREFIX_VEX_0F3816 */ @@ -6326,7 +6326,7 @@ static const struct dis386 prefix_table[][4] = { { { Bad_Opcode }, { Bad_Opcode }, - { "vcvtps2ph", { EXxmmq, XM, Ib }, 0 }, + { VEX_W_TABLE (VEX_W_0F3A1D_P_2) }, }, /* PREFIX_VEX_0F3A20 */ @@ -9902,6 +9902,10 @@ static const struct dis386 vex_w_table[][2] = { /* VEX_W_0F380F_P_2 */ { "vtestpd", { XM, EXx }, 0 }, }, + { + /* VEX_W_0F3813_P_2 */ + { "vcvtph2ps", { XM, EXxmmq }, 0 }, + }, { /* VEX_W_0F3816_P_2 */ { "vpermps", { XM, Vex, EXx }, 0 }, @@ -10000,6 +10004,10 @@ static const struct dis386 vex_w_table[][2] = { /* VEX_W_0F3A19_P_2 */ { "vextractf128", { EXxmm, XM, Ib }, 0 }, }, + { + /* VEX_W_0F3A1D_P_2 */ + { "vcvtps2ph", { EXxmmq, XM, EXxEVexS, Ib }, 0 }, + }, { /* VEX_W_0F3A30_P_2_LEN_0 */ { MOD_TABLE (MOD_VEX_W_0_0F3A30_P_2_LEN_0) },