Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/powerpc/powerpc Recognize %mq, and adjust disasm_fi...



details:   https://anonhg.NetBSD.org/src/rev/585764138aa8
branches:  trunk
changeset: 542151:585764138aa8
user:      kleink <kleink%NetBSD.org@localhost>
date:      Wed Jan 22 21:03:37 2003 +0000

description:
Recognize %mq, and adjust disasm_fields() slightly to print it.

diffstat:

 sys/arch/powerpc/powerpc/db_disasm.c |  5 +++--
 1 files changed, 3 insertions(+), 2 deletions(-)

diffs (26 lines):

diff -r 6c1080310cd5 -r 585764138aa8 sys/arch/powerpc/powerpc/db_disasm.c
--- a/sys/arch/powerpc/powerpc/db_disasm.c      Wed Jan 22 20:50:47 2003 +0000
+++ b/sys/arch/powerpc/powerpc/db_disasm.c      Wed Jan 22 21:03:37 2003 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: db_disasm.c,v 1.13 2002/11/25 02:06:16 thorpej Exp $   */
+/*     $NetBSD: db_disasm.c,v 1.14 2003/01/22 21:03:37 kleink Exp $    */
 /*     $OpenBSD: db_disasm.c,v 1.2 1996/12/28 06:21:48 rahnds Exp $    */
 
 #include <sys/param.h>
@@ -401,6 +401,7 @@
 };
 
 const struct specialreg sprregs[] = {
+       { 0x000, "mq" },
        { 0x001, "xer" },
        { 0x008, "lr" },
        { 0x009, "ctr" },
@@ -769,7 +770,7 @@
                for (i = 0; regs[i].name != NULL; i++)
                        if (spr == regs[i].reg)
                                break;
-               if (regs[i].reg == 0)
+               if (regs[i].name == NULL)
                        pstr += sprintf(pstr, "[unknown special reg (%d)]", spr);
                else
                        pstr += sprintf(pstr, "%s", regs[i].name);



Home | Main Index | Thread Index | Old Index