/* Disassemble h8300 instructions.
- Copyright (C) 1993 Free Software Foundation, Inc.
+ Copyright (C) 1993, 1998 Free Software Foundation, Inc.
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
#define DEFINE_TABLE
+#include "sysdep.h"
#define h8_opcodes h8ops
#include "opcode/h8300.h"
#include "dis-asm.h"
+#include "opintl.h"
/* Run through the opcodes and sort them into order to make them easy
else if (looking_for & L_24)
{
int i = len >> 1;
- abs = (data[i] << 16) | (data[i + 1] << 8)| (data[i+
- 2]);
+ abs = (data[i] << 16) | (data[i + 1] << 8)| (data[i+2]);
plen =24;
}
else if (looking_for & IGNORE)
plen = 2;
abs = thisnib & 0x3;
}
+ else if (looking_for & MACREG)
+ {
+ abs = (thisnib == 3);
+ }
else if (looking_for == E)
{
}
}
fprintf (stream, "%s\t", q->name);
+
+ /* Gross. Disgusting. */
+ if (strcmp (q->name, "ldm.l") == 0)
+ {
+ int count, high;
+
+ count = (data[1] >> 4) & 0x3;
+ high = data[3] & 0x7;
+
+ fprintf (stream, "@sp+,er%d-er%d", high - count, high);
+ return q->length;
+ }
+
+ if (strcmp (q->name, "stm.l") == 0)
+ {
+ int count, low;
+
+ count = (data[1] >> 4) & 0x3;
+ low = data[3] & 0x7;
+
+ fprintf (stream, "er%d-er%d,@-sp", low, low + count);
+ return q->length;
+ }
+
/* Fill in the args */
{
op_type *args = q->args.nib;
}
}
-
+ else if (x & MACREG)
+ {
+ fprintf (stream, "mac%c", abs ? 'l' : 'h');
+ }
else if (x & INC)
{
fprintf (stream, "@%s+", pregnames[rs]);
{
fprintf (stream, "exr");
}
-
else
- fprintf (stream, "Hmmmm %x", x);
+ /* xgettext:c-format */
+ fprintf (stream, _("Hmmmm %x"), x);
hadone = 1;
args++;
}
else
{
- fprintf (stream, "Dont understand %x \n", looking_for);
+ /* xgettext:c-format */
+ fprintf (stream, _("Don't understand %x \n"), looking_for);
}
}