summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorH.J. Lu <hjl@lucon.org>2008-01-10 21:59:46 +0000
committerH.J. Lu <hjl@lucon.org>2008-01-10 21:59:46 +0000
commit91b72ab00bb0aabcd9c6c3e0db576b9e4760bb04 (patch)
tree08547453af08c7cdf25fa909fa797cd011955343
parente8ea9724dfa6c65c2f0af4f73de5a5cba6bb88dc (diff)
downloadbinutils-redhat-91b72ab00bb0aabcd9c6c3e0db576b9e4760bb04.tar.gz
2008-01-10 H.J. Lu <hongjiu.lu@intel.com>
* config/tc-i386.c (match_template): Check processor support first.
-rw-r--r--gas/ChangeLog5
-rw-r--r--gas/config/tc-i386.c10
2 files changed, 11 insertions, 4 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index 845ec2e9e0..38ebf59403 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,5 +1,10 @@
2008-01-10 H.J. Lu <hongjiu.lu@intel.com>
+ * config/tc-i386.c (match_template): Check processor support
+ first.
+
+2008-01-10 H.J. Lu <hongjiu.lu@intel.com>
+
* config/tc-i386.c (match_template): Continue if processor
doesn't match.
diff --git a/gas/config/tc-i386.c b/gas/config/tc-i386.c
index 4d2c7c509e..1d884b666b 100644
--- a/gas/config/tc-i386.c
+++ b/gas/config/tc-i386.c
@@ -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;