x86: Remove unnecessary vex.w check for xh_mode in disassembler
authorHaochen Jiang <haochen.jiang@intel.com>
Mon, 5 Dec 2022 02:32:00 +0000 (10:32 +0800)
committerCui,Lili <lili.cui@intel.com>
Tue, 6 Dec 2022 07:49:40 +0000 (15:49 +0800)
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.

opcodes/i386-dis.c

index e43666af841db760fb628a64cd1164da5474d54b..e778e9192068e0a1ff3c37653156a3f95c2cee62 100644 (file)
@@ -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