/* Print instructions for the Motorola 88000, for GDB and GNU Binutils.
- Copyright 1986, 1987, 1988, 1989, 1990, 1991, 1993
+ Copyright (c) 1986, 1987, 1988, 1989, 1990, 1991, 1993, 1998
Free Software Foundation, Inc.
Contributed by Data General Corporation, November 1989.
Partially derived from an earlier printcmd.c.
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 "dis-asm.h"
#include "opcode/m88k.h"
-
-/* FIXME: Uses the internal bfd swapping routines. */
-#include "libbfd.h"
+#include "opintl.h"
INSTAB *hashtable[HASHVAL] = {0};
return -1;
}
- return m88kdis (memaddr, _do_getb32 (buffer), info);
+ return m88kdis (memaddr, bfd_getb32 (buffer), info);
}
/*
unsigned int opcode;
INSTAB *entry_ptr;
int opmask;
- int class;
+ unsigned int class;
if (! ihashtab_initialized)
init_disasm ();
- /* create a 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))
(*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);
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)
(*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)
break;
default:
- (*info->fprintf_func) (info->stream, "# <dis error: %08x>", inst);
+ /* xgettext:c-format */
+ (*info->fprintf_func) (info->stream, _("# <dis error: %08x>"), inst);
}
}