From: Jan Beulich Date: Mon, 9 May 2005 06:38:45 +0000 (+0000) Subject: gas/ X-Git-Tag: insight_6_8-branchpoint~5153 X-Git-Url: http://git.osdn.net/view?a=commitdiff_plain;h=be97728fd1ed6330765eb291e26f3064bc1842dd;p=pf3gnuchains%2Fpf3gnuchains4x.git gas/ 2005-05-09 Jan Beulich * config/tc-i386.c (parse_insn): Consider all matching instructions when checking for string instruction after string-only prefix. --- diff --git a/gas/ChangeLog b/gas/ChangeLog index d79fc664b5..f14c9f8f7b 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,3 +1,8 @@ +2005-05-09 Jan Beulich + + * 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 PR 940 diff --git a/gas/config/tc-i386.c b/gas/config/tc-i386.c index 15db848037..7b26546402 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;