[09/11] x86: most VBROADCAST{F,I}{32,64}x* only accept memory operands

Message ID 5dd4b9a1-cded-ee50-0e86-3d6f3a60bfae@suse.com
State New
Headers show
Series
  • x86: disassembler size reduction and fixes
Related show

Commit Message

Jan Beulich July 3, 2020, 1:56 p.m.
VBROADCAST{F,I}32x2 are the only exceptions here.

opcodes/
2020-07-XX  Jan Beulich  <jbeulich@suse.com>

	* i386-dis.c (): .
	* i386-dis-evex.h (): .
	* i386-dis-evex-prefix.h (): .
	* i386-dis-evex-w.h (): .

Patch

--- a/opcodes/i386-dis-evex-len.h
+++ b/opcodes/i386-dis-evex-len.h
@@ -50,28 +50,28 @@  static const struct dis386 evex_len_tabl
     { "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_tabl
     { "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 },
--- 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) },
--- 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 */
   {
--- 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,