gas/
authorJan Beulich <jbeulich@novell.com>
Mon, 9 May 2005 06:38:45 +0000 (06:38 +0000)
committerJan Beulich <jbeulich@novell.com>
Mon, 9 May 2005 06:38:45 +0000 (06:38 +0000)
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.

gas/ChangeLog
gas/config/tc-i386.c

index d79fc664b55b58d20bb44fdc7a62392bbf3a0ee8..f14c9f8f7bca5da15a76ca7827b09d426d2e1ae8 100644 (file)
@@ -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
index 15db848037a4af960e0168264418b2f6f2fdb14e..7b26546402360ac11a0ffc31a52885cf39dd856c 100644 (file)
@@ -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;
This page took 0.031912 seconds and 4 git commands to generate.