fix typo, added @table
[deliverable/binutils-gdb.git] / gdb / m68k-pinsn.c
index 94ac7f7c90968cd79f6472c68a41be17cd406935..60c6c592e21a0cd8a500815fe31e93986eadff4f 100644 (file)
@@ -1,29 +1,42 @@
-/* Print m68k instructions for GDB, the GNU debugger.
-   Copyright (C) 1986, 1987 Free Software Foundation, Inc.
+/* Print Motorola 68k instructions for GDB, the GNU debugger.
+   Copyright 1986, 1987, 1989, 1991, 1992 Free Software Foundation, Inc.
 
-GDB is distributed in the hope that it will be useful, but WITHOUT ANY
-WARRANTY.  No author or distributor accepts responsibility to anyone
-for the consequences of using it or for whether it serves any
-particular purpose or works at all, unless he says so in writing.
-Refer to the GDB General Public License for full details.
+This file is part of GDB.
 
-Everyone is granted permission to copy, modify and redistribute GDB,
-but only under the conditions described in the GDB General Public
-License.  A copy of this license is supposed to have been given to you
-along with GDB so you can know your rights and responsibilities.  It
-should be in a file named COPYING.  Among other things, the copyright
-notice and this notice must be preserved on all copies.
+This program is free software; you can redistribute it and/or modify
+it under the terms of the GNU General Public License as published by
+the Free Software Foundation; either version 2 of the License, or
+(at your option) any later version.
 
-In other words, go ahead and share GDB, but don't try to stop
-anyone else from sharing it farther.  Help stamp out software hoarding!
-*/
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+GNU General Public License for more details.
 
-#include <stdio.h>
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  */
 
 #include "defs.h"
-#include "param.h"
 #include "symtab.h"
-#include "opcode.h"
+#include "opcode/m68k.h"
+#include "gdbcore.h"
+#include "ieee-float.h"
+
+/* Local function prototypes */
+
+static int
+fetch_arg PARAMS ((unsigned char *, int, int));
+
+static void
+print_base PARAMS ((int, int, FILE *));
+
+static unsigned char *
+print_indexed PARAMS ((int, unsigned char *, CORE_ADDR, FILE *));
+
+static unsigned char *
+print_insn_arg PARAMS ((char *, unsigned char *, unsigned char *, CORE_ADDR,
+                       FILE *));
 
 /* 68k instructions are never longer than this many bytes.  */
 #define MAXLEN 22
@@ -31,38 +44,34 @@ anyone else from sharing it farther.  Help stamp out software hoarding!
 /* Number of elements in the opcode table.  */
 #define NOPCODES (sizeof m68k_opcodes / sizeof m68k_opcodes[0])
 
-extern char *reg_names[];
-char *fpcr_names[] = { "", "fpiar", "fpsr", "fpiar/fpsr", "fpcr",
-                    "fpiar/fpcr", "fpsr/fpcr", "fpiar-fpcr"};
+const char * const fpcr_names[] = {
+  "", "fpiar", "fpsr", "fpiar/fpsr", "fpcr",
+  "fpiar/fpcr", "fpsr/fpcr", "fpiar/fpsr/fpcr"};
 
-static unsigned char *print_insn_arg ();
-static unsigned char *print_indexed ();
-static void print_base ();
-static int fetch_arg ();
+/* Define accessors for 68K's 1, 2, and 4-byte signed quantities.
+   The _SHIFT values move the quantity to the high order end of an
+   `int' value, so it will sign-extend.  Probably a few more casts
+   are needed to make it compile without warnings on finicky systems.  */
+#define        BITS_PER_BYTE   8
+#define        BYTE_SHIFT (BITS_PER_BYTE * ((sizeof (int)) - 1))
+#define        WORD_SHIFT (BITS_PER_BYTE * ((sizeof (int)) - 2))
+#define        LONG_SHIFT (BITS_PER_BYTE * ((sizeof (int)) - 4))
 
-#define NEXTBYTE(p)  (p += 2, ((char *)p)[-1])
+#define NEXTBYTE(p)  (p += 2, ((int)(p[-1]) << BYTE_SHIFT) >> BYTE_SHIFT)
 
 #define NEXTWORD(p)  \
-  (p += 2, ((((char *)p)[-2]) << 8) + p[-1])
+  (p += 2, (((int)((p[-2] << 8) + p[-1])) << WORD_SHIFT) >> WORD_SHIFT)
 
 #define NEXTLONG(p)  \
-  (p += 4, (((((p[-4] << 8) + p[-3]) << 8) + p[-2]) << 8) + p[-1])
+  (p += 4, (((int)((((((p[-4] << 8) + p[-3]) << 8) + p[-2]) << 8) + p[-1])) \
+                                  << LONG_SHIFT) >> LONG_SHIFT)
 
+/* Ecch -- assumes host == target float formats.  FIXME.  */
 #define NEXTSINGLE(p) \
   (p += 4, *((float *)(p - 4)))
 
 #define NEXTDOUBLE(p) \
   (p += 8, *((double *)(p - 8)))
-
-#define NEXTEXTEND(p) \
-  (p += 12, 0.0)       /* Need a function to convert from extended to double
-                          precision... */
-
-#define NEXTPACKED(p) \
-  (p += 12, 0.0)       /* Need a function to convert from packed to double
-                          precision.   Actually, it's easier to print a
-                          packed number than a double anyway, so maybe
-                          there should be a special case to handle this... */
 \f
 /* Print the m68k instruction at address MEMADDR in debugged memory,
    on STREAM.  Returns length of the instruction, in bytes.  */
@@ -79,7 +88,7 @@ print_insn (memaddr, stream)
   register int bestmask;
   int best;
 
-  read_memory (memaddr, buffer, MAXLEN);
+  read_memory (memaddr, (char *) buffer, MAXLEN);
 
   bestmask = 0;
   best = -1;
@@ -118,11 +127,11 @@ print_insn (memaddr, stream)
   /* Handle undefined instructions.  */
   if (best < 0)
     {
-      fprintf (stream, "0%o", (buffer[0] << 8) + buffer[1]);
+      fprintf_filtered (stream, "0%o", (buffer[0] << 8) + buffer[1]);
       return 2;
     }
 
-  fprintf (stream, "%s", m68k_opcodes[best].name);
+  fprintf_filtered (stream, "%s", m68k_opcodes[best].name);
 
   /* Point at first word of argument data,
      and at descriptor for first argument.  */
@@ -142,19 +151,21 @@ print_insn (memaddr, stream)
        p = buffer + 4;
       if (d[1] >= '4' && d[1] <= '6' && p - buffer < 6)
        p = buffer + 6;
+      if ((d[0] == 'L' || d[0] == 'l') && d[1] == 'w' && p - buffer < 4)
+       p = buffer + 4;
     }
 
   d = m68k_opcodes[best].args;
 
   if (*d)
-    fputc (' ', stream);
+    fputs_filtered (" ", stream);
 
   while (*d)
     {
       p = print_insn_arg (d, buffer, p, memaddr + p - buffer, stream);
       d += 2;
       if (*d && *(d - 2) != 'I' && *d != 'k')
-       fprintf (stream, ",");
+       fputs_filtered (",", stream);
     }
   return p - buffer;
 }
@@ -170,103 +181,139 @@ print_insn_arg (d, buffer, p, addr, stream)
   register int val;
   register int place = d[1];
   int regno;
-  register char *regname;
+  register const char *regname;
   register unsigned char *p1;
-  register double flval;
+  double flval;
   int flt_p;
 
   switch (*d)
     {
+    case 'c':          /* cache identifier */
+      {
+        static char *cacheFieldName[] = { "NOP", "dc", "ic", "bc" };
+        val = fetch_arg (buffer, place, 2);
+        fprintf_filtered (stream, cacheFieldName[val]);
+        break;
+      }
+
+    case 'a':          /* address register indirect only. Cf. case '+'. */
+      {
+        fprintf_filtered (stream,
+                         "%s@",
+                         reg_names [fetch_arg (buffer, place, 3) + 8]);
+        break;
+      }
+
+    case '_':          /* 32-bit absolute address for move16. */
+      {
+        val = NEXTLONG (p);
+        fprintf_filtered (stream, "@#");
+       print_address (val, stream);
+        break;
+      }
+
     case 'C':
-      fprintf (stream, "ccr");
+      fprintf_filtered (stream, "ccr");
       break;
 
     case 'S':
-      fprintf (stream, "sr");
+      fprintf_filtered (stream, "sr");
       break;
 
     case 'U':
-      fprintf (stream, "usp");
+      fprintf_filtered (stream, "usp");
       break;
 
     case 'J':
       {
        static struct { char *name; int value; } names[]
          = {{"sfc", 0x000}, {"dfc", 0x001}, {"cacr", 0x002},
+            {"tc",  0x003}, {"itt0",0x004}, {"itt1", 0x005},
+             {"dtt0",0x006}, {"dtt1",0x007},
             {"usp", 0x800}, {"vbr", 0x801}, {"caar", 0x802},
-            {"msp", 0x803}, {"isp", 0x804}};
+            {"msp", 0x803}, {"isp", 0x804}, {"mmusr",0x805},
+             {"urp", 0x806}, {"srp", 0x807}};
 
        val = fetch_arg (buffer, place, 12);
        for (regno = sizeof names / sizeof names[0] - 1; regno >= 0; regno--)
          if (names[regno].value == val)
            {
-             fprintf (stream, names[regno].name);
+             fprintf_filtered (stream, names[regno].name);
              break;
            }
        if (regno < 0)
-         fprintf (stream, "%d", val);
+         fprintf_filtered (stream, "%d", val);
       }
       break;
 
     case 'Q':
       val = fetch_arg (buffer, place, 3);
-      if (val == 0) val = 8;
-      fprintf (stream, "#%d", val);
+      /* 0 means 8, except for the bkpt instruction... */
+      if (val == 0 && d[1] != 's')
+       val = 8;
+      fprintf_filtered (stream, "#%d", val);
       break;
 
     case 'M':
       val = fetch_arg (buffer, place, 8);
       if (val & 0x80)
        val = val - 0x100;
-      fprintf (stream, "#%d", val);
+      fprintf_filtered (stream, "#%d", val);
       break;
 
     case 'T':
       val = fetch_arg (buffer, place, 4);
-      fprintf (stream, "#%d", val);
+      fprintf_filtered (stream, "#%d", val);
       break;
 
     case 'D':
-      fprintf (stream, "%s", reg_names[fetch_arg (buffer, place, 3)]);
+      fprintf_filtered (stream, "%s", reg_names[fetch_arg (buffer, place, 3)]);
       break;
 
     case 'A':
-      fprintf (stream, "%s", reg_names[fetch_arg (buffer, place, 3) + 010]);
+      fprintf_filtered (stream, "%s",
+                       reg_names[fetch_arg (buffer, place, 3) + 010]);
       break;
 
     case 'R':
-      fprintf (stream, "%s", reg_names[fetch_arg (buffer, place, 4)]);
+      fprintf_filtered (stream, "%s", reg_names[fetch_arg (buffer, place, 4)]);
+      break;
+
+    case 'r':
+      fprintf_filtered (stream, "%s@", reg_names[fetch_arg (buffer, place, 4)]);
       break;
 
     case 'F':
-      fprintf (stream, "fp%d", fetch_arg (buffer, place, 3));
+      fprintf_filtered (stream, "fp%d", fetch_arg (buffer, place, 3));
       break;
 
     case 'O':
       val = fetch_arg (buffer, place, 6);
       if (val & 0x20)
-       fprintf (stream, "%s", reg_names [val & 7]);
+       fprintf_filtered (stream, "%s", reg_names [val & 7]);
       else
-       fprintf (stream, "%d", val);
+       fprintf_filtered (stream, "%d", val);
       break;
 
     case '+':
-      fprintf (stream, "(%s)+", reg_names[fetch_arg (buffer, place, 3) + 8]);
+      fprintf_filtered (stream, "%s@+",
+                       reg_names[fetch_arg (buffer, place, 3) + 8]);
       break;
 
     case '-':
-      fprintf (stream, "-(%s)", reg_names[fetch_arg (buffer, place, 3) + 8]);
+      fprintf_filtered (stream, "%s@-",
+              reg_names[fetch_arg (buffer, place, 3) + 8]);
       break;
 
     case 'k':
       if (place == 'k')
-       fprintf (stream, "{%s}", reg_names[fetch_arg (buffer, place, 3)]);
+       fprintf_filtered (stream, "{%s}", reg_names[fetch_arg (buffer, place, 3)]);
       else if (place == 'C')
        {
          val = fetch_arg (buffer, place, 7);
          if ( val > 63 )               /* This is a signed constant. */
            val -= 128;
-         fprintf (stream, "{#%d}", val);
+         fprintf_filtered (stream, "{#%d}", val);
        }
       else
        error ("Invalid arg format in opcode table: \"%c%c\".",
@@ -274,7 +321,8 @@ print_insn_arg (d, buffer, p, addr, stream)
       break;
 
     case '#':
-      p1 = buffer + 2;
+    case '^':
+      p1 = buffer + (*d == '#' ? 2 : 4);
       if (place == 's')
        val = fetch_arg (buffer, place, 4);
       else if (place == 'C')
@@ -292,38 +340,21 @@ print_insn_arg (d, buffer, p, addr, stream)
       else
        error ("Invalid arg format in opcode table: \"%c%c\".",
               *d, place);
-      fprintf (stream, "#%d", val);
-      break;
-
-    case '^':
-      if (place == 's')
-       val = fetch_arg (buffer, place, 4);
-      else if (place == 'C')
-       val = fetch_arg (buffer, place, 7);
-      else if (place == '8')
-       val = fetch_arg (buffer, place, 3);
-      else if (place == 'b')
-       val = NEXTBYTE (p);
-      else if (place == 'w')
-       val = NEXTWORD (p);
-      else if (place == 'l')
-       val = NEXTLONG (p);
-      else
-       error ("Invalid arg format in opcode table: \"%c%c\".",
-              *d, place);
-      fprintf (stream, "#%d", val);
+      fprintf_filtered (stream, "#%d", val);
       break;
 
     case 'B':
       if (place == 'b')
        val = NEXTBYTE (p);
-      else if (place == 'w')
+      else if (place == 'B')
+       val = NEXTBYTE (buffer);        /* from the opcode word */
+      else if (place == 'w' || place == 'W')
        val = NEXTWORD (p);
-      else if (place == 'l')
+      else if (place == 'l' || place == 'L')
        val = NEXTLONG (p);
       else if (place == 'g')
        {
-         val = ((char *)buffer)[1];
+         val = NEXTBYTE (buffer);
          if (val == 0)
            val = NEXTWORD (p);
          else if (val == -1)
@@ -345,17 +376,19 @@ print_insn_arg (d, buffer, p, addr, stream)
 
     case 'd':
       val = NEXTWORD (p);
-      fprintf (stream, "%d(%s)", val, reg_names[fetch_arg (buffer, place, 3)]);
+      fprintf_filtered (stream, "%s@(%d)",
+                       reg_names[fetch_arg (buffer, place, 3)], val);
       break;
 
     case 's':
-      fprintf (stream, "%s", fpcr_names[fetch_arg (buffer, place, 3)]);
+      fprintf_filtered (stream, "%s",
+                       fpcr_names[fetch_arg (buffer, place, 3)]);
       break;
 
     case 'I':
       val = fetch_arg (buffer, 'd', 3);                  /* Get coprocessor ID... */
       if (val != 1)                            /* Unusual coprocessor ID? */
-       fprintf (stream, "(cpid=%d) ", val);
+       fprintf_filtered (stream, "(cpid=%d) ", val);
       if (place == 'i')
        p += 2;                      /* Skip coprocessor extended operands */
       break;
@@ -370,6 +403,7 @@ print_insn_arg (d, buffer, p, addr, stream)
     case '?':
     case '/':
     case '&':
+    case '`':
 
       if (place == 'd')
        {
@@ -385,28 +419,28 @@ print_insn_arg (d, buffer, p, addr, stream)
       switch (val >> 3)
        {
        case 0:
-         fprintf (stream, "%s", reg_names[val]);
+         fprintf_filtered (stream, "%s", reg_names[val]);
          break;
 
        case 1:
-         fprintf (stream, "%s", regname);
+         fprintf_filtered (stream, "%s", regname);
          break;
 
        case 2:
-         fprintf (stream, "(%s)", regname);
+         fprintf_filtered (stream, "%s@", regname);
          break;
 
        case 3:
-         fprintf (stream, "(%s)+", regname);
+         fprintf_filtered (stream, "%s@+", regname);
          break;
 
        case 4:
-         fprintf (stream, "-(%s)", regname);
+         fprintf_filtered (stream, "%s@-", regname);
          break;
 
        case 5:
          val = NEXTWORD (p);
-         fprintf (stream, "%d(%s)", val, regname);
+         fprintf_filtered (stream, "%s@(%d)", regname, val);
          break;
 
        case 6:
@@ -418,13 +452,13 @@ print_insn_arg (d, buffer, p, addr, stream)
            {
            case 0:
              val = NEXTWORD (p);
-             fprintf (stream, "@#");
+             fprintf_filtered (stream, "@#");
              print_address (val, stream);
              break;
 
            case 1:
              val = NEXTLONG (p);
-             fprintf (stream, "@#");
+             fprintf_filtered (stream, "@#");
              print_address (val, stream);
              break;
 
@@ -464,12 +498,16 @@ print_insn_arg (d, buffer, p, addr, stream)
                  flval = NEXTDOUBLE(p);
                  break;
 
+#ifdef HAVE_68881
                case 'x':
-                 flval = NEXTEXTEND(p);
+                 ieee_extended_to_double (&ext_format_68881, p, &flval);
+                 p += 12;
                  break;
+#endif
 
                case 'p':
-                 flval = NEXTPACKED(p);
+                 p += 12;
+                 flval = 0;    /* FIXME, handle packed decimal someday.  */
                  break;
 
                default:
@@ -477,18 +515,97 @@ print_insn_arg (d, buffer, p, addr, stream)
                       *d, place);
              }
              if ( flt_p )      /* Print a float? */
-               fprintf (stream, "#%g", flval);
+               fprintf_filtered (stream, "#%g", flval);
              else
-               fprintf (stream, "#%d", val);
+               fprintf_filtered (stream, "#%d", val);
              break;
 
            default:
-             fprintf (stream, "<invalid address mode 0%o>", val);
+             fprintf_filtered (stream, "<invalid address mode 0%o>", val);
            }
        }
       break;
 
-    default:
+    case 'L':
+    case 'l':
+       if (place == 'w')
+         {
+           char doneany;
+           p1 = buffer + 2;
+           val = NEXTWORD (p1);
+           /* Move the pointer ahead if this point is farther ahead
+              than the last.  */
+           p = p1 > p ? p1 : p;
+           if (val == 0)
+             {
+               fputs_filtered ("#0", stream);
+               break;
+             }
+           if (*d == 'l')
+             {
+               register int newval = 0;
+               for (regno = 0; regno < 16; ++regno)
+                 if (val & (0x8000 >> regno))
+                   newval |= 1 << regno;
+               val = newval;
+             }
+           val &= 0xffff;
+           doneany = 0;
+           for (regno = 0; regno < 16; ++regno)
+             if (val & (1 << regno))
+               {
+                 int first_regno;
+                 if (doneany)
+                   fputs_filtered ("/", stream);
+                 doneany = 1;
+                 fprintf_filtered (stream, "%s", reg_names[regno]);
+                 first_regno = regno;
+                 while (val & (1 << (regno + 1)))
+                   ++regno;
+                 if (regno > first_regno)
+                   fprintf_filtered (stream, "-%s", reg_names[regno]);
+               }
+         }
+       else if (place == '3')
+         {
+           /* `fmovem' insn.  */
+           char doneany;
+           val = fetch_arg (buffer, place, 8);
+           if (val == 0)
+             {
+               fputs_filtered ("#0", stream);
+               break;
+             }
+           if (*d == 'l')
+             {
+               register int newval = 0;
+               for (regno = 0; regno < 8; ++regno)
+                 if (val & (0x80 >> regno))
+                   newval |= 1 << regno;
+               val = newval;
+             }
+           val &= 0xff;
+           doneany = 0;
+           for (regno = 0; regno < 8; ++regno)
+             if (val & (1 << regno))
+               {
+                 int first_regno;
+                 if (doneany)
+                   fputs_filtered ("/", stream);
+                 doneany = 1;
+                 fprintf_filtered (stream, "fp%d", regno);
+                 first_regno = regno;
+                 while (val & (1 << (regno + 1)))
+                   ++regno;
+                 if (regno > first_regno)
+                   fprintf_filtered (stream, "-fp%d", regno);
+               }
+         }
+       else
+         goto de_fault;
+      break;
+
+    default:  de_fault:
       error ("Invalid arg format in opcode table: \"%c\".", *d);
     }
 
@@ -503,7 +620,7 @@ print_insn_arg (d, buffer, p, addr, stream)
 static int
 fetch_arg (buffer, code, bits)
      unsigned char *buffer;
-     char code;
+     int code;
      int bits;
 {
   register int val;
@@ -570,12 +687,18 @@ fetch_arg (buffer, code, bits)
       val >>= 10;
       break;
 
+    case 'e':
+      val = (buffer[1] >> 6);
+      break;
+
     default:
       abort ();
     }
 
   switch (bits)
     {
+    case 2:
+      return val & 3;
     case 3:
       return val & 7;
     case 4:
@@ -603,8 +726,8 @@ static unsigned char *
 print_indexed (basereg, p, addr, stream)
      int basereg;
      unsigned char *p;
-     FILE *stream;
      CORE_ADDR addr;
+     FILE *stream;
 {
   register int word;
   static char *scales[] = {"", "*2", "*4", "*8"};
@@ -629,7 +752,7 @@ print_indexed (basereg, p, addr, stream)
                  ((word & 0x80) ? word | 0xff00 : word & 0xff)
                  + ((basereg == -1) ? addr : 0),
                  stream);
-      fprintf (stream, "%s", buf);
+      fputs_filtered (buf, stream);
       return p;
     }
 
@@ -657,7 +780,7 @@ print_indexed (basereg, p, addr, stream)
   if ((word & 7) == 0)
     {
       print_base (basereg, base_disp, stream);
-      fprintf (stream, "%s", buf);
+      fputs_filtered (buf, stream);
       return p;
     }
 
@@ -673,15 +796,15 @@ print_indexed (basereg, p, addr, stream)
       outer_disp = NEXTLONG (p);
     }
 
-  fprintf (stream, "%d(", outer_disp);
+  fprintf_filtered (stream, "%d(", outer_disp);
   print_base (basereg, base_disp, stream);
 
   /* If postindexed, print the closeparen before the index.  */
   if (word & 4)
-    fprintf (stream, ")%s", buf);
+    fprintf_filtered (stream, ")%s", buf);
   /* If preindexed, print the closeparen after the index.  */
   else
-    fprintf (stream, "%s)", buf);
+    fprintf_filtered (stream, "%s)", buf);
 
   return p;
 }
@@ -696,74 +819,9 @@ print_base (regno, disp, stream)
      FILE *stream;
 {
   if (regno == -2)
-    fprintf (stream, "%d", disp);
+    fprintf_filtered (stream, "%d", disp);
   else if (regno == -1)
-    fprintf (stream, "0x%x", disp);
+    fprintf_filtered (stream, "0x%x", disp);
   else
-    fprintf (stream, "%d(%s)", disp, reg_names[regno]);
-}
-\f
-/* This is not part of insn printing, but it is machine-specific,
-   so this is a convenient place to put it.
-
-   Convert a 68881 extended float to a double.
-   FROM is the address of the extended float.
-   Store the double in *TO.  */
-
-convert_from_68881 (from, to)
-     char *from;
-     double *to;
-{
-#ifdef HPUX_ASM
-  asm ("mov.l 8(%a6),%a0");
-  asm ("mov.l 12(%a6),%a1");
-  asm ("fmove.x (%a0),%fp0");
-  asm ("fmove.d %fp0,(%a1)");
-#else /* not HPUX_ASM */
-#if 0
-  asm ("movl a6@(8),a0");
-  asm ("movl a6@(12),a1");
-  asm ("fmovex a0@,fp0");
-  asm ("fmoved fp0,a1@");
-#else
-  /* Hand-assemble those insns since some assemblers lose
-     and some have different syntax.  */
-  asm (".word 020156");
-  asm (".word 8");
-  asm (".word 021156");
-  asm (".word 12");
-  asm (".long 0xf2104800");
-  asm (".long 0xf2117400");
-#endif
-#endif /* not HPUX_ASM */
-}
-
-/* The converse: convert the double *FROM to an extended float
-   and store where TO points.  */
-
-convert_to_68881 (from, to)
-     double *from;
-     char *to;
-{
-#ifdef HPUX_ASM
-  asm ("mov.l 8(%a6),%a0");
-  asm ("mov.l 12(%a6),%a1");
-  asm ("fmove.d (%a0),%fp0");
-  asm ("fmove.x %fp0,(%a1)");
-#else /* not HPUX_ASM */
-#if 0
-  asm ("movl a6@(8),a0");
-  asm ("movl a6@(12),a1");
-  asm ("fmoved a0@,fp0");
-  asm ("fmovex fp0,a1@");
-#else
-  /* Hand-assemble those insns since some assemblers lose.  */
-  asm (".word 020156");
-  asm (".word 8");
-  asm (".word 021156");
-  asm (".word 12");
-  asm (".long 0xf2105400");
-  asm (".long 0xf2116800");
-#endif
-#endif /* not HPUX_ASM */
+    fprintf_filtered (stream, "%d(%s)", disp, reg_names[regno]);
 }
This page took 0.031996 seconds and 4 git commands to generate.