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 Fix disassembly of trap-immediate instruc...



details:   https://anonhg.NetBSD.org/src/rev/7262c721b155
branches:  trunk
changeset: 338725:7262c721b155
user:      matt <matt%NetBSD.org@localhost>
date:      Sat Jun 06 04:32:47 2015 +0000

description:
Fix disassembly of trap-immediate instructions

diffstat:

 sys/arch/mips/mips/db_disasm.c |  8 ++++++--
 1 files changed, 6 insertions(+), 2 deletions(-)

diffs (29 lines):

diff -r 8bcda9a6f801 -r 7262c721b155 sys/arch/mips/mips/db_disasm.c
--- a/sys/arch/mips/mips/db_disasm.c    Sat Jun 06 04:31:52 2015 +0000
+++ b/sys/arch/mips/mips/db_disasm.c    Sat Jun 06 04:32:47 2015 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: db_disasm.c,v 1.26 2015/06/04 05:23:40 matt Exp $      */
+/*     $NetBSD: db_disasm.c,v 1.27 2015/06/06 04:32:47 matt Exp $      */
 
 /*-
  * Copyright (c) 1991, 1993
@@ -35,7 +35,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: db_disasm.c,v 1.26 2015/06/04 05:23:40 matt Exp $");
+__KERNEL_RCSID(0, "$NetBSD: db_disasm.c,v 1.27 2015/06/06 04:32:47 matt Exp $");
 
 #include <sys/param.h>
 #include <sys/cpu.h>
@@ -487,6 +487,10 @@
        case OP_REGIMM:
                db_printf("%s\t%s,", regimm_name[i.IType.rt],
                    reg_name[i.IType.rs]);
+               if (i.IType.rt >= OP_TGEI && i.IType.rt <= OP_TNEI) {
+                       db_printf("%d",(int16_t)i.IType.imm);
+                       break;
+               }
                goto pr_displ;
 
        case OP_BLEZ:



Home | Main Index | Thread Index | Old Index