public inbox for binutils-cvs@sourceware.org
 help / color / mirror / Atom feed
From: Lili Cui <cuilili@sourceware.org>
To: binutils-cvs@sourceware.org
Subject: [binutils-gdb] Remove %ME and used %NE for movbe.
Date: Tue, 18 Jun 2024 02:57:36 +0000 (GMT)	[thread overview]
Message-ID: <20240618025736.6479F3882126@sourceware.org> (raw)

https://sourceware.org/git/gitweb.cgi?p=binutils-gdb.git;h=f7b1fe8dc463d1cc0758d6c010a3082ff124e360

commit f7b1fe8dc463d1cc0758d6c010a3082ff124e360
Author: Cui, Lili <lili.cui@intel.com>
Date:   Tue Jun 18 10:46:31 2024 +0800

    Remove %ME and used %NE for movbe.
    
    %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.

Diff:
---
 opcodes/i386-dis-evex-mod.h | 10 ++++++++++
 opcodes/i386-dis-evex.h     |  4 ++--
 opcodes/i386-dis.c          | 10 ++--------
 3 files changed, 14 insertions(+), 10 deletions(-)

diff --git a/opcodes/i386-dis-evex-mod.h b/opcodes/i386-dis-evex-mod.h
index 879c91f3b76..bba32658ecf 100644
--- a/opcodes/i386-dis-evex-mod.h
+++ b/opcodes/i386-dis-evex-mod.h
@@ -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 },
diff --git a/opcodes/i386-dis-evex.h b/opcodes/i386-dis-evex.h
index 77c2ee772d1..0f63b5f701d 100644
--- a/opcodes/i386-dis-evex.h
+++ b/opcodes/i386-dis-evex.h
@@ -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 },
diff --git a/opcodes/i386-dis.c b/opcodes/i386-dis.c
index 86745a1b933..3a1afcc2fce 100644
--- a/opcodes/i386-dis.c
+++ b/opcodes/i386-dis.c
@@ -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 ();
 		}

                 reply	other threads:[~2024-06-18  2:57 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240618025736.6479F3882126@sourceware.org \
    --to=cuilili@sourceware.org \
    --cc=binutils-cvs@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).