x86: drop found_cpu_match local variable

Message ID b906140b-1eea-c8a5-6935-126740156fcb@suse.com
State New
Headers show
Series
  • x86: drop found_cpu_match local variable
Related show

Commit Message

Jan Beulich Jan. 15, 2020, 7:38 a.m.
50aecf8c5f could have done so right away; perhaps the variable shouldn't
have been introduced in the first place.

gas/
2020-01-XX  Jan Beulich  <jbeulich@suse.com>

	* config/tc-i386.c (match_template): Drop found_cpu_match local
	variable.

Comments

H.J. Lu Jan. 15, 2020, 10:08 p.m. | #1
On Tue, Jan 14, 2020 at 11:38 PM Jan Beulich <jbeulich@suse.com> wrote:
>

> 50aecf8c5f could have done so right away; perhaps the variable shouldn't

> have been introduced in the first place.

>

> gas/

> 2020-01-XX  Jan Beulich  <jbeulich@suse.com>

>

>         * config/tc-i386.c (match_template): Drop found_cpu_match local

>         variable.

>


OK.

Thanks.

-- 
H.J.

Patch

--- a/gas/config/tc-i386.c
+++ b/gas/config/tc-i386.c
@@ -5745,9 +5745,7 @@  match_template (char mnem_suffix)
   i386_opcode_modifier suffix_check;
   i386_operand_type operand_types [MAX_OPERANDS];
   int addr_prefix_disp;
-  unsigned int j;
-  unsigned int found_cpu_match, size_match;
-  unsigned int check_register;
+  unsigned int j, size_match, check_register;
   enum i386_error specific_error = 0;
 
 #if MAX_OPERANDS != 5
@@ -5799,9 +5797,7 @@  match_template (char mnem_suffix)
 
       /* Check processor support.  */
       i.error = unsupported;
-      found_cpu_match = (cpu_flags_match (t)
-			 == CPU_FLAGS_PERFECT_MATCH);
-      if (!found_cpu_match)
+      if (cpu_flags_match (t) != CPU_FLAGS_PERFECT_MATCH)
 	continue;
 
       /* Check AT&T mnemonic.   */
@@ -6124,8 +6120,6 @@  check_reverse:
 	  /* Found either forward/reverse 2, 3 or 4 operand match here:
 	     slip through to break.  */
 	}
-      if (!found_cpu_match)
-	continue;
 
       /* Check if vector and VEX operands are valid.  */
       if (check_VecOperands (t) || VEX_check_operands (t))