Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/alpha/alpha Handle a few more SPECIAL intructions.



details:   https://anonhg.NetBSD.org/src/rev/d563140f0b91
branches:  trunk
changeset: 483881:d563140f0b91
user:      thorpej <thorpej%NetBSD.org@localhost>
date:      Mon Mar 20 02:54:45 2000 +0000

description:
Handle a few more SPECIAL intructions.

diffstat:

 sys/arch/alpha/alpha/db_disasm.c      |  27 +++++++++++++++++++--------
 sys/arch/alpha/alpha/db_instruction.h |   8 ++++++--
 2 files changed, 25 insertions(+), 10 deletions(-)

diffs (99 lines):

diff -r cecd84a95784 -r d563140f0b91 sys/arch/alpha/alpha/db_disasm.c
--- a/sys/arch/alpha/alpha/db_disasm.c  Mon Mar 20 02:19:44 2000 +0000
+++ b/sys/arch/alpha/alpha/db_disasm.c  Mon Mar 20 02:54:45 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: db_disasm.c,v 1.6 1999/05/09 19:40:00 cgd Exp $ */
+/* $NetBSD: db_disasm.c,v 1.7 2000/03/20 02:54:45 thorpej Exp $ */
 
 /* 
  * Mach Operating System
@@ -48,7 +48,7 @@
 
 #include <sys/cdefs.h>                 /* RCS ID & Copyright macro defns */
 
-__KERNEL_RCSID(0, "$NetBSD: db_disasm.c,v 1.6 1999/05/09 19:40:00 cgd Exp $");
+__KERNEL_RCSID(0, "$NetBSD: db_disasm.c,v 1.7 2000/03/20 02:54:45 thorpej Exp $");
 
 #include <sys/param.h>
 #include <sys/systm.h>
@@ -383,11 +383,12 @@
 }
 
 /*
- * These are few, the high nibble is enough to dispatch.
- * We single out the "f" case to halve the table size.
+ * These are few, the high nibble is usually enough to dispatch.
+ * We single out the `f' case to halve the table size, as
+ * well as the cases in which the high nibble isn't enough.
  */
 static const char *special_opname[8] = {
-       "drain_t", 0, "mb", 0, "fetch", "fetch_m", "rpcc", "rc"
+       "trapb", 0, "mb", 0, "fetch", "fetch_m", "rpcc", "rc"
 };
 
 static __inline const char *special_name __P((int));
@@ -398,7 +399,15 @@
        static char unk[32];
        const char *name;
 
-       name = (op == op_rs) ? "rs" : special_opname[(op)>>13];
+       switch (op) {
+       case op_excb:           name = "excb";          break;
+       case op_wmb:            name = "wmb";           break;
+       case op_ecb:            name = "ecb";           break;
+       case op_rs:             name = "rs";            break;
+       case op_wh64:           name = "wh64";          break;
+       default:
+               name = special_opname[(op)>>13];
+       }
 
        if (name != NULL)
                return (name);
@@ -932,6 +941,10 @@
                        opcode = special_name(code);
 
                        switch (code) {
+                       case op_ecb:
+                               db_printf("%s\t(%s)", opcode,
+                                       register_name(i.mem_format.rb));
+                               break;
                        case op_fetch:
                        case op_fetch_m:
                                db_printf("%s\t0(%s)", opcode,
@@ -943,8 +956,6 @@
                                db_printf("%s\t%s", opcode,
                                        register_name(i.mem_format.ra));
                                break;
-                       case op_draint:
-                       case op_mb:
                        default:
                                db_printf("%s", opcode);
                        break;
diff -r cecd84a95784 -r d563140f0b91 sys/arch/alpha/alpha/db_instruction.h
--- a/sys/arch/alpha/alpha/db_instruction.h     Mon Mar 20 02:19:44 2000 +0000
+++ b/sys/arch/alpha/alpha/db_instruction.h     Mon Mar 20 02:54:45 2000 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: db_instruction.h,v 1.5 1999/05/09 19:38:59 cgd Exp $ */
+/* $NetBSD: db_instruction.h,v 1.6 2000/03/20 02:54:45 thorpej Exp $ */
 
 /*
  * Copyright (c) 1999 Christopher G. Demetriou.  All rights reserved.
@@ -362,13 +362,17 @@
 
                /* SPECIAL, "displacement" opcodes (bits 0..15)  */
 
-#define        op_draint       0x0000
+#define        op_trapb        0x0000
+#define        op_excb         0x0400
 #define        op_mb           0x4000
+#define        op_wmb          0x4400
 #define        op_fetch        0x8000
 #define        op_fetch_m      0xa000
 #define        op_rpcc         0xc000
 #define op_rc          0xe000
+#define        op_ecb          0xe800
 #define        op_rs           0xf000
+#define        op_wh64         0xf800
 
                /* JUMP, "action" opcodes (bits 14..15) */
 



Home | Main Index | Thread Index | Old Index