-#include "opcode/d10v.h"
-#include "dis-asm.h"
-
-static void dis_2_short PARAMS ((unsigned long insn, char *str, int order));
-static void dis_long PARAMS ((unsigned long insn, char *str));
-
-int
-print_insn_d10v (memaddr, info)
- bfd_vma memaddr;
- struct disassemble_info *info;
-{
- int status;
- bfd_byte buffer[4];
- unsigned long insn;
- char str[64];
-
- strcpy (str, "unknown");
-
- status = (*info->read_memory_func) (memaddr, buffer, 4, info);
- if (status != 0)
- {
- (*info->memory_error_func) (status, memaddr, info);
- return -1;
- }
- insn = bfd_getb32 (buffer);
-
- status = insn & FM11;
- switch (status) {
- case 0:
- dis_2_short (insn, str, 2);
- break;
- case FM01:
- dis_2_short (insn, str, 0);
- break;
- case FM10:
- dis_2_short (insn, str, 1);
- break;
- case FM11:
- dis_long (insn, str);
- break;
- }
- (*info->fprintf_func) (info->stream, "\t%s", str, insn);
- return 4;
-}
+/* The PC wraps at 18 bits, except for the segment number,
+ so use this mask to keep the parts we want. */
+#define PC_MASK 0x0303FFFF