[PATCH 6/9] x86: reuse VEX entries for EVEX vperm{q,pd}

Jan Beulich jbeulich@suse.com
Tue Mar 9 13:10:50 GMT 2021


By matching VEX decode order (L before W), some EVEX entries can refer
back to VEX ones instead of carrying duplicates.

opcodes/
2021-03-XX  Jan Beulich  <jbeulich@suse.com>

	* opcodes/i386-dis.c (EVEX_LEN_0F3A00_W_1, EVEX_LEN_0F3A01_W_1):
	Rename to EVEX_LEN_0F3A00 and EVEX_LEN_0F3A01 respectively.
	EVEX_W_0F3A00, EVEX_W_0F3A01): Delete.
	* i386-dis-evex.h (evex_table): Adjust opcode 0F3A00 and 0F3A01
	entries.
	* i386-dis-evex-len.h (evex_len_table): Likewise.
	* i386-dis-evex-w.h: Remove opcode 0F3A00 and 0F3A01 entries.

--- a/opcodes/i386-dis-evex-len.h
+++ b/opcodes/i386-dis-evex-len.h
@@ -92,18 +92,18 @@ static const struct dis386 evex_len_tabl
     { VEX_W_TABLE (EVEX_W_0F38C7_M_0_L_2) },
   },
 
-  /* EVEX_LEN_0F3A00_W_1 */
+  /* EVEX_LEN_0F3A00 */
   {
     { Bad_Opcode },
-    { "vpermq",	{ XM, EXx, Ib }, PREFIX_DATA },
-    { "vpermq",	{ XM, EXx, Ib }, PREFIX_DATA },
+    { VEX_W_TABLE (VEX_W_0F3A00_L_1) },
+    { VEX_W_TABLE (VEX_W_0F3A00_L_1) },
   },
 
-  /* EVEX_LEN_0F3A01_W_1 */
+  /* EVEX_LEN_0F3A01 */
   {
     { Bad_Opcode },
-    { "vpermpd",	{ XM, EXx, Ib }, PREFIX_DATA },
-    { "vpermpd",	{ XM, EXx, Ib }, PREFIX_DATA },
+    { VEX_W_TABLE (VEX_W_0F3A01_L_1) },
+    { VEX_W_TABLE (VEX_W_0F3A01_L_1) },
   },
 
   /* EVEX_LEN_0F3A14 */
--- a/opcodes/i386-dis-evex-w.h
+++ b/opcodes/i386-dis-evex-w.h
@@ -580,16 +580,6 @@
     { REG_TABLE (REG_EVEX_0F38C7_M_0_L_2_W_0) },
     { REG_TABLE (REG_EVEX_0F38C7_M_0_L_2_W_1) },
   },
-  /* EVEX_W_0F3A00 */
-  {
-    { Bad_Opcode },
-    { EVEX_LEN_TABLE (EVEX_LEN_0F3A00_W_1) },
-  },
-  /* EVEX_W_0F3A01 */
-  {
-    { Bad_Opcode },
-    { EVEX_LEN_TABLE (EVEX_LEN_0F3A01_W_1) },
-  },
   /* EVEX_W_0F3A05 */
   {
     { Bad_Opcode },
--- a/opcodes/i386-dis-evex.h
+++ b/opcodes/i386-dis-evex.h
@@ -584,8 +584,8 @@ static const struct dis386 evex_table[][
   /* EVEX_0F3A */
   {
     /* 00 */
-    { VEX_W_TABLE (EVEX_W_0F3A00) },
-    { VEX_W_TABLE (EVEX_W_0F3A01) },
+    { EVEX_LEN_TABLE (EVEX_LEN_0F3A00) },
+    { EVEX_LEN_TABLE (EVEX_LEN_0F3A01) },
     { Bad_Opcode },
     { "valign%DQ",	{ XM, Vex, EXx, Ib }, PREFIX_DATA },
     { VEX_W_TABLE (VEX_W_0F3A04) },
--- a/opcodes/i386-dis.c
+++ b/opcodes/i386-dis.c
@@ -1349,8 +1349,8 @@ enum
   EVEX_LEN_0F385B_M_0,
   EVEX_LEN_0F38C6_M_0,
   EVEX_LEN_0F38C7_M_0,
-  EVEX_LEN_0F3A00_W_1,
-  EVEX_LEN_0F3A01_W_1,
+  EVEX_LEN_0F3A00,
+  EVEX_LEN_0F3A01,
   EVEX_LEN_0F3A14,
   EVEX_LEN_0F3A15,
   EVEX_LEN_0F3A16,
@@ -1614,8 +1614,6 @@ enum
   EVEX_W_0F38A3,
   EVEX_W_0F38C7_M_0_L_2,
 
-  EVEX_W_0F3A00,
-  EVEX_W_0F3A01,
   EVEX_W_0F3A05,
   EVEX_W_0F3A08,
   EVEX_W_0F3A09,



More information about the Binutils mailing list