[2/5] x86: split MONITORX/MWAITX entries

Message ID bc2572a4-d449-ef6d-a276-909e3feca199@suse.com
State New
Headers show
Series
  • x86: support further AMD Zen2 instructions
Related show

Commit Message

Jan Beulich Nov. 4, 2019, 3:04 p.m.
Both encodings do not ignore the 66/F3/F2 prefixes, so don't have the
disassembler ignore them either.

opcodes/
2019-11-XX  Jan Beulich  <jbeulich@suse.com>

	* i386-dis.c (PREFIX_0F01_REG_7_MOD_3_RM_2,
	PREFIX_0F01_REG_7_MOD_3_RM_3): New.
	(prefix_table): Add respective entries.
	(rm_table): Link to those entries.

Patch

--- a/opcodes/i386-dis.c
+++ b/opcodes/i386-dis.c
@@ -964,6 +964,8 @@  enum
   PREFIX_0F01_REG_5_MOD_0,
   PREFIX_0F01_REG_5_MOD_3_RM_0,
   PREFIX_0F01_REG_5_MOD_3_RM_2,
+  PREFIX_0F01_REG_7_MOD_3_RM_2,
+  PREFIX_0F01_REG_7_MOD_3_RM_3,
   PREFIX_0F09,
   PREFIX_0F10,
   PREFIX_0F11,
@@ -3643,6 +3645,16 @@  static const struct dis386 prefix_table[
     { "saveprevssp",	{ Skip_MODRM }, PREFIX_OPCODE },
   },
 
+  /* PREFIX_0F01_REG_7_MOD_3_RM_2 */
+  {
+    { "monitorx",	{ { OP_Monitor, 0 } }, 0  },
+  },
+
+  /* PREFIX_0F01_REG_7_MOD_3_RM_3 */
+  {
+    { "mwaitx",		{ { OP_Mwaitx,  0 } }, 0  },
+  },
+
   /* PREFIX_0F09 */
   {
     { "wbinvd",   { XX }, 0 },
@@ -11016,8 +11028,8 @@  static const struct dis386 rm_table[][8]
     /* RM_0F01_REG_7_MOD_3 */
     { "swapgs",		{ Skip_MODRM }, 0  },
     { "rdtscp",		{ Skip_MODRM }, 0  },
-    { "monitorx",	{ { OP_Monitor, 0 } }, 0  },
-    { "mwaitx",		{ { OP_Mwaitx,  0 } }, 0  },
+    { PREFIX_TABLE (PREFIX_0F01_REG_7_MOD_3_RM_2) },
+    { PREFIX_TABLE (PREFIX_0F01_REG_7_MOD_3_RM_3) },
     { "clzero",		{ Skip_MODRM }, 0  },
   },
   {