This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
[PATCH] x86: remove ModRM.mod decoding layer from AVX512F VMOVS{S,D}
- From: "Jan Beulich" <JBeulich at suse dot com>
- To: <binutils at sourceware dot org>
- Cc: "H.J. Lu" <hjl dot tools at gmail dot com>
- Date: Tue, 25 Jun 2019 08:45:24 -0600
- Subject: [PATCH] x86: remove ModRM.mod decoding layer from AVX512F VMOVS{S,D}
Just like their AVX counterparts they can utilize XMVexScalar /
EXdVexScalarS / EXqVexScalarS taking care of dropping the middle operand
for their memory forms.
opcodes/
2019-06-25 Jan Beulich <jbeulich@suse.com>
* i386-dis.c (EXdScalarS, MOD_EVEX_0F10_PREFIX_1,
MOD_EVEX_0F10_PREFIX_3, MOD_EVEX_0F11_PREFIX_1,
MOD_EVEX_0F11_PREFIX_3, EVEX_W_0F10_P_1_M_0,
EVEX_W_0F10_P_1_M_1, EVEX_W_0F10_P_3_M_0, EVEX_W_0F10_P_3_M_1,
EVEX_W_0F11_P_1_M_0, EVEX_W_0F11_P_1_M_1, EVEX_W_0F11_P_3_M_0,
EVEX_W_0F11_P_3_M_1): Delete.
(EVEX_W_0F10_P_1, EVEX_W_0F10_P_3, EVEX_W_0F11_P_1,
EVEX_W_0F11_P_3): New.
* i386-dis-evex-mod.h: Remove MOD_EVEX_0F10_PREFIX_1,
MOD_EVEX_0F10_PREFIX_3, MOD_EVEX_0F11_PREFIX_1, and
MOD_EVEX_0F11_PREFIX_3 table entries.
* i386-dis-evex-prefix.h: Adjust PREFIX_EVEX_0F10 and
PREFIX_EVEX_0F11 table entries.
* i386-dis-evex-w.h: Replace EVEX_W_0F10_P_1_M_{0,1},
EVEX_W_0F10_P_3_M_{0,1}, EVEX_W_0F11_P_1_M_{0,1}, and
EVEX_W_0F11_P_3_M_{0,1} table entries.
--- a/opcodes/i386-dis-evex-mod.h
+++ b/opcodes/i386-dis-evex-mod.h
@@ -1,24 +1,4 @@
{
- /* MOD_EVEX_0F10_PREFIX_1 */
- { VEX_W_TABLE (EVEX_W_0F10_P_1_M_0) },
- { VEX_W_TABLE (EVEX_W_0F10_P_1_M_1) },
- },
- {
- /* MOD_EVEX_0F10_PREFIX_3 */
- { VEX_W_TABLE (EVEX_W_0F10_P_3_M_0) },
- { VEX_W_TABLE (EVEX_W_0F10_P_3_M_1) },
- },
- {
- /* MOD_EVEX_0F11_PREFIX_1 */
- { VEX_W_TABLE (EVEX_W_0F11_P_1_M_0) },
- { VEX_W_TABLE (EVEX_W_0F11_P_1_M_1) },
- },
- {
- /* MOD_EVEX_0F11_PREFIX_3 */
- { VEX_W_TABLE (EVEX_W_0F11_P_3_M_0) },
- { VEX_W_TABLE (EVEX_W_0F11_P_3_M_1) },
- },
- {
/* MOD_EVEX_0F12_PREFIX_0 */
{ VEX_W_TABLE (EVEX_W_0F12_P_0_M_0) },
{ VEX_W_TABLE (EVEX_W_0F12_P_0_M_1) },
--- a/opcodes/i386-dis-evex-prefix.h
+++ b/opcodes/i386-dis-evex-prefix.h
@@ -1,16 +1,16 @@
/* PREFIX_EVEX_0F10 */
{
{ VEX_W_TABLE (EVEX_W_0F10_P_0) },
- { MOD_TABLE (MOD_EVEX_0F10_PREFIX_1) },
+ { VEX_W_TABLE (EVEX_W_0F10_P_1) },
{ VEX_W_TABLE (EVEX_W_0F10_P_2) },
- { MOD_TABLE (MOD_EVEX_0F10_PREFIX_3) },
+ { VEX_W_TABLE (EVEX_W_0F10_P_3) },
},
/* PREFIX_EVEX_0F11 */
{
{ VEX_W_TABLE (EVEX_W_0F11_P_0) },
- { MOD_TABLE (MOD_EVEX_0F11_PREFIX_1) },
+ { VEX_W_TABLE (EVEX_W_0F11_P_1) },
{ VEX_W_TABLE (EVEX_W_0F11_P_2) },
- { MOD_TABLE (MOD_EVEX_0F11_PREFIX_3) },
+ { VEX_W_TABLE (EVEX_W_0F11_P_3) },
},
/* PREFIX_EVEX_0F12 */
{
--- a/opcodes/i386-dis-evex-w.h
+++ b/opcodes/i386-dis-evex-w.h
@@ -2,55 +2,37 @@
{
{ "vmovups", { XM, EXEvexXNoBcst }, 0 },
},
- /* EVEX_W_0F10_P_1_M_0 */
+ /* EVEX_W_0F10_P_1 */
{
- { "vmovss", { XMScalar, EXdScalar }, 0 },
- },
- /* EVEX_W_0F10_P_1_M_1 */
- {
- { "vmovss", { XMScalar, VexScalar, EXxmm_md }, 0 },
+ { "vmovss", { XMVexScalar, VexScalar, EXdScalar }, 0 },
},
/* EVEX_W_0F10_P_2 */
{
{ Bad_Opcode },
{ "vmovupd", { XM, EXEvexXNoBcst }, 0 },
},
- /* EVEX_W_0F10_P_3_M_0 */
- {
- { Bad_Opcode },
- { "vmovsd", { XMScalar, EXqScalar }, 0 },
- },
- /* EVEX_W_0F10_P_3_M_1 */
+ /* EVEX_W_0F10_P_3 */
{
{ Bad_Opcode },
- { "vmovsd", { XMScalar, VexScalar, EXxmm_mq }, 0 },
+ { "vmovsd", { XMVexScalar, VexScalar, EXqScalar }, 0 },
},
/* EVEX_W_0F11_P_0 */
{
{ "vmovups", { EXxS, XM }, 0 },
},
- /* EVEX_W_0F11_P_1_M_0 */
+ /* EVEX_W_0F11_P_1 */
{
- { "vmovss", { EXdScalarS, XMScalar }, 0 },
- },
- /* EVEX_W_0F11_P_1_M_1 */
- {
- { "vmovss", { EXxS, Vex, XMScalar }, 0 },
+ { "vmovss", { EXdVexScalarS, VexScalar, XMScalar }, 0 },
},
/* EVEX_W_0F11_P_2 */
{
{ Bad_Opcode },
{ "vmovupd", { EXxS, XM }, 0 },
},
- /* EVEX_W_0F11_P_3_M_0 */
- {
- { Bad_Opcode },
- { "vmovsd", { EXqScalarS, XMScalar }, 0 },
- },
- /* EVEX_W_0F11_P_3_M_1 */
+ /* EVEX_W_0F11_P_3 */
{
{ Bad_Opcode },
- { "vmovsd", { EXxS, Vex, XMScalar }, 0 },
+ { "vmovsd", { EXqVexScalarS, VexScalar, XMScalar }, 0 },
},
/* EVEX_W_0F12_P_0_M_0 */
{
--- a/opcodes/i386-dis.c
+++ b/opcodes/i386-dis.c
@@ -385,7 +385,6 @@ fetch_data (struct disassemble_info *inf
#define EXd { OP_EX, d_mode }
#define EXdScalar { OP_EX, d_scalar_mode }
#define EXdS { OP_EX, d_swap_mode }
-#define EXdScalarS { OP_EX, d_scalar_swap_mode }
#define EXq { OP_EX, q_mode }
#define EXqScalar { OP_EX, q_scalar_mode }
#define EXqScalarS { OP_EX, q_scalar_swap_mode }
@@ -932,10 +931,6 @@ enum
MOD_VEX_W_0_0F3A33_P_2_LEN_0,
MOD_VEX_W_1_0F3A33_P_2_LEN_0,
- MOD_EVEX_0F10_PREFIX_1,
- MOD_EVEX_0F10_PREFIX_3,
- MOD_EVEX_0F11_PREFIX_1,
- MOD_EVEX_0F11_PREFIX_3,
MOD_EVEX_0F12_PREFIX_0,
MOD_EVEX_0F16_PREFIX_0,
MOD_EVEX_0F38C6_REG_1,
@@ -2030,17 +2025,13 @@ enum
VEX_W_0F3ACF_P_2,
EVEX_W_0F10_P_0,
- EVEX_W_0F10_P_1_M_0,
- EVEX_W_0F10_P_1_M_1,
+ EVEX_W_0F10_P_1,
EVEX_W_0F10_P_2,
- EVEX_W_0F10_P_3_M_0,
- EVEX_W_0F10_P_3_M_1,
+ EVEX_W_0F10_P_3,
EVEX_W_0F11_P_0,
- EVEX_W_0F11_P_1_M_0,
- EVEX_W_0F11_P_1_M_1,
+ EVEX_W_0F11_P_1,
EVEX_W_0F11_P_2,
- EVEX_W_0F11_P_3_M_0,
- EVEX_W_0F11_P_3_M_1,
+ EVEX_W_0F11_P_3,
EVEX_W_0F12_P_0_M_0,
EVEX_W_0F12_P_0_M_1,
EVEX_W_0F12_P_1,