[PATCH 2/3] x86: drop a few redundant EVEX-related checks

Jan Beulich jbeulich@suse.com
Wed Mar 10 08:27:56 GMT 2021


vex.b can only be set when vex.evex is also set. Similarly vex.evex can
only be set when need_vex is also set.

opcodes/
2021-03-XX  Jan Beulich  <jbeulich@suse.com>

	* i386-dis.c (putop): Drop need_vex check when also checking
	vex.evex.
	(intel_operand_size, OP_E_memory): Drop vex.evex check when also
	checking vex.b.

--- a/opcodes/i386-dis.c
+++ b/opcodes/i386-dis.c
@@ -10749,7 +10749,7 @@ putop (const char *in_template, int size
 	    }
 	  else if (l == 1 && last[0] == 'X')
 	    {
-	      if (!need_vex || !vex.evex)
+	      if (!vex.evex)
 		abort ();
 	      if (intel_syntax
 		  || ((modrm.mod == 3 || vex.b) && !(sizeflag & SUFFIX_ALWAYS)))
@@ -10951,8 +10951,7 @@ print_displacement (char *buf, bfd_vma d
 static void
 intel_operand_size (int bytemode, int sizeflag)
 {
-  if (vex.evex
-      && vex.b
+  if (vex.b
       && (bytemode == x_mode
 	  || bytemode == evex_half_bcst_xmmq_mode))
     {
@@ -11845,7 +11844,7 @@ OP_E_memory (int bytemode, int sizeflag)
 	  oappend (scratchbuf);
 	}
     }
-  if (vex.evex && vex.b
+  if (vex.b
       && (bytemode == x_mode
 	  || bytemode == evex_half_bcst_xmmq_mode))
     {



More information about the Binutils mailing list