Fix INTEL_SYNTAX output for i386 backend
authorBernd Schmidt <bernds@cygnus.co.uk>
Mon, 19 Jul 1999 08:43:33 +0000 (08:43 +0000)
committerBernd Schmidt <crux@gcc.gnu.org>
Mon, 19 Jul 1999 08:43:33 +0000 (08:43 +0000)
From-SVN: r28170

gcc/ChangeLog
gcc/final.c

index abaeb4296fc5c368a0c19c8ce25a8c4d8d3f4a9d..e1e892a18706c04285d85464ddf58aa29a831822 100644 (file)
@@ -1,3 +1,10 @@
+Mon Jul 19 09:36:27 1999  Bernd Schmidt  <bernds@cygnus.co.uk>
+
+       * final.c (output_asm_insn): When searching for the matching string
+       for a given dialect, don't run past the end of the list of
+       alternatives if there are fewer alternatives in the template than
+       dialects.
+
 1999-07-17  Alexandre Oliva  <oliva@dcc.unicamp.br>
         
        * gcc.texi: Update e-mail addresses and URLs to gcc.gnu.org.
index a9ae2804dbdee8e22576d698797073555065f67e..0ed88a2cf6e9d6f042609293a3931231cf3f5be7 100644 (file)
@@ -3399,9 +3399,10 @@ output_asm_insn (template, operands)
             DIALECT_NUMBER of strings ending with '|'.  */
          for (i = 0; i < dialect_number; i++)
            {
-             while (*p && *p++ != '|')
+             while (*p && *p != '}' && *p++ != '|')
                ;
-
+             if (*p == '}')
+               break;
              if (*p == '|')
                p++;
            }