]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
Remove %ME and used %NE for movbe.
authorCui, Lili <lili.cui@intel.com>
Tue, 18 Jun 2024 02:46:31 +0000 (10:46 +0800)
committerCui, Lili <lili.cui@intel.com>
Tue, 18 Jun 2024 02:52:41 +0000 (10:52 +0800)
%ME is added specifically for movbe. Now with %NE, we can use
MOD table + %NE to indicate whether a {evex} prefix is needed.

opcodes/ChangeLog:

        * i386-dis-evex-mod.h: Added movbe.
        * i386-dis-evex.h: Let movbe go through the mod table.
        * i386-dis.c (struct dis386): Removed %ME.
        (putop): Removed case ME.

opcodes/i386-dis-evex-mod.h
opcodes/i386-dis-evex.h
opcodes/i386-dis.c

index 879c91f3b76dd59a41607c7d42f5f31a2d2334d0..bba32658ecf147e62a203cfd258e164d988bbf31 100644 (file)
@@ -1,3 +1,13 @@
+  /* MOD_EVEX_MAP4_60 */
+  {
+    { "movbeS",                { Gv, Mv }, PREFIX_NP_OR_DATA },
+    { "%NEmovbeS",     { Gv, Ev }, PREFIX_NP_OR_DATA },
+  },
+  /* MOD_EVEX_MAP4_61 */
+  {
+    { "movbeS",                { Mv, Gv }, PREFIX_NP_OR_DATA },
+    { "%NEmovbeS",     { Ev, Gv }, PREFIX_NP_OR_DATA },
+  },
   /* MOD_EVEX_MAP4_F8_P1 */
   {
     { "enqcmds",       { Gva, M }, 0 },
index 77c2ee772d11d9508b959c6616794575d4e0bd6c..0f63b5f701dbe4a269d414f37e6a013ff7c88421 100644 (file)
@@ -983,8 +983,8 @@ static const struct dis386 evex_table[][256] = {
     { Bad_Opcode },
     { Bad_Opcode },
     /* 60 */
-    { "%MEmovbeS",     { Gv, Ev }, PREFIX_NP_OR_DATA },
-    { "%MEmovbeS",     { Ev, Gv }, PREFIX_NP_OR_DATA },
+    { MOD_TABLE (MOD_EVEX_MAP4_60) },
+    { MOD_TABLE (MOD_EVEX_MAP4_61) },
     { Bad_Opcode },
     { Bad_Opcode },
     { Bad_Opcode },
index 86745a1b933cb262857d86f9ae4f717adf38b318..3a1afcc2fcee6ff18edc3f8dcd6c0bbf5d95ac7e 100644 (file)
@@ -960,6 +960,8 @@ enum
 
   MOD_VEX_0F3849_X86_64_L_0_W_0,
 
+  MOD_EVEX_MAP4_60,
+  MOD_EVEX_MAP4_61,
   MOD_EVEX_MAP4_F8_P_1,
   MOD_EVEX_MAP4_F8_P_3,
 };
@@ -1800,9 +1802,6 @@ struct dis386 {
    "XV" => print "{vex} " pseudo prefix
    "XE" => print "{evex} " pseudo prefix if no EVEX-specific functionality is
           is used by an EVEX-encoded (AVX512VL) instruction.
-   "ME" => print "{evex} " pseudo prefix for ins->modrm.mod != 3,if no
-          EVEX-specific functionality is used by an EVEX-encoded (AVX512VL)
-          instruction.
    "NF" => print "{nf} " pseudo prefix when EVEX.NF = 1 and print "{evex} "
           pseudo prefix when instructions without NF, EGPR and VVVV,
    "NE" => don't print "{evex} " pseudo prefix for some special instructions
@@ -10527,11 +10526,6 @@ putop (instr_info *ins, const char *in_template, int sizeflag)
                  /* Skip printing {evex} for some special instructions in MAP4.  */
                  evex_printed = true;
                  break;
-               case 'M':
-                 if (ins->modrm.mod != 3 && !(ins->rex2 & 7))
-                   oappend (ins, "{evex} ");
-                 evex_printed = true;
-                 break;
                default:
                  abort ();
                }