aboutsummaryrefslogtreecommitdiff
path: root/gas
diff options
context:
space:
mode:
authorJan Beulich <jbeulich@novell.com>2005-05-09 06:38:45 +0000
committerJan Beulich <jbeulich@novell.com>2005-05-09 06:38:45 +0000
commitf41bbced4588cb88ed116a617f705bcfaf9ba486 (patch)
treef696e99c6f1ce2bbb0b0dcaa44e924351c669cdc /gas
parent979b38e00bbe3fd6498b24e55edbeb14c4150bd1 (diff)
downloadgdb-f41bbced4588cb88ed116a617f705bcfaf9ba486.zip
gdb-f41bbced4588cb88ed116a617f705bcfaf9ba486.tar.gz
gdb-f41bbced4588cb88ed116a617f705bcfaf9ba486.tar.bz2
gas/
2005-05-09 Jan Beulich <jbeulich@novell.com> * config/tc-i386.c (parse_insn): Consider all matching instructions when checking for string instruction after string-only prefix.
Diffstat (limited to 'gas')
-rw-r--r--gas/ChangeLog5
-rw-r--r--gas/config/tc-i386.c22
2 files changed, 22 insertions, 5 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog
index d79fc66..f14c9f8 100644
--- a/gas/ChangeLog
+++ b/gas/ChangeLog
@@ -1,3 +1,8 @@
+2005-05-09 Jan Beulich <jbeulich@novell.com>
+
+ * config/tc-i386.c (parse_insn): Consider all matching instructions
+ when checking for string instruction after string-only prefix.
+
2005-05-07 H.J. Lu <hongjiu.lu@intel.com>
PR 940
diff --git a/gas/config/tc-i386.c b/gas/config/tc-i386.c
index 15db848..7b26546 100644
--- a/gas/config/tc-i386.c
+++ b/gas/config/tc-i386.c
@@ -1765,12 +1765,24 @@ parse_insn (line, mnemonic)
}
/* Check for rep/repne without a string instruction. */
- if (expecting_string_instruction
- && !(current_templates->start->opcode_modifier & IsString))
+ if (expecting_string_instruction)
{
- as_bad (_("expecting string instruction after `%s'"),
- expecting_string_instruction);
- return NULL;
+ static templates override;
+
+ for (t = current_templates->start; t < current_templates->end; ++t)
+ if (t->opcode_modifier & IsString)
+ break;
+ if (t >= current_templates->end)
+ {
+ as_bad (_("expecting string instruction after `%s'"),
+ expecting_string_instruction);
+ return NULL;
+ }
+ for (override.start = t; t < current_templates->end; ++t)
+ if (!(t->opcode_modifier & IsString))
+ break;
+ override.end = t;
+ current_templates = &override;
}
return l;