public inbox for binutils@sourceware.org
 help / color / mirror / Atom feed
* PATCH: Check processor support first
@ 2008-01-11 16:19 H.J. Lu
  0 siblings, 0 replies; only message in thread
From: H.J. Lu @ 2008-01-11 16:19 UTC (permalink / raw)
  To: binutils

If processor doesn't match, there is no need to check operands. I
am checking it in.


H.J.
2008-01-10  H.J. Lu  <hongjiu.lu@intel.com>

	* config/tc-i386.c (match_template): Check processor support
	first.

--- ./config/tc-i386.c.foo	2008-01-10 13:49:42.000000000 -0800
+++ ./config/tc-i386.c	2008-01-10 13:55:28.000000000 -0800
@@ -3000,6 +3000,11 @@ match_template (void)
       if (i.operands != t->operands)
 	continue;
 
+      /* Check processor support.  */
+      found_cpu_match = cpu_flags_match (t->cpu_flags) == 3;
+      if (!found_cpu_match)
+	continue;
+
       /* Check old gcc support. */
       if (!old_gcc && t->opcode_modifier.oldgcc)
 	continue;
@@ -3053,11 +3058,8 @@ match_template (void)
 	continue;
 
       /* Do not verify operands when there are none.  */
-      else 
+      else
 	{
-	  found_cpu_match = cpu_flags_match (t->cpu_flags) == 3;
-	  if (!found_cpu_match)
-	    continue;
 	  if (!t->operands)
 	    /* We've found a match; break out of loop.  */
 	    break;

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

only message in thread, other threads:[~2008-01-10 21:58 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-01-11 16:19 PATCH: Check processor support first H.J. Lu

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