public inbox for binutils-cvs@sourceware.org
 help / color / mirror / Atom feed
* [binutils-gdb] x86: Remove unnecessary vex.w check for xh_mode in disassembler
@ 2022-12-06  7:55 Lili Cui
  0 siblings, 0 replies; only message in thread
From: Lili Cui @ 2022-12-06  7:55 UTC (permalink / raw)
  To: bfd-cvs

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

commit 40849d84cbcc7647edf90ab8078d873fab15ffb8
Author: Haochen Jiang <haochen.jiang@intel.com>
Date:   Mon Dec 5 10:32:00 2022 +0800

    x86: Remove unnecessary vex.w check for xh_mode in disassembler
    
    For all the xh_mode usage in table, they are all using %XH, which will
    print "{bad}" while EVEX.W=1. This makes this vex.w check unnecessary.
    
    opcodes/ChangeLog:
    
            * i386-dis.c (OP_E_memory): Remove vex.w check for xh_mode.

Diff:
---
 opcodes/i386-dis.c | 29 ++++++++++++-----------------
 1 file changed, 12 insertions(+), 17 deletions(-)

diff --git a/opcodes/i386-dis.c b/opcodes/i386-dis.c
index e43666af841..e778e919206 100644
--- a/opcodes/i386-dis.c
+++ b/opcodes/i386-dis.c
@@ -12206,24 +12206,19 @@ OP_E_memory (instr_info *ins, int bytemode, int sizeflag)
 	{
 	  if (bytemode == xh_mode)
 	    {
-	      if (ins->vex.w)
-		oappend (ins, "{bad}");
-	      else
+	      switch (ins->vex.length)
 		{
-		  switch (ins->vex.length)
-		    {
-		    case 128:
-		      oappend (ins, "{1to8}");
-		      break;
-		    case 256:
-		      oappend (ins, "{1to16}");
-		      break;
-		    case 512:
-		      oappend (ins, "{1to32}");
-		      break;
-		    default:
-		      abort ();
-		    }
+		case 128:
+		  oappend (ins, "{1to8}");
+		  break;
+		case 256:
+		  oappend (ins, "{1to16}");
+		  break;
+		case 512:
+		  oappend (ins, "{1to32}");
+		  break;
+		default:
+		  abort ();
 		}
 	    }
 	  else if (bytemode == q_mode

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2022-12-06  7:55 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-12-06  7:55 [binutils-gdb] x86: Remove unnecessary vex.w check for xh_mode in disassembler Lili Cui

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).