Add disassemble code for DMT, DMF, MTH and MFH.

This commit is contained in:
msaitoh 2009-08-06 04:34:50 +00:00
parent 9b3aa25fe3
commit f02cd49d11
2 changed files with 31 additions and 5 deletions

View File

@ -1,4 +1,4 @@
/* $NetBSD: mips_opcode.h,v 1.12 2005/12/11 12:18:09 christos Exp $ */
/* $NetBSD: mips_opcode.h,v 1.13 2009/08/06 04:34:50 msaitoh Exp $ */
/*-
* Copyright (c) 1992, 1993
@ -281,12 +281,14 @@ typedef union {
*/
#define OP_MF 000
#define OP_DMF 001 /* MIPS-II, for r4000 port */
#define OP_CF 002
#define OP_MFH 003
#define OP_MT 004
#define OP_DMT 005 /* MIPS-II, for r4000 port */
#define OP_CT 006
#define OP_MTH 007
#define OP_BCx 010
#define OP_BCy 014
#define OP_CF 002
#define OP_CT 006
/*
* Values for the 'rt' field when 'op' == OP_COPz.

View File

@ -1,4 +1,4 @@
/* $NetBSD: db_disasm.c,v 1.19 2007/02/28 04:21:53 thorpej Exp $ */
/* $NetBSD: db_disasm.c,v 1.20 2009/08/06 04:34:50 msaitoh Exp $ */
/*-
* Copyright (c) 1991, 1993
@ -35,7 +35,7 @@
*/
#include <sys/cdefs.h>
__KERNEL_RCSID(0, "$NetBSD: db_disasm.c,v 1.19 2007/02/28 04:21:53 thorpej Exp $");
__KERNEL_RCSID(0, "$NetBSD: db_disasm.c,v 1.20 2009/08/06 04:34:50 msaitoh Exp $");
#include <sys/types.h>
#include <sys/systm.h>
@ -397,6 +397,30 @@ db_disasm_insn(int insn, db_addr_t loc, bool altfmt)
i.RType.rd);
break;
case OP_DMT:
db_printf("dmtc1\t%s,f%d",
reg_name[i.RType.rt],
i.RType.rd);
break;
case OP_DMF:
db_printf("dmfc1\t%s,f%d",
reg_name[i.RType.rt],
i.RType.rd);
break;
case OP_MTH:
db_printf("mthc1\t%s,f%d",
reg_name[i.RType.rt],
i.RType.rd);
break;
case OP_MFH:
db_printf("mfhc1\t%s,f%d",
reg_name[i.RType.rt],
i.RType.rd);
break;
default:
db_printf("%s.%s\tf%d,f%d,f%d",
cop1_name[i.FRType.func],