* app.c (do_scrub_chars): In MRI mode, keep a space before a
authorIan Lance Taylor <ian@airs.com>
Fri, 8 Sep 1995 19:17:46 +0000 (19:17 +0000)
committerIan Lance Taylor <ian@airs.com>
Fri, 8 Sep 1995 19:17:46 +0000 (19:17 +0000)
possible comment character.
* config/tc-m68k.c (m68k_ip): In MRI mode, ignore anything after
an instruction which takes no operands.

gas/ChangeLog
gas/app.c
gas/config/tc-m68k.c

index f725a04..3ef1fab 100644 (file)
@@ -1,5 +1,10 @@
 Fri Sep  8 00:27:46 1995  Ian Lance Taylor  <ian@cygnus.com>
 
+       * app.c (do_scrub_chars): In MRI mode, keep a space before a
+       possible comment character.
+       * config/tc-m68k.c (m68k_ip): In MRI mode, ignore anything after
+       an instruction which takes no operands.
+
        * Makefile.in (install): Don't install gasp in $(tooldir).
 
        * config/tc-mips.c (macro): Handle a non zero base register for
index 7b7ea15..a858163 100644 (file)
--- a/gas/app.c
+++ b/gas/app.c
@@ -587,6 +587,13 @@ do_scrub_chars (get, tostart, tolen)
              /* cpp never outputs a leading space before the #, so
                 try to avoid being confused.  */
              not_cpp_line = 1;
+             if (flag_mri)
+               {
+                 /* In MRI mode, we keep these spaces.  */
+                 UNGET (ch);
+                 PUT (' ');
+                 break;
+               }
              goto recycle;
            }
 
index 8f7dad3..6459a88 100644 (file)
@@ -29,7 +29,7 @@
 
 /* This array holds the chars that always start a comment.  If the
    pre-processor is disabled, these aren't very useful */
-#ifdef OBJ_ELF
+#if defined (OBJ_ELF) || defined (TE_DELTA)
 CONST char comment_chars[] = "|#";
 #else
 CONST char comment_chars[] = "|";
@@ -714,6 +714,18 @@ m68k_ip (instring)
       return;
     }
 
+  if (flag_mri && opcode->m_opnum == 0)
+    {
+      /* In MRI mode, random garbage is allowed after an instruction
+         which accepts no operands.  */
+      the_ins.args = opcode->m_operands;
+      the_ins.numargs = opcode->m_opnum;
+      the_ins.numo = opcode->m_codenum;
+      the_ins.opcode[0] = getone (opcode);
+      the_ins.opcode[1] = gettwo (opcode);
+      return;
+    }
+
   for (opP = &the_ins.operands[0]; *p; opP++)
     {
       p = crack_operand (p, opP);
@@ -1757,7 +1769,7 @@ m68k_ip (instring)
                          siz2 = SIZE_LONG;
                          nextword |= 0x3;
                        }
-                     else if (! isvar (&opP->disp) && outro == 0)
+                     else if (! isvar (&opP->odisp) && outro == 0)
                        nextword |= 0x1;
                      else
                        {
@@ -1775,7 +1787,8 @@ m68k_ip (instring)
                      nextword |= 0x3;
                      break;
                    }
-                 if (opP->mode == POST)
+                 if (opP->mode == POST
+                     && (nextword & 0x40) == 0)
                    nextword |= 0x04;
                }
              addword (nextword);
@@ -5842,7 +5855,8 @@ md_show_usage (stream)
                        specify variant of 680X0 architecture [default 68020]\n\
 -m68881 | -m68882 | -mno-68881 | -mno-68882\n\
                        target has/lacks floating-point coprocessor\n\
-                       [default yes for 68020, 68030, and cpu32]\n\
+                       [default yes for 68020, 68030, and cpu32]\n");
+  fprintf(stream, "\
 -m68851 | -mno-68851\n\
                        target has/lacks memory-management unit coprocessor\n\
                        [default yes for 68020 and up]\n\