[1/6] x86: avoid cpu_flags_match() bogusly setting CPU_FLAGS_ARCH_MATCH

Message ID 5A9FF0CF02000078001AF5DA@prv-mh.provo.novell.com
State New
Headers show
Series
  • x86: fix/improve cpu_flags_match()
Related show

Commit Message

Jan Beulich March 7, 2018, 1:01 p.m.
gas/
2018-03-07  Jan Beulich  <jbeulich@suse.com>

	* config/tc-i386.c (cpu_flags_match): Drop "else" branches
	setting CPU_FLAGS_ARCH_MATCH.

Comments

H.J. Lu March 7, 2018, 1:39 p.m. | #1
On Wed, Mar 7, 2018 at 5:01 AM, Jan Beulich <JBeulich@suse.com> wrote:
> gas/

> 2018-03-07  Jan Beulich  <jbeulich@suse.com>

>

>         * config/tc-i386.c (cpu_flags_match): Drop "else" branches

>         setting CPU_FLAGS_ARCH_MATCH.


OK.

Thanks.


-- 
H.J.

Patch

--- a/gas/config/tc-i386.c
+++ b/gas/config/tc-i386.c
@@ -1738,8 +1738,6 @@  cpu_flags_match (const insn_template *t)
 			match |= CPU_FLAGS_PCLMUL_MATCH;
 		    }
 		}
-	      else
-		match |= CPU_FLAGS_ARCH_MATCH;
 	    }
 	  else if (x.bitfield.cpuavx512vl)
 	    {
@@ -1750,11 +1748,7 @@  cpu_flags_match (const insn_template *t)
 		  cpu.bitfield.cpuavx512vl = 0;
 		  if (!cpu_flags_all_zero (&cpu))
 		    match |= CPU_FLAGS_32BIT_MATCH;
-		  else
-		    match |= CPU_FLAGS_ARCH_MATCH;
 		}
-	      else
-		match |= CPU_FLAGS_ARCH_MATCH;
 	    }
 	  else
 	    match |= CPU_FLAGS_32BIT_MATCH;