Fix autoconf breakage + commit target.c, omitted in previous delta
[deliverable/binutils-gdb.git] / opcodes / m88k-dis.c
index fec9559a366d63a1c6c6ca5309683e3c46cd41ba..f0336c7bd5f573311801bad5a420b9719cead590 100644 (file)
@@ -1,5 +1,5 @@
 /* Print instructions for the Motorola 88000, for GDB and GNU Binutils.
-   Copyright 1986, 1987, 1988, 1989, 1990, 1991, 1993
+   Copyright 1986, 1987, 1988, 1989, 1990, 1991, 1993, 1998, 2000
    Free Software Foundation, Inc.
    Contributed by Data General Corporation, November 1989.
    Partially derived from an earlier printcmd.c.
@@ -18,13 +18,12 @@ GNU General Public License for more details.
 
 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.  */
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.  */
 
+#include "sysdep.h"
 #include "dis-asm.h"
 #include "opcode/m88k.h"
-
-/* FIXME: Uses the internal bfd swapping routines.  */
-#include "libbfd.h"
+#include "opintl.h"
 
 INSTAB  *hashtable[HASHVAL] = {0};
 
@@ -73,7 +72,7 @@ print_insn_m88k (memaddr, info)
       return -1;
     }
 
-  return m88kdis (memaddr, _do_getb32 (buffer), info);
+  return m88kdis (memaddr, bfd_getb32 (buffer), info);
 }
 
 /*
@@ -94,12 +93,12 @@ m88kdis (pc, instruction, info)
   unsigned int opcode;
   INSTAB *entry_ptr;
   int opmask;
-  int class;
+  unsigned int class;
 
   if (! ihashtab_initialized)
     init_disasm ();
 
-  /* create the appropriate mask to isolate the opcode */
+  /* create the appropriate mask to isolate the opcode */
   opmask = DEFMASK;
   class = instruction & DEFMASK;
   if ((class >= SFU0) && (class <= SFU7))
@@ -127,7 +126,7 @@ m88kdis (pc, instruction, info)
     (*info->fprintf_func) (info->stream, "word\t%08x", instruction);
   else
     {
-      (*info->fprintf_func) (info->stream, "%s ", entry_ptr->mnemonic);
+      (*info->fprintf_func) (info->stream, "%s", entry_ptr->mnemonic);
       printop (info, &(entry_ptr->op1), instruction, pc, 1);
       printop (info, &(entry_ptr->op2), instruction, pc, 0);
       printop (info, &(entry_ptr->op3), instruction, pc, 0);
@@ -216,6 +215,11 @@ printop (info, opptr, inst, pc, first)
                             UEXT (inst, opptr->offset, opptr->width));
       break;
 
+    case XREG:
+      (*info->fprintf_func) (info->stream, "x%d",
+                            UEXT (inst, opptr->offset, opptr->width));
+      break;
+
     case HEX:
       extracted_field = UEXT (inst, opptr->offset, opptr->width);
       if (extracted_field == 0)
@@ -224,6 +228,11 @@ printop (info, opptr, inst, pc, first)
        (*info->fprintf_func) (info->stream, "0x%02x", extracted_field);
       break;
 
+    case DEC:
+      extracted_field = UEXT (inst, opptr->offset, opptr->width);
+      (*info->fprintf_func) (info->stream, "%d", extracted_field);
+      break;
+
     case CONDMASK:
       extracted_field = UEXT (inst, opptr->offset, opptr->width);
       switch (extracted_field & 0x0f)
@@ -261,7 +270,8 @@ printop (info, opptr, inst, pc, first)
       break;
 
     default:
-      (*info->fprintf_func) (info->stream, "# <dis error: %08x>", inst);
+      /* xgettext:c-format */
+      (*info->fprintf_func) (info->stream, _("# <dis error: %08x>"), inst);
     }
 }
 
This page took 0.062919 seconds and 4 git commands to generate.