diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2010-09-17 00:25:12 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2010-09-17 00:25:12 +0000 |
commit | 5720e8986866032143ace1109aeca75ee6467ed8 (patch) | |
tree | 5cbea520c59a0c5cfac5ca5b0062178c7ec355c5 | |
parent | d32d58a3c198443768fb15ca60610bde2d15dce3 (diff) |
There is only one code for coprocessor BC opcodes, so don't bother to handle
a second (invalid) opcode; confirmed by all mips core documentation.
-rw-r--r-- | sys/arch/mips64/include/mips_opcode.h | 5 | ||||
-rw-r--r-- | sys/arch/mips64/mips64/db_disasm.c | 12 | ||||
-rw-r--r-- | sys/arch/mips64/mips64/db_machdep.c | 5 | ||||
-rw-r--r-- | sys/arch/mips64/mips64/trap.c | 8 |
4 files changed, 13 insertions, 17 deletions
diff --git a/sys/arch/mips64/include/mips_opcode.h b/sys/arch/mips64/include/mips_opcode.h index c861b482455..e411ae7dfb6 100644 --- a/sys/arch/mips64/include/mips_opcode.h +++ b/sys/arch/mips64/include/mips_opcode.h @@ -1,4 +1,4 @@ -/* $OpenBSD: mips_opcode.h,v 1.2 2005/08/07 07:29:44 miod Exp $ */ +/* $OpenBSD: mips_opcode.h,v 1.3 2010/09/17 00:25:10 miod Exp $ */ /*- * Copyright (c) 1992, 1993 @@ -275,8 +275,7 @@ typedef union { #define OP_DMF 001 #define OP_MT 004 #define OP_DMT 005 -#define OP_BCx 010 -#define OP_BCy 014 +#define OP_BC 010 #define OP_CF 002 #define OP_CT 006 diff --git a/sys/arch/mips64/mips64/db_disasm.c b/sys/arch/mips64/mips64/db_disasm.c index 4ef4f4a9e99..31f8147b94a 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.9 2010/01/16 23:26:43 miod Exp $ */ +/* $OpenBSD: db_disasm.c,v 1.10 2010/09/17 00:25:11 miod Exp $ */ /*- * Copyright (c) 1991, 1993 * The Regents of the University of California. All rights reserved. @@ -35,7 +35,7 @@ * SUCH DAMAGE. * * from: @(#)kadb.c 8.1 (Berkeley) 6/10/93 - * $Id: db_disasm.c,v 1.9 2010/01/16 23:26:43 miod Exp $ + * $Id: db_disasm.c,v 1.10 2010/09/17 00:25:11 miod Exp $ */ #include <sys/param.h> @@ -301,10 +301,10 @@ md_printins(uint32_t ins, db_addr_t mdbdot) case OP_COP1: switch (i.RType.rs) { - case OP_BCx: - case OP_BCy: - db_printf("bc1%c\t", - "ft"[i.RType.rt & COPz_BC_TF_MASK]); + case OP_BC: + db_printf("bc1%c%c\t", + "ft"[i.RType.rt & COPz_BC_TF_MASK], + i.RType.rt & COPz_BCL_TF_MASK ? 'l' : ' '); goto pr_displ; case OP_MT: diff --git a/sys/arch/mips64/mips64/db_machdep.c b/sys/arch/mips64/mips64/db_machdep.c index 7f41885c8a8..df8db12cef4 100644 --- a/sys/arch/mips64/mips64/db_machdep.c +++ b/sys/arch/mips64/mips64/db_machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: db_machdep.c,v 1.30 2010/09/12 18:30:19 miod Exp $ */ +/* $OpenBSD: db_machdep.c,v 1.31 2010/09/17 00:25:11 miod Exp $ */ /* * Copyright (c) 1998-2003 Opsycon AB (www.opsycon.se) @@ -437,8 +437,7 @@ db_inst_type(ins) case OP_COP1: switch (inst.RType.rs) { - case OP_BCx: - case OP_BCy: + case OP_BC: ityp = IT_BRANCH; break; } diff --git a/sys/arch/mips64/mips64/trap.c b/sys/arch/mips64/mips64/trap.c index 44161b245ea..0255508146d 100644 --- a/sys/arch/mips64/mips64/trap.c +++ b/sys/arch/mips64/mips64/trap.c @@ -1,4 +1,4 @@ -/* $OpenBSD: trap.c,v 1.65 2010/09/14 19:35:13 miod Exp $ */ +/* $OpenBSD: trap.c,v 1.66 2010/09/17 00:25:11 miod Exp $ */ /* * Copyright (c) 1988 University of Utah. @@ -1012,8 +1012,7 @@ MipsEmulateBranch(struct trap_frame *tf, vaddr_t instPC, uint32_t fsr, case OP_COP1: switch (inst.RType.rs) { - case OP_BCx: - case OP_BCy: + case OP_BC: if ((inst.RType.rt & COPz_BC_TF_MASK) == COPz_BC_TRUE) condition = fsr & FPC_COND_BIT; else @@ -1270,8 +1269,7 @@ loop: case OP_COP2: case OP_COP3: switch (i.RType.rs) { - case OP_BCx: - case OP_BCy: + case OP_BC: more = 2; /* stop after next instruction */ }; break; |