Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/mips/mips add cop2 instructions
details: https://anonhg.NetBSD.org/src/rev/df883302db1c
branches: trunk
changeset: 764644:df883302db1c
user: matt <matt%NetBSD.org@localhost>
date: Fri Apr 29 22:06:12 2011 +0000
description:
add cop2 instructions
diffstat:
sys/arch/mips/mips/db_disasm.c | 72 +++++++++++++++++++++++++++++++++++++++--
1 files changed, 68 insertions(+), 4 deletions(-)
diffs (103 lines):
diff -r 3d7a1fcd7d2c -r df883302db1c sys/arch/mips/mips/db_disasm.c
--- a/sys/arch/mips/mips/db_disasm.c Fri Apr 29 22:05:16 2011 +0000
+++ b/sys/arch/mips/mips/db_disasm.c Fri Apr 29 22:06:12 2011 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: db_disasm.c,v 1.21 2009/12/14 00:46:06 matt Exp $ */
+/* $NetBSD: db_disasm.c,v 1.22 2011/04/29 22:06:12 matt Exp $ */
/*-
* Copyright (c) 1991, 1993
@@ -35,7 +35,7 @@
*/
#include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: db_disasm.c,v 1.21 2009/12/14 00:46:06 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: db_disasm.c,v 1.22 2011/04/29 22:06:12 matt Exp $");
#include <sys/types.h>
#include <sys/systm.h>
@@ -134,11 +134,11 @@
static const char * const c0_reg[32] = {
"index", "random", "tlblo0", "tlblo1",
- "context", "pagemask", "wired", "cp0r7",
+ "context", "pagemask", "wired", "hwrena",
"badvaddr", "count", "tlbhi", "compare",
"status", "cause", "epc", "prid",
"config", "lladdr", "watchlo", "watchhi",
- "xcontext", "cp0r21", "cp0r22", "debug",
+ "xcontext", "cp0r21", "osscratch", "debug",
"depc", "perfcnt", "ecc", "cacheerr",
"taglo", "taghi", "errepc", "desave"
};
@@ -429,6 +429,70 @@
}
break;
+ case OP_COP2:
+ switch (i.RType.rs) {
+ case OP_BCx:
+ case OP_BCy:
+ db_printf("bc2%c\t",
+ "ft"[i.RType.rt & COPz_BC_TF_MASK]);
+ goto pr_displ;
+
+ case OP_MT:
+ db_printf("mtc2\t%s,f%d",
+ reg_name[i.RType.rt],
+ i.RType.rd);
+ break;
+
+ case OP_MF:
+ db_printf("mfc2\t%s,f%d",
+ reg_name[i.RType.rt],
+ i.RType.rd);
+ break;
+
+ case OP_CT:
+ db_printf("ctc2\t%s,f%d",
+ reg_name[i.RType.rt],
+ i.RType.rd);
+ break;
+
+ case OP_CF:
+ db_printf("cfc2\t%s,f%d",
+ reg_name[i.RType.rt],
+ i.RType.rd);
+ break;
+
+ case OP_DMT:
+ db_printf("dmtc2\t%s,f%d",
+ reg_name[i.RType.rt],
+ i.RType.rd);
+ break;
+
+ case OP_DMF:
+ db_printf("dmfc2\t%s,f%d",
+ reg_name[i.RType.rt],
+ i.RType.rd);
+ break;
+
+ case OP_MTH:
+ db_printf("mthc2\t%s,f%d",
+ reg_name[i.RType.rt],
+ i.RType.rd);
+ break;
+
+ case OP_MFH:
+ db_printf("mfhc2\t%s,f%d",
+ reg_name[i.RType.rt],
+ i.RType.rd);
+ break;
+
+ default:
+ db_printf("%s\t%s,%s,%d", op_name[i.IType.op],
+ reg_name[i.IType.rt],
+ reg_name[i.IType.rs],
+ (short)i.IType.imm);
+ }
+ break;
+
case OP_J:
case OP_JAL:
db_printf("%s\t", op_name[i.JType.op]);
Home |
Main Index |
Thread Index |
Old Index