[13/19] x86: drop further EVEX table entries that can be served by VEX ones

Message ID ad82c54e-00b0-5410-323d-8e25786ac530@suse.com
State New
Headers show
Series
  • x86: further disassembler fixes and folding
Related show

Commit Message

Jan Beulich July 13, 2020, 9:40 a.m.
A few cases were missed by 6df22cf64c93 ("x86: drop EVEX table entries
that can be served by VEX ones").

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

	* i386-dis.c (PREFIX_EVEX_0F2C, PREFIX_EVEX_0F2D,
	PREFIX_EVEX_0F2E, PREFIX_EVEX_0F2F): Delete.
	(prefix_table): Add EXxEVexS operand to vcvttss2si, vcvttsd2si,
	vcvtss2si, vcvtsd2si, vucomiss, and vucomisd table entries.
	Retain X macro and PREFIX_OPCODE use from tjhe EVEX table for
	the latter two.
	* i386-dis-evex.h (evex_table): Reference VEX table for opcodes
	0F2C, 0F2D, 0F2E, and 0F2F.
	* i386-dis-evex-prefix.h: Delete opcode 0F2C, 0F2D, 0F2E, and
	0F2F table entries.

Patch

--- a/opcodes/i386-dis-evex-prefix.h
+++ b/opcodes/i386-dis-evex-prefix.h
@@ -32,32 +32,6 @@ 
     { Bad_Opcode },
     { VEX_W_TABLE (EVEX_W_0F2A_P_3) },
   },
-  /* PREFIX_EVEX_0F2C */
-  {
-    { Bad_Opcode },
-    { "vcvttss2si",	{ Gdq, EXxmm_md, EXxEVexS }, 0 },
-    { Bad_Opcode },
-    { "vcvttsd2si",	{ Gdq, EXxmm_mq, EXxEVexS }, 0 },
-  },
-  /* PREFIX_EVEX_0F2D */
-  {
-    { Bad_Opcode },
-    { "vcvtss2si",	{ Gdq, EXxmm_md, EXxEVexR }, 0 },
-    { Bad_Opcode },
-    { "vcvtsd2si",	{ Gdq, EXxmm_mq, EXxEVexR }, 0 },
-  },
-  /* PREFIX_EVEX_0F2E */
-  {
-    { "vucomisX",	{ XMScalar, EXxmm_md, EXxEVexS }, PREFIX_OPCODE },
-    { Bad_Opcode },
-    { "vucomisX",	{ XMScalar, EXxmm_mq, EXxEVexS }, PREFIX_OPCODE },
-  },
-  /* PREFIX_EVEX_0F2F */
-  {
-    { "vcomisX",	{ XMScalar, EXxmm_md, EXxEVexS }, PREFIX_OPCODE },
-    { Bad_Opcode },
-    { "vcomisX",	{ XMScalar, EXxmm_mq, EXxEVexS }, PREFIX_OPCODE },
-  },
   /* PREFIX_EVEX_0F51 */
   {
     { "vsqrtpX",	{ XM, EXx, EXxEVexR }, PREFIX_OPCODE },
--- a/opcodes/i386-dis-evex.h
+++ b/opcodes/i386-dis-evex.h
@@ -51,10 +51,10 @@  static const struct dis386 evex_table[][
     { "vmovapX",	{ EXxS, XM }, PREFIX_OPCODE },
     { PREFIX_TABLE (PREFIX_EVEX_0F2A) },
     { MOD_TABLE (MOD_EVEX_0F2B) },
-    { PREFIX_TABLE (PREFIX_EVEX_0F2C) },
-    { PREFIX_TABLE (PREFIX_EVEX_0F2D) },
-    { PREFIX_TABLE (PREFIX_EVEX_0F2E) },
-    { PREFIX_TABLE (PREFIX_EVEX_0F2F) },
+    { PREFIX_TABLE (PREFIX_VEX_0F2C) },
+    { PREFIX_TABLE (PREFIX_VEX_0F2D) },
+    { PREFIX_TABLE (PREFIX_VEX_0F2E) },
+    { PREFIX_TABLE (PREFIX_VEX_0F2F) },
     /* 30 */
     { Bad_Opcode },
     { Bad_Opcode },
--- a/opcodes/i386-dis.c
+++ b/opcodes/i386-dis.c
@@ -1411,10 +1411,6 @@  enum
   PREFIX_EVEX_0F12,
   PREFIX_EVEX_0F16,
   PREFIX_EVEX_0F2A,
-  PREFIX_EVEX_0F2C,
-  PREFIX_EVEX_0F2D,
-  PREFIX_EVEX_0F2E,
-  PREFIX_EVEX_0F2F,
   PREFIX_EVEX_0F51,
   PREFIX_EVEX_0F58,
   PREFIX_EVEX_0F59,
@@ -4664,31 +4660,31 @@  static const struct dis386 prefix_table[
   /* PREFIX_VEX_0F2C */
   {
     { Bad_Opcode },
-    { "vcvttss2si",	{ Gdq, EXxmm_md }, 0 },
+    { "vcvttss2si",	{ Gdq, EXxmm_md, EXxEVexS }, 0 },
     { Bad_Opcode },
-    { "vcvttsd2si",	{ Gdq, EXxmm_mq }, 0 },
+    { "vcvttsd2si",	{ Gdq, EXxmm_mq, EXxEVexS }, 0 },
   },
 
   /* PREFIX_VEX_0F2D */
   {
     { Bad_Opcode },
-    { "vcvtss2si",	{ Gdq, EXxmm_md }, 0 },
+    { "vcvtss2si",	{ Gdq, EXxmm_md, EXxEVexR }, 0 },
     { Bad_Opcode },
-    { "vcvtsd2si",	{ Gdq, EXxmm_mq }, 0 },
+    { "vcvtsd2si",	{ Gdq, EXxmm_mq, EXxEVexR }, 0 },
   },
 
   /* PREFIX_VEX_0F2E */
   {
-    { "vucomiss",	{ XMScalar, EXxmm_md }, 0 },
+    { "vucomisX",	{ XMScalar, EXxmm_md, EXxEVexS }, PREFIX_OPCODE },
     { Bad_Opcode },
-    { "vucomisd",	{ XMScalar, EXxmm_mq }, 0 },
+    { "vucomisX",	{ XMScalar, EXxmm_mq, EXxEVexS }, PREFIX_OPCODE },
   },
 
   /* PREFIX_VEX_0F2F */
   {
-    { "vcomiss",	{ XMScalar, EXxmm_md }, 0 },
+    { "vcomisX",	{ XMScalar, EXxmm_md, EXxEVexS }, PREFIX_OPCODE },
     { Bad_Opcode },
-    { "vcomisd",	{ XMScalar, EXxmm_mq }, 0 },
+    { "vcomisX",	{ XMScalar, EXxmm_mq, EXxEVexS }, PREFIX_OPCODE },
   },
 
   /* PREFIX_VEX_0F41 */