diff options
author | Miod Vallat <miod@cvs.openbsd.org> | 2001-08-26 02:37:08 +0000 |
---|---|---|
committer | Miod Vallat <miod@cvs.openbsd.org> | 2001-08-26 02:37:08 +0000 |
commit | 40fa393c45fd6ea6f962a70da026768f6ad9ffa1 (patch) | |
tree | 69f7cd34483c7a70b31288f975bde4cbc95e5340 /sys/arch/mvme88k/ddb | |
parent | a313e244b1d4ef436b53f164be90abf5f0e7104f (diff) |
Add prototypes, fix compilation warnings, random style fixes.
Diffstat (limited to 'sys/arch/mvme88k/ddb')
-rw-r--r-- | sys/arch/mvme88k/ddb/db_disasm.c | 68 | ||||
-rw-r--r-- | sys/arch/mvme88k/ddb/db_interface.c | 22 |
2 files changed, 64 insertions, 26 deletions
diff --git a/sys/arch/mvme88k/ddb/db_disasm.c b/sys/arch/mvme88k/ddb/db_disasm.c index 1d9c5820afa..343433dfd45 100644 --- a/sys/arch/mvme88k/ddb/db_disasm.c +++ b/sys/arch/mvme88k/ddb/db_disasm.c @@ -1,4 +1,4 @@ -/* $OpenBSD: db_disasm.c,v 1.5 2001/03/08 00:02:17 miod Exp $ */ +/* $OpenBSD: db_disasm.c,v 1.6 2001/08/26 02:37:00 miod Exp $ */ /* * Mach Operating System * Copyright (c) 1993-1991 Carnegie Mellon University @@ -30,10 +30,14 @@ * m88k disassembler for use in ddb */ +#include <sys/types.h> + #include <machine/db_machdep.h> + #include <ddb/db_sym.h> /* DB_STGY_PROC, db_printsym() */ #include <ddb/db_access.h> /* db_get_value() */ #include <ddb/db_output.h> /* db_printf() */ +#include <ddb/db_interface.h> static char *instwidth[4] = { ".d", " ", ".h", ".b" @@ -87,9 +91,27 @@ static char *ctrlreg[64] = { db_printf("0x%X", (x)); \ } while (0) +/* prototypes */ +void oimmed __P((int, char *, long)); +void ctrlregs __P((int, char *, long)); +void printsod __P((int)); +void sindou __P((int, char *, long)); +void jump __P((int, char *, long)); +void instset __P((int, char *, long)); +void symofset __P((int, int, int)); +void obranch __P((int, char *, long)); +void brcond __P((int, char *, long)); +void otrap __P((int, char *, long)); +void obit __P((int, char *, long)); +void bitman __P((int, char *, long)); +void immem __P((int, char *, long)); +void nimmem __P((int, char *, long)); +void lognim __P((int, char *, long)); +void onimmed __P((int, char *, long)); + /* Handlers immediate integer arithmetic instructions */ -static void -oimmed(long inst, char *opcode, long iadr) +void +oimmed(int inst, char *opcode, long iadr) { register int Linst = inst & 0177777; register int Hinst = inst >> 16; @@ -109,8 +131,8 @@ oimmed(long inst, char *opcode, long iadr) /* Handles instructions dealing with control registers */ -static void -ctrlregs(long inst, char *opcode, long iadr) +void +ctrlregs(int inst, char *opcode, long iadr) { register int L6inst = (inst >> 11) & 037; register int creg = (inst >> 5) & 077; @@ -128,7 +150,7 @@ ctrlregs(long inst, char *opcode, long iadr) } -static void +void printsod(int t) { if ( t == 0 ) @@ -138,7 +160,7 @@ printsod(int t) } /* Handles floating point instructions */ -static void +void sindou(int inst, char *opcode, long iadr) { register int rs2 = inst & 037; @@ -166,8 +188,8 @@ sindou(int inst, char *opcode, long iadr) } -static void -jump(long inst, char *opcode, long iadr) +void +jump(int inst, char *opcode, long iadr) { register int rs2 = inst & 037; register int Nbit = ( inst >> 10 ) & 01; @@ -182,8 +204,8 @@ jump(long inst, char *opcode, long iadr) /* Handles ff1, ff0, tbnd and rte instructions */ -static void -instset(long inst, char *opcode, long iadr) +void +instset(int inst, char *opcode, long iadr) { register int rs2 = inst & 037; register int rs1 = ( inst >> 16 ) & 037; @@ -202,7 +224,7 @@ instset(long inst, char *opcode, long iadr) db_printf("\t\tr%-3d,r%-3d",rs1,rs2); } -static void +void symofset(int disp, int bit, int iadr) { long addr; @@ -218,7 +240,7 @@ symofset(int disp, int bit, int iadr) return; } -static void +void obranch(int inst, char *opcode, long iadr) { int cond = ( inst >> 26 ) & 01; @@ -236,7 +258,7 @@ obranch(int inst, char *opcode, long iadr) /* Handles branch on conditions instructions */ -static void +void brcond(int inst, char *opcode, long iadr) { int cond = ( inst >> 26 ) & 1; @@ -265,11 +287,11 @@ brcond(int inst, char *opcode, long iadr) } db_printf("r%-3d,", rs); - symofset(disp,16, iadr); + symofset(disp, 16, iadr); } -static void +void otrap(int inst, char *opcode, long iadr) { int vecno = inst & 0777; @@ -298,7 +320,7 @@ otrap(int inst, char *opcode, long iadr) /* Handles 10 bit immediate bit field operations */ -static void +void obit(int inst, char *opcode, long iadr) { int rs = ( inst >> 16 ) & 037; @@ -323,7 +345,7 @@ obit(int inst, char *opcode, long iadr) /* Handles triadic mode bit field instructions */ -static void +void bitman(int inst, char *opcode, long iadr) { @@ -336,7 +358,7 @@ bitman(int inst, char *opcode, long iadr) /* Handles immediate load/store/exchange instructions */ -static void +void immem(int inst, char *opcode, long iadr) { register int immed = inst & 0xFFFF; @@ -367,7 +389,7 @@ immem(int inst, char *opcode, long iadr) /* Handles triadic mode load/store/exchange instructions */ -static void +void nimmem(int inst, char *opcode, long iadr) { register int scaled = (inst >> 9) & 01; @@ -427,7 +449,7 @@ nimmem(int inst, char *opcode, long iadr) /* Handles triadic mode logical instructions */ -static void +void lognim(int inst, char *opcode, long iadr) { register int rd = (inst >> 21) & 037; @@ -444,7 +466,7 @@ lognim(int inst, char *opcode, long iadr) /* Handles triadic mode arithmetic instructions */ -static void +void onimmed(int inst, char *opcode, long iadr) { register int rd = (inst >> 21) & 037; @@ -481,7 +503,7 @@ onimmed(int inst, char *opcode, long iadr) static struct opdesc { unsigned mask, match; - void (*opfun) (); + void (*opfun) __P((int, char *, long)); char *farg; } opdecode[] = { diff --git a/sys/arch/mvme88k/ddb/db_interface.c b/sys/arch/mvme88k/ddb/db_interface.c index 659e9d1acfc..88b5c18737e 100644 --- a/sys/arch/mvme88k/ddb/db_interface.c +++ b/sys/arch/mvme88k/ddb/db_interface.c @@ -1,4 +1,4 @@ -/* $OpenBSD: db_interface.c,v 1.11 2001/08/24 22:45:42 miod Exp $ */ +/* $OpenBSD: db_interface.c,v 1.12 2001/08/26 02:37:00 miod Exp $ */ /* * Mach Operating System * Copyright (c) 1993-1991 Carnegie Mellon University @@ -67,6 +67,18 @@ void db_putc __P((int c)); int db_getc __P((void)); void cpu_interrupt_to_db __P((int cpu_no)); char *db_task_name __P((void)); +int m88k_dmx_print __P((unsigned, unsigned, unsigned, unsigned)); +void m88k_db_pause __P((unsigned)); +void m88k_db_print_frame __P((db_expr_t, int, db_expr_t, char *)); +void m88k_db_where __P((db_expr_t, int, db_expr_t, char *)); +void m88k_db_frame_search __P((db_expr_t, int, db_expr_t, char *)); +void m88k_db_iflush __P((db_expr_t, int, db_expr_t, char *)); +void m88k_db_dflush __P((db_expr_t, int, db_expr_t, char *)); +void m88k_db_peek __P((db_expr_t, int, db_expr_t, char *)); +void m88k_db_noise __P((db_expr_t, int, db_expr_t, char *)); +void m88k_db_translate __P((db_expr_t, int, db_expr_t, char *)); +void m88k_db_cmmucfg __P((db_expr_t, int, db_expr_t, char *)); +void m88k_db_prom_cmd __P((db_expr_t, int, db_expr_t, char *)); int db_active = 0; int db_noisy = 0; @@ -174,7 +186,7 @@ void m88k_db_print_frame(addr, have_addr, count, modif) db_expr_t addr; int have_addr; - int count; + db_expr_t count; char *modif; { struct m88100_saved_state *s = (struct m88100_saved_state *)addr; @@ -784,7 +796,11 @@ void cpu_interrupt_to_db(cpu_no) } void -m88k_db_prom_cmd(void) +m88k_db_prom_cmd(addr, have_addr, count, modif) + db_expr_t addr; + int have_addr; + db_expr_t count; + char *modif; { doboot(); } |