Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/arm/arm ANSIfy, un-__Pify, and in the case of disas...



details:   https://anonhg.NetBSD.org/src/rev/4f451f5089fe
branches:  trunk
changeset: 502196:4f451f5089fe
user:      bjh21 <bjh21%NetBSD.org@localhost>
date:      Sat Jan 13 16:44:25 2001 +0000

description:
ANSIfy, un-__Pify, and in the case of disassem.c, add an RCSID.

diffstat:

 sys/arch/arm/arm/disassem.c |  51 +++++++++++++++-----------------------------
 sys/arch/arm/arm/disassem.h |  12 +++++-----
 2 files changed, 24 insertions(+), 39 deletions(-)

diffs (146 lines):

diff -r 8bfb9608fbd4 -r 4f451f5089fe sys/arch/arm/arm/disassem.c
--- a/sys/arch/arm/arm/disassem.c       Sat Jan 13 16:42:53 2001 +0000
+++ b/sys/arch/arm/arm/disassem.c       Sat Jan 13 16:44:25 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: disassem.c,v 1.6 2001/01/12 23:33:07 bjh21 Exp $       */
+/*     $NetBSD: disassem.c,v 1.7 2001/01/13 16:44:25 bjh21 Exp $       */
 
 /*
  * Copyright (c) 1996 Mark Brinicombe.
@@ -48,6 +48,9 @@
  */
 
 #include <sys/param.h>
+
+__RCSID("$NetBSD: disassem.c,v 1.7 2001/01/13 16:44:25 bjh21 Exp $");
+
 #include <sys/systm.h>
 #include <arch/arm/arm/disassem.h>
 
@@ -241,20 +244,15 @@
 #define insn_fpaimm(x)         insn_fpaconstants[x & 0x07]
 
 /* Local prototypes */
-static void disasm_register_shift __P((disasm_interface_t *di, u_int insn));
-static void disasm_print_reglist  __P((disasm_interface_t *di, u_int insn));
-static void disasm_insn_ldrstr    __P((disasm_interface_t *di, u_int insn,
-    u_int loc));
-static void disasm_insn_ldcstc    __P((disasm_interface_t *di, u_int insn,
-    u_int loc));
-static u_int disassemble_readword __P((u_int address));
-static void disassemble_printaddr __P((u_int address));
+static void disasm_register_shift(disasm_interface_t *di, u_int insn);
+static void disasm_print_reglist(disasm_interface_t *di, u_int insn);
+static void disasm_insn_ldrstr(disasm_interface_t *di, u_int insn, u_int loc);
+static void disasm_insn_ldcstc(disasm_interface_t *di, u_int insn, u_int loc);
+static u_int disassemble_readword(u_int address);
+static void disassemble_printaddr(u_int address);
 
 vm_offset_t
-disasm(di, loc, altfmt)
-       disasm_interface_t *di;
-       vm_offset_t loc;
-       int altfmt;
+disasm(disasm_interface_t *di, vm_offset_t loc, int altfmt)
 {
        struct arm32_insn *i_ptr = (struct arm32_insn *)&arm32_i;
 
@@ -483,9 +481,7 @@
 
 
 static void
-disasm_register_shift(di, insn)
-       disasm_interface_t *di;
-       u_int insn;
+disasm_register_shift(disasm_interface_t *di, u_int insn)
 {
        di->di_printf("r%d", (insn & 0x0f));
        if ((insn & 0x00000ff0) == 0)
@@ -504,9 +500,7 @@
 
 
 static void
-disasm_print_reglist(di, insn)
-       disasm_interface_t *di;
-       u_int insn;
+disasm_print_reglist(disasm_interface_t *di, u_int insn)
 {
        int loop;
        int start;
@@ -541,10 +535,7 @@
 }
 
 static void
-disasm_insn_ldrstr(di, insn, loc)
-       disasm_interface_t *di;
-       u_int insn;
-       u_int loc;
+disasm_insn_ldrstr(disasm_interface_t *di, u_int insn, u_int loc)
 {
        if ((((insn >> 16) & 0x0f) == 15) && ((insn & (1 << 21)) == 0)
            && ((insn & (1 << 24)) != 0) && ((insn & (1 << 25)) == 0)) {
@@ -570,10 +561,7 @@
 
 
 static void
-disasm_insn_ldcstc(di, insn, loc)
-       disasm_interface_t *di;
-       u_int insn;
-       u_int loc;
+disasm_insn_ldcstc(disasm_interface_t *di, u_int insn, u_int loc)
 {
        if (((insn >> 8) & 0xf) == 1)
                di->di_printf("f%d, ", (insn >> 12) & 0x07);
@@ -597,22 +585,19 @@
 }
 
 static u_int
-disassemble_readword(address)
-       u_int address;
+disassemble_readword(u_int address)
 {
        return(*((u_int *)address));
 }
 
 static void
-disassemble_printaddr(address)
-       u_int address;
+disassemble_printaddr(u_int address)
 {
        printf("0x%08x", address);
 }
 
 void
-disassemble(address)
-       u_int address;
+disassemble(u_int address)
 {
        disasm_interface_t di;
 
diff -r 8bfb9608fbd4 -r 4f451f5089fe sys/arch/arm/arm/disassem.h
--- a/sys/arch/arm/arm/disassem.h       Sat Jan 13 16:42:53 2001 +0000
+++ b/sys/arch/arm/arm/disassem.h       Sat Jan 13 16:44:25 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: disassem.h,v 1.1 2001/01/12 13:43:11 bjh21 Exp $       */
+/*     $NetBSD: disassem.h,v 1.2 2001/01/13 16:44:26 bjh21 Exp $       */
 
 /*
  * Copyright (c) 1997 Mark Brinicombe.
@@ -37,12 +37,12 @@
  */
 
 typedef struct {
-       u_int   (*di_readword) __P((u_int));
-       void    (*di_printaddr) __P((u_int));   
-       void    (*di_printf) __P((const char *, ...));
+       u_int   (*di_readword)(u_int);
+       void    (*di_printaddr)(u_int); 
+       void    (*di_printf)(const char *, ...);
 } disasm_interface_t;
 
 /* Prototypes for callable functions */
 
-vm_offset_t disasm __P((disasm_interface_t *di, vm_offset_t loc, int altfmt));
-void disassemble __P((u_int addr));
+vm_offset_t disasm(disasm_interface_t *, vm_offset_t, int);
+void disassemble(u_int);



Home | Main Index | Thread Index | Old Index