diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2011-04-04 16:58:29 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2011-04-04 16:58:29 +0000 |
commit | 2eb5226e130e329775b1810df82c636f7d4d3aa6 (patch) | |
tree | a3076c61f2f1b164e0d9a6404b01f538ca8da47f /sys | |
parent | ab29f31cff6b659a982f58fc7bc003481a8401e4 (diff) |
Correctly disassemble triadic version of {d,}m[ft]c instructions found on
more and more mips64 processors.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/arch/mips64/mips64/db_disasm.c | 19 |
1 files changed, 17 insertions, 2 deletions
diff --git a/sys/arch/mips64/mips64/db_disasm.c b/sys/arch/mips64/mips64/db_disasm.c index 1d45b6873ac..d96f4d42693 100644 --- a/sys/arch/mips64/mips64/db_disasm.c +++ b/sys/arch/mips64/mips64/db_disasm.c @@ -1,4 +1,4 @@ -/* $OpenBSD: db_disasm.c,v 1.14 2010/11/11 17:34:53 miod Exp $ */ +/* $OpenBSD: db_disasm.c,v 1.15 2011/04/04 16:58:28 miod Exp $ */ /* * Copyright (c) 2010 Miodrag Vallat. @@ -51,7 +51,7 @@ * SUCH DAMAGE. * * from: @(#)kadb.c 8.1 (Berkeley) 6/10/93 - * $Id: db_disasm.c,v 1.14 2010/11/11 17:34:53 miod Exp $ + * $Id: db_disasm.c,v 1.15 2011/04/04 16:58:28 miod Exp $ */ #ifdef _KERNEL @@ -819,6 +819,21 @@ unknown: case OP_DMF: case OP_MT: case OP_DMT: + if ((i.RType.func & 0x07) != 0) { + insn = cop_std[i.RType.rs]; + descr = cop0_reg0[i.RType.rd]; + if (descr != NULL) + (*pr)("%s0\t%s,%d,%d # %s.%d", insn, + reg_name[i.RType.rt], i.RType.rd, + i.RType.func & 0x07, descr, + i.RType.func & 0x07); + else + (*pr)("%s0\t%s,%d,%d", insn, + reg_name[i.RType.rt], i.RType.rd, + i.RType.func & 0x07); + break; + } + /* FALLTHROUGH */ case OP_CF: case OP_CT: insn = cop_std[i.RType.rs]; |