int *, int *,
const struct h8_opcode *));
-static void print_colon_thingie PARAMS ((op_type *));
-
-static void
-print_colon_thingie (op_type *nib)
-{
- switch (*nib & SIZE) {
- case L_2: fprintf (stdout, "2"); break;
- case L_3:
- case L_3NZ: fprintf (stdout, "3"); break;
- case L_4: fprintf (stdout, "4"); break;
- case L_5: fprintf (stdout, "5"); break;
- case L_8: fprintf (stdout, "8"); break;
- case L_16:
- case L_16U: fprintf (stdout, "16"); break;
- case L_24: fprintf (stdout, "24"); break;
- case L_32: fprintf (stdout, "32"); break;
- }
-}
-
/* Run through the opcodes and sort them into order to make them easy
to disassemble. */
int hadone = 0;
int nargs;
+ /* Special case handling for the adds and subs instructions
+ since in H8 mode thay can only take the r0-r7 registers but
+ in other (higher) modes they can take the er0-er7 registers
+ as well. */
+ if (strcmp (qi->opcode->name, "adds") == 0
+ || strcmp (qi->opcode->name, "subs") == 0)
+ {
+ outfn (stream, "#%d,%s", cst[0], pregnames[regno[1] & 0x7]);
+ return qi->length;
+ }
+
for (nargs = 0;
nargs < 3 && args[nargs] != (op_type) E;
nargs++)