From: Jan Beulich Date: Tue, 5 Nov 2019 08:19:10 +0000 (+0100) Subject: x86: split MONITORX/MWAITX entries X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=267b8516f2899ed24cd77cb9233b514c22506ecf;p=binutils-gdb.git x86: split MONITORX/MWAITX entries Both encodings do not ignore the 66/F3/F2 prefixes, so don't have the disassembler ignore them either. --- diff --git a/opcodes/ChangeLog b/opcodes/ChangeLog index 14a14074817..4f27092152b 100644 --- a/opcodes/ChangeLog +++ b/opcodes/ChangeLog @@ -1,3 +1,10 @@ +2019-11-05 Jan Beulich + + * 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. + 2019-11-05 Jan Beulich * i386-dis.c (REG_0F1C_MOD_0): Rename to ... diff --git a/opcodes/i386-dis.c b/opcodes/i386-dis.c index d1d8b55af3e..11a9e33fbe7 100644 --- 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[][4] = { { "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 }, }, {