diff options
author | Andreas Jaeger <aj@suse.de> | 2003-09-14 15:16:57 +0000 |
---|---|---|
committer | Andreas Jaeger <aj@suse.de> | 2003-09-14 15:16:57 +0000 |
commit | 26ca545091edbd761ec3e0ff05e5f2f15fc6f68b (patch) | |
tree | ad04a8c82d951d03555dc11334dee06d8768122f | |
parent | d65b72117eaef86562a56d1460f7209ed45bfb76 (diff) | |
download | gdb-26ca545091edbd761ec3e0ff05e5f2f15fc6f68b.zip gdb-26ca545091edbd761ec3e0ff05e5f2f15fc6f68b.tar.gz gdb-26ca545091edbd761ec3e0ff05e5f2f15fc6f68b.tar.bz2 |
* i386-dis.c: Convert to ISO C90 prototypes.
* i370-dis.c: Likewise.
* i370-opc.c: Likewiwse.
* i960-dis.c: Likewise.
* ia64-opc.c: Likewise.
-rw-r--r-- | opcodes/ChangeLog | 8 | ||||
-rw-r--r-- | opcodes/i370-dis.c | 7 | ||||
-rw-r--r-- | opcodes/i370-opc.c | 122 | ||||
-rw-r--r-- | opcodes/i386-dis.c | 281 | ||||
-rw-r--r-- | opcodes/i960-dis.c | 105 | ||||
-rw-r--r-- | opcodes/ia64-opc.c | 88 |
6 files changed, 231 insertions, 380 deletions
diff --git a/opcodes/ChangeLog b/opcodes/ChangeLog index 8f061c9..9b109a6 100644 --- a/opcodes/ChangeLog +++ b/opcodes/ChangeLog @@ -1,3 +1,11 @@ +2003-09-14 Andreas Jaeger <aj@suse.de> + + * i386-dis.c: Convert to ISO C90 prototypes. + * i370-dis.c: Likewise. + * i370-opc.c: Likewiwse. + * i960-dis.c: Likewise. + * ia64-opc.c: Likewise. + 2003-09-09 Dave Brolley <brolley@redhat.com> * frv-desc.c: Regenerated. diff --git a/opcodes/i370-dis.c b/opcodes/i370-dis.c index 51c0ff1..0f04f27 100644 --- a/opcodes/i370-dis.c +++ b/opcodes/i370-dis.c @@ -1,6 +1,5 @@ - /* i370-dis.c -- Disassemble Instruction 370 (ESA/390) instructions - Copyright 1994, 2000 Free Software Foundation, Inc. + Copyright 1994, 2000, 2003 Free Software Foundation, Inc. PowerPC version written by Ian Lance Taylor, Cygnus Support Rewritten for i370 ESA/390 support by Linas Vepstas <linas@linas.org> @@ -30,9 +29,7 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. * */ int -print_insn_i370 (memaddr, info) - bfd_vma memaddr; - struct disassemble_info *info; +print_insn_i370 (bfd_vma memaddr, struct disassemble_info *info) { bfd_byte buffer[8]; int status; diff --git a/opcodes/i370-opc.c b/opcodes/i370-opc.c index 376dd0e..4ce7994 100644 --- a/opcodes/i370-opc.c +++ b/opcodes/i370-opc.c @@ -1,5 +1,5 @@ /* i370-opc.c -- Instruction 370 (ESA/390) architecture opcode list - Copyright 1994, 1999, 2000, 2001 Free Software Foundation, Inc. + Copyright 1994, 1999, 2000, 2001, 2003 Free Software Foundation, Inc. PowerPC version written by Ian Lance Taylor, Cygnus Support Rewritten for i370 ESA/390 support by Linas Vepstas <linas@linas.org> 1998, 1999 @@ -36,12 +36,12 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA file. */ /* Local insertion and extraction functions. */ -static i370_insn_t insert_ss_b2 PARAMS (( i370_insn_t, long, const char **)); -static i370_insn_t insert_ss_d2 PARAMS (( i370_insn_t, long, const char **)); -static i370_insn_t insert_rxf_r3 PARAMS (( i370_insn_t, long, const char **)); -static long extract_ss_b2 PARAMS (( i370_insn_t, int *)); -static long extract_ss_d2 PARAMS (( i370_insn_t, int *)); -static long extract_rxf_r3 PARAMS (( i370_insn_t, int *)); +static i370_insn_t insert_ss_b2 (i370_insn_t, long, const char **); +static i370_insn_t insert_ss_d2 (i370_insn_t, long, const char **); +static i370_insn_t insert_rxf_r3 (i370_insn_t, long, const char **); +static long extract_ss_b2 (i370_insn_t, int *); +static long extract_ss_d2 (i370_insn_t, int *); +static long extract_rxf_r3 (i370_insn_t, int *); /* The operands table. @@ -231,55 +231,43 @@ const struct i370_operand i370_operands[] = /*ARGSUSED*/ static i370_insn_t -insert_ss_b2 (insn, value, errmsg) - i370_insn_t insn; - long value; - const char **errmsg ATTRIBUTE_UNUSED; +insert_ss_b2 (i370_insn_t insn, long value, + const char **errmsg ATTRIBUTE_UNUSED) { insn.i[1] |= (value & 0xf) << 28; return insn; } static i370_insn_t -insert_ss_d2 (insn, value, errmsg) - i370_insn_t insn; - long value; - const char **errmsg ATTRIBUTE_UNUSED; +insert_ss_d2 (i370_insn_t insn, long value, + const char **errmsg ATTRIBUTE_UNUSED) { insn.i[1] |= (value & 0xfff) << 16; return insn; } static i370_insn_t -insert_rxf_r3 (insn, value, errmsg) - i370_insn_t insn; - long value; - const char **errmsg ATTRIBUTE_UNUSED; +insert_rxf_r3 (i370_insn_t insn, long value, + const char **errmsg ATTRIBUTE_UNUSED) { insn.i[1] |= (value & 0xf) << 28; return insn; } static long -extract_ss_b2 (insn, invalid) - i370_insn_t insn; - int *invalid ATTRIBUTE_UNUSED; +extract_ss_b2 (i370_insn_t insn, int *invalid ATTRIBUTE_UNUSED) { return (insn.i[1] >>28) & 0xf; } static long -extract_ss_d2 (insn, invalid) - i370_insn_t insn; - int *invalid ATTRIBUTE_UNUSED; +extract_ss_d2 (i370_insn_t insn, int *invalid ATTRIBUTE_UNUSED) { return (insn.i[1] >>16) & 0xfff; } static long -extract_rxf_r3 (insn, invalid) - i370_insn_t insn; - int *invalid ATTRIBUTE_UNUSED; +extract_rxf_r3 (i370_insn_t insn, int *invalid ATTRIBUTE_UNUSED) { return (insn.i[1] >>28) & 0xf; } @@ -831,45 +819,45 @@ const struct i370_opcode i370_opcodes[] = { { "xi", 4, {{SI(0x97,0,0,0), 0}}, {{SI_MASK, 0}}, I370, {SI_D1, SI_B1, SI_I2} }, /* S form instructions */ -{ "cfc", 4, {{S(0xb21a,0,0), 0}}, {{S_MASK, 0}}, IXA, {S_D2, S_B2} }, -{ "csch", 4, {{S(0xb230,0,0), 0}}, {{S_MASK, 0}}, IXA, {0} }, -{ "hsch", 4, {{S(0xb231,0,0), 0}}, {{S_MASK, 0}}, IXA, {0} }, -{ "ipk", 4, {{S(0xb20b,0,0), 0}}, {{S_MASK, 0}}, IXA, {0} }, -{ "lfpc", 4, {{S(0xb29d,0,0), 0}}, {{S_MASK, 0}}, IBF, {S_D2, S_B2} }, -{ "lpsw", 4, {{S(0x8200,0,0), 0}}, {{S_MASK, 0}}, I370, {S_D2, S_B2} }, -{ "msch", 4, {{S(0xb232,0,0), 0}}, {{S_MASK, 0}}, IXA, {S_D2, S_B2} }, -{ "pc", 4, {{S(0xb218,0,0), 0}}, {{S_MASK, 0}}, IXA, {S_D2, S_B2} }, -{ "pcf", 4, {{S(0xb218,0,0), 0}}, {{S_MASK, 0}}, IPC, {S_D2, S_B2} }, -{ "ptlb", 4, {{S(0xb20d,0,0), 0}}, {{S_MASK, 0}}, IXA, {0} }, -{ "rchp", 4, {{S(0xb23b,0,0), 0}}, {{S_MASK, 0}}, IXA, {0} }, -{ "rp", 4, {{S(0xb277,0,0), 0}}, {{S_MASK, 0}}, IRP, {0} }, -{ "rsch", 4, {{S(0xb238,0,0), 0}}, {{S_MASK, 0}}, IXA, {0} }, -{ "sac", 4, {{S(0xb219,0,0), 0}}, {{S_MASK, 0}}, IXA, {S_D2, S_B2} }, -{ "sacf", 4, {{S(0xb279,0,0), 0}}, {{S_MASK, 0}}, ISA, {S_D2, S_B2} }, -{ "sal", 4, {{S(0xb237,0,0), 0}}, {{S_MASK, 0}}, IXA, {0} }, -{ "schm", 4, {{S(0xb23c,0,0), 0}}, {{S_MASK, 0}}, IXA, {0} }, -{ "sck", 4, {{S(0xb204,0,0), 0}}, {{S_MASK, 0}}, I370, {S_D2, S_B2} }, -{ "sckc", 4, {{S(0xb206,0,0), 0}}, {{S_MASK, 0}}, IXA, {S_D2, S_B2} }, -{ "spka", 4, {{S(0xb20a,0,0), 0}}, {{S_MASK, 0}}, IXA, {S_D2, S_B2} }, -{ "spt", 4, {{S(0xb208,0,0), 0}}, {{S_MASK, 0}}, IXA, {S_D2, S_B2} }, -{ "spx", 4, {{S(0xb210,0,0), 0}}, {{S_MASK, 0}}, IXA, {S_D2, S_B2} }, -{ "srnm", 4, {{S(0xb299,0,0), 0}}, {{S_MASK, 0}}, IBF, {S_D2, S_B2} }, -{ "ssch", 4, {{S(0xb233,0,0), 0}}, {{S_MASK, 0}}, IXA, {S_D2, S_B2} }, -{ "ssm", 4, {{S(0x8000,0,0), 0}}, {{S_MASK, 0}}, I370, {S_D2, S_B2} }, -{ "stap", 4, {{S(0xb212,0,0), 0}}, {{S_MASK, 0}}, IXA, {S_D2, S_B2} }, -{ "stck", 4, {{S(0xb205,0,0), 0}}, {{S_MASK, 0}}, IXA, {S_D2, S_B2} }, -{ "stckc", 4, {{S(0xb207,0,0), 0}}, {{S_MASK, 0}}, I370, {S_D2, S_B2} }, -{ "stcps", 4, {{S(0xb23a,0,0), 0}}, {{S_MASK, 0}}, IXA, {S_D2, S_B2} }, -{ "stcrw", 4, {{S(0xb239,0,0), 0}}, {{S_MASK, 0}}, IXA, {S_D2, S_B2} }, -{ "stfpc", 4, {{S(0xb29c,0,0), 0}}, {{S_MASK, 0}}, IBF, {S_D2, S_B2} }, -{ "stidp", 4, {{S(0xb202,0,0), 0}}, {{S_MASK, 0}}, I370, {S_D2, S_B2} }, -{ "stpt", 4, {{S(0xb209,0,0), 0}}, {{S_MASK, 0}}, IXA, {S_D2, S_B2} }, -{ "stpx", 4, {{S(0xb211,0,0), 0}}, {{S_MASK, 0}}, IXA, {S_D2, S_B2} }, -{ "stsch", 4, {{S(0xb234,0,0), 0}}, {{S_MASK, 0}}, IXA, {S_D2, S_B2} }, -{ "tpi", 4, {{S(0xb236,0,0), 0}}, {{S_MASK, 0}}, IXA, {S_D2, S_B2} }, -{ "trap4", 4, {{S(0xb2ff,0,0), 0}}, {{S_MASK, 0}}, ITR, {S_D2, S_B2} }, -{ "ts", 4, {{S(0x9300,0,0), 0}}, {{S_MASK, 0}}, I370, {S_D2, S_B2} }, -{ "tsch", 4, {{S(0xb235,0,0), 0}}, {{S_MASK, 0}}, IXA, {S_D2, S_B2} }, +{ "cfc", 4, {{S(0xb21a,0,0), 0}}, {{S_MASK, 0}}, IXA, {S_D2, S_B2} }, +{ "csch", 4, {{S(0xb230,0,0), 0}}, {{S_MASK, 0}}, IXA, {0} }, +{ "hsch", 4, {{S(0xb231,0,0), 0}}, {{S_MASK, 0}}, IXA, {0} }, +{ "ipk", 4, {{S(0xb20b,0,0), 0}}, {{S_MASK, 0}}, IXA, {0} }, +{ "lfpc", 4, {{S(0xb29d,0,0), 0}}, {{S_MASK, 0}}, IBF, {S_D2, S_B2} }, +{ "lpsw", 4, {{S(0x8200,0,0), 0}}, {{S_MASK, 0}}, I370, {S_D2, S_B2} }, +{ "msch", 4, {{S(0xb232,0,0), 0}}, {{S_MASK, 0}}, IXA, {S_D2, S_B2} }, +{ "pc", 4, {{S(0xb218,0,0), 0}}, {{S_MASK, 0}}, IXA, {S_D2, S_B2} }, +{ "pcf", 4, {{S(0xb218,0,0), 0}}, {{S_MASK, 0}}, IPC, {S_D2, S_B2} }, +{ "ptlb", 4, {{S(0xb20d,0,0), 0}}, {{S_MASK, 0}}, IXA, {0} }, +{ "rchp", 4, {{S(0xb23b,0,0), 0}}, {{S_MASK, 0}}, IXA, {0} }, +{ "rp", 4, {{S(0xb277,0,0), 0}}, {{S_MASK, 0}}, IRP, {0} }, +{ "rsch", 4, {{S(0xb238,0,0), 0}}, {{S_MASK, 0}}, IXA, {0} }, +{ "sac", 4, {{S(0xb219,0,0), 0}}, {{S_MASK, 0}}, IXA, {S_D2, S_B2} }, +{ "sacf", 4, {{S(0xb279,0,0), 0}}, {{S_MASK, 0}}, ISA, {S_D2, S_B2} }, +{ "sal", 4, {{S(0xb237,0,0), 0}}, {{S_MASK, 0}}, IXA, {0} }, +{ "schm", 4, {{S(0xb23c,0,0), 0}}, {{S_MASK, 0}}, IXA, {0} }, +{ "sck", 4, {{S(0xb204,0,0), 0}}, {{S_MASK, 0}}, I370, {S_D2, S_B2} }, +{ "sckc", 4, {{S(0xb206,0,0), 0}}, {{S_MASK, 0}}, IXA, {S_D2, S_B2} }, +{ "spka", 4, {{S(0xb20a,0,0), 0}}, {{S_MASK, 0}}, IXA, {S_D2, S_B2} }, +{ "spt", 4, {{S(0xb208,0,0), 0}}, {{S_MASK, 0}}, IXA, {S_D2, S_B2} }, +{ "spx", 4, {{S(0xb210,0,0), 0}}, {{S_MASK, 0}}, IXA, {S_D2, S_B2} }, +{ "srnm", 4, {{S(0xb299,0,0), 0}}, {{S_MASK, 0}}, IBF, {S_D2, S_B2} }, +{ "ssch", 4, {{S(0xb233,0,0), 0}}, {{S_MASK, 0}}, IXA, {S_D2, S_B2} }, +{ "ssm", 4, {{S(0x8000,0,0), 0}}, {{S_MASK, 0}}, I370, {S_D2, S_B2} }, +{ "stap", 4, {{S(0xb212,0,0), 0}}, {{S_MASK, 0}}, IXA, {S_D2, S_B2} }, +{ "stck", 4, {{S(0xb205,0,0), 0}}, {{S_MASK, 0}}, IXA, {S_D2, S_B2} }, +{ "stckc", 4, {{S(0xb207,0,0), 0}}, {{S_MASK, 0}}, I370, {S_D2, S_B2} }, +{ "stcps", 4, {{S(0xb23a,0,0), 0}}, {{S_MASK, 0}}, IXA, {S_D2, S_B2} }, +{ "stcrw", 4, {{S(0xb239,0,0), 0}}, {{S_MASK, 0}}, IXA, {S_D2, S_B2} }, +{ "stfpc", 4, {{S(0xb29c,0,0), 0}}, {{S_MASK, 0}}, IBF, {S_D2, S_B2} }, +{ "stidp", 4, {{S(0xb202,0,0), 0}}, {{S_MASK, 0}}, I370, {S_D2, S_B2} }, +{ "stpt", 4, {{S(0xb209,0,0), 0}}, {{S_MASK, 0}}, IXA, {S_D2, S_B2} }, +{ "stpx", 4, {{S(0xb211,0,0), 0}}, {{S_MASK, 0}}, IXA, {S_D2, S_B2} }, +{ "stsch", 4, {{S(0xb234,0,0), 0}}, {{S_MASK, 0}}, IXA, {S_D2, S_B2} }, +{ "tpi", 4, {{S(0xb236,0,0), 0}}, {{S_MASK, 0}}, IXA, {S_D2, S_B2} }, +{ "trap4", 4, {{S(0xb2ff,0,0), 0}}, {{S_MASK, 0}}, ITR, {S_D2, S_B2} }, +{ "ts", 4, {{S(0x9300,0,0), 0}}, {{S_MASK, 0}}, I370, {S_D2, S_B2} }, +{ "tsch", 4, {{S(0xb235,0,0), 0}}, {{S_MASK, 0}}, IXA, {S_D2, S_B2} }, /* SS form instructions */ { "ap", 6, {{SSH(0xfa,0,0,0), 0}}, {{SS_MASK, 0}}, I370, {SS_D1,SS_L,SS_B1,SS_D2,SS_B2} }, diff --git a/opcodes/i386-dis.c b/opcodes/i386-dis.c index 7c03205..0ef57ef 100644 --- a/opcodes/i386-dis.c +++ b/opcodes/i386-dis.c @@ -48,53 +48,53 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #define UNIXWARE_COMPAT 1 #endif -static int fetch_data PARAMS ((struct disassemble_info *, bfd_byte *)); -static void ckprefix PARAMS ((void)); -static const char *prefix_name PARAMS ((int, int)); -static int print_insn PARAMS ((bfd_vma, disassemble_info *)); -static void dofloat PARAMS ((int)); -static void OP_ST PARAMS ((int, int)); -static void OP_STi PARAMS ((int, int)); -static int putop PARAMS ((const char *, int)); -static void oappend PARAMS ((const char *)); -static void append_seg PARAMS ((void)); -static void OP_indirE PARAMS ((int, int)); -static void print_operand_value PARAMS ((char *, int, bfd_vma)); -static void OP_E PARAMS ((int, int)); -static void OP_G PARAMS ((int, int)); -static bfd_vma get64 PARAMS ((void)); -static bfd_signed_vma get32 PARAMS ((void)); -static bfd_signed_vma get32s PARAMS ((void)); -static int get16 PARAMS ((void)); -static void set_op PARAMS ((bfd_vma, int)); -static void OP_REG PARAMS ((int, int)); -static void OP_IMREG PARAMS ((int, int)); -static void OP_I PARAMS ((int, int)); -static void OP_I64 PARAMS ((int, int)); -static void OP_sI PARAMS ((int, int)); -static void OP_J PARAMS ((int, int)); -static void OP_SEG PARAMS ((int, int)); -static void OP_DIR PARAMS ((int, int)); -static void OP_OFF PARAMS ((int, int)); -static void OP_OFF64 PARAMS ((int, int)); -static void ptr_reg PARAMS ((int, int)); -static void OP_ESreg PARAMS ((int, int)); -static void OP_DSreg PARAMS ((int, int)); -static void OP_C PARAMS ((int, int)); -static void OP_D PARAMS ((int, int)); -static void OP_T PARAMS ((int, int)); -static void OP_Rd PARAMS ((int, int)); -static void OP_MMX PARAMS ((int, int)); -static void OP_XMM PARAMS ((int, int)); -static void OP_EM PARAMS ((int, int)); -static void OP_EX PARAMS ((int, int)); -static void OP_MS PARAMS ((int, int)); -static void OP_XS PARAMS ((int, int)); -static void OP_3DNowSuffix PARAMS ((int, int)); -static void OP_SIMD_Suffix PARAMS ((int, int)); -static void SIMD_Fixup PARAMS ((int, int)); -static void PNI_Fixup PARAMS ((int, int)); -static void BadOp PARAMS ((void)); +static int fetch_data (struct disassemble_info *, bfd_byte *); +static void ckprefix (void); +static const char *prefix_name (int, int); +static int print_insn (bfd_vma, disassemble_info *); +static void dofloat (int); +static void OP_ST (int, int); +static void OP_STi (int, int); +static int putop (const char *, int); +static void oappend (const char *); +static void append_seg (void); +static void OP_indirE (int, int); +static void print_operand_value (char *, int, bfd_vma); +static void OP_E (int, int); +static void OP_G (int, int); +static bfd_vma get64 (void); +static bfd_signed_vma get32 (void); +static bfd_signed_vma get32s (void); +static int get16 (void); +static void set_op (bfd_vma, int); +static void OP_REG (int, int); +static void OP_IMREG (int, int); +static void OP_I (int, int); +static void OP_I64 (int, int); +static void OP_sI (int, int); +static void OP_J (int, int); +static void OP_SEG (int, int); +static void OP_DIR (int, int); +static void OP_OFF (int, int); +static void OP_OFF64 (int, int); +static void ptr_reg (int, int); +static void OP_ESreg (int, int); +static void OP_DSreg (int, int); +static void OP_C (int, int); +static void OP_D (int, int); +static void OP_T (int, int); +static void OP_Rd (int, int); +static void OP_MMX (int, int); +static void OP_XMM (int, int); +static void OP_EM (int, int); +static void OP_EX (int, int); +static void OP_MS (int, int); +static void OP_XS (int, int); +static void OP_3DNowSuffix (int, int); +static void OP_SIMD_Suffix (int, int); +static void SIMD_Fixup (int, int); +static void PNI_Fixup (int, int); +static void BadOp (void); struct dis_private { /* Points to first byte not fetched. */ @@ -161,9 +161,7 @@ static int used_prefixes; ? 1 : fetch_data ((info), (addr))) static int -fetch_data (info, addr) - struct disassemble_info *info; - bfd_byte *addr; +fetch_data (struct disassemble_info *info, bfd_byte *addr) { int status; struct dis_private *priv = (struct dis_private *) info->private_data; @@ -427,7 +425,7 @@ fetch_data (info, addr) #define X86_64_0 NULL, NULL, X86_64_SPECIAL, NULL, 0, NULL, 0 -typedef void (*op_rtn) PARAMS ((int bytemode, int sizeflag)); +typedef void (*op_rtn) (int bytemode, int sizeflag); struct dis386 { const char *name; @@ -1699,7 +1697,7 @@ static const struct dis386 x86_64_table[][2] = { #define INTERNAL_DISASSEMBLER_ERROR _("<internal disassembler error>") static void -ckprefix () +ckprefix (void) { int newrex; rex = 0; @@ -1797,9 +1795,7 @@ ckprefix () prefix byte. */ static const char * -prefix_name (pref, sizeflag) - int pref; - int sizeflag; +prefix_name (int pref, int sizeflag) { switch (pref) { @@ -1893,9 +1889,7 @@ static char scale_char; print_insn_i386_att and print_insn_i386_intel these functions can disappear, and print_insn_i386 be merged into print_insn. */ int -print_insn_i386_att (pc, info) - bfd_vma pc; - disassemble_info *info; +print_insn_i386_att (bfd_vma pc, disassemble_info *info) { intel_syntax = 0; @@ -1903,9 +1897,7 @@ print_insn_i386_att (pc, info) } int -print_insn_i386_intel (pc, info) - bfd_vma pc; - disassemble_info *info; +print_insn_i386_intel (bfd_vma pc, disassemble_info *info) { intel_syntax = 1; @@ -1913,9 +1905,7 @@ print_insn_i386_intel (pc, info) } int -print_insn_i386 (pc, info) - bfd_vma pc; - disassemble_info *info; +print_insn_i386 (bfd_vma pc, disassemble_info *info) { intel_syntax = -1; @@ -1923,9 +1913,7 @@ print_insn_i386 (pc, info) } static int -print_insn (pc, info) - bfd_vma pc; - disassemble_info *info; +print_insn (bfd_vma pc, disassemble_info *info) { const struct dis386 *dp; int i; @@ -2034,7 +2022,7 @@ print_insn (pc, info) puts most long word instructions on a single line. */ info->bytes_per_line = 7; - info->private_data = (PTR) &priv; + info->private_data = &priv; priv.max_fetched = priv.the_buffer; priv.insn_start = pc; @@ -2555,8 +2543,7 @@ static char *fgrps[][8] = { }; static void -dofloat (sizeflag) - int sizeflag; +dofloat (int sizeflag) { const struct dis386 *dp; unsigned char floatop; @@ -2602,17 +2589,13 @@ dofloat (sizeflag) } static void -OP_ST (bytemode, sizeflag) - int bytemode ATTRIBUTE_UNUSED; - int sizeflag ATTRIBUTE_UNUSED; +OP_ST (int bytemode ATTRIBUTE_UNUSED, int sizeflag ATTRIBUTE_UNUSED) { oappend ("%st"); } static void -OP_STi (bytemode, sizeflag) - int bytemode ATTRIBUTE_UNUSED; - int sizeflag ATTRIBUTE_UNUSED; +OP_STi (int bytemode ATTRIBUTE_UNUSED, int sizeflag ATTRIBUTE_UNUSED) { sprintf (scratchbuf, "%%st(%d)", rm); oappend (scratchbuf + intel_syntax); @@ -2620,9 +2603,7 @@ OP_STi (bytemode, sizeflag) /* Capital letters in template are macros. */ static int -putop (template, sizeflag) - const char *template; - int sizeflag; +putop (const char *template, int sizeflag) { const char *p; int alt; @@ -2895,15 +2876,14 @@ putop (template, sizeflag) } static void -oappend (s) - const char *s; +oappend (const char *s) { strcpy (obufp, s); obufp += strlen (s); } static void -append_seg () +append_seg (void) { if (prefixes & PREFIX_CS) { @@ -2938,9 +2918,7 @@ append_seg () } static void -OP_indirE (bytemode, sizeflag) - int bytemode; - int sizeflag; +OP_indirE (int bytemode, int sizeflag) { if (!intel_syntax) oappend ("*"); @@ -2948,10 +2926,7 @@ OP_indirE (bytemode, sizeflag) } static void -print_operand_value (buf, hex, disp) - char *buf; - int hex; - bfd_vma disp; +print_operand_value (char *buf, int hex, bfd_vma disp) { if (mode_64bit) { @@ -3008,9 +2983,7 @@ print_operand_value (buf, hex, disp) } static void -OP_E (bytemode, sizeflag) - int bytemode; - int sizeflag; +OP_E (int bytemode, int sizeflag) { bfd_vma disp; int add = 0; @@ -3293,9 +3266,7 @@ OP_E (bytemode, sizeflag) } static void -OP_G (bytemode, sizeflag) - int bytemode; - int sizeflag; +OP_G (int bytemode, int sizeflag) { int add = 0; USED_REX (REX_EXTX); @@ -3336,7 +3307,7 @@ OP_G (bytemode, sizeflag) } static bfd_vma -get64 () +get64 (void) { bfd_vma x; #ifdef BFD64 @@ -3361,7 +3332,7 @@ get64 () } static bfd_signed_vma -get32 () +get32 (void) { bfd_signed_vma x = 0; @@ -3374,7 +3345,7 @@ get32 () } static bfd_signed_vma -get32s () +get32s (void) { bfd_signed_vma x = 0; @@ -3390,7 +3361,7 @@ get32s () } static int -get16 () +get16 (void) { int x = 0; @@ -3401,9 +3372,7 @@ get16 () } static void -set_op (op, riprel) - bfd_vma op; - int riprel; +set_op (bfd_vma op, int riprel) { op_index[op_ad] = op_ad; if (mode_64bit) @@ -3420,9 +3389,7 @@ set_op (op, riprel) } static void -OP_REG (code, sizeflag) - int code; - int sizeflag; +OP_REG (int code, int sizeflag) { const char *s; int add = 0; @@ -3482,9 +3449,7 @@ OP_REG (code, sizeflag) } static void -OP_IMREG (code, sizeflag) - int code; - int sizeflag; +OP_IMREG (int code, int sizeflag) { const char *s; @@ -3531,9 +3496,7 @@ OP_IMREG (code, sizeflag) } static void -OP_I (bytemode, sizeflag) - int bytemode; - int sizeflag; +OP_I (int bytemode, int sizeflag) { bfd_signed_vma op; bfd_signed_vma mask = -1; @@ -3585,9 +3548,7 @@ OP_I (bytemode, sizeflag) } static void -OP_I64 (bytemode, sizeflag) - int bytemode; - int sizeflag; +OP_I64 (int bytemode, int sizeflag) { bfd_signed_vma op; bfd_signed_vma mask = -1; @@ -3638,9 +3599,7 @@ OP_I64 (bytemode, sizeflag) } static void -OP_sI (bytemode, sizeflag) - int bytemode; - int sizeflag; +OP_sI (int bytemode, int sizeflag) { bfd_signed_vma op; bfd_signed_vma mask = -1; @@ -3689,9 +3648,7 @@ OP_sI (bytemode, sizeflag) } static void -OP_J (bytemode, sizeflag) - int bytemode; - int sizeflag; +OP_J (int bytemode, int sizeflag) { bfd_vma disp; bfd_vma mask = -1; @@ -3727,17 +3684,13 @@ OP_J (bytemode, sizeflag) } static void -OP_SEG (dummy, sizeflag) - int dummy ATTRIBUTE_UNUSED; - int sizeflag ATTRIBUTE_UNUSED; +OP_SEG (int dummy ATTRIBUTE_UNUSED, int sizeflag ATTRIBUTE_UNUSED) { oappend (names_seg[reg]); } static void -OP_DIR (dummy, sizeflag) - int dummy ATTRIBUTE_UNUSED; - int sizeflag; +OP_DIR (int dummy ATTRIBUTE_UNUSED, int sizeflag) { int seg, offset; @@ -3760,9 +3713,7 @@ OP_DIR (dummy, sizeflag) } static void -OP_OFF (bytemode, sizeflag) - int bytemode ATTRIBUTE_UNUSED; - int sizeflag; +OP_OFF (int bytemode ATTRIBUTE_UNUSED, int sizeflag) { bfd_vma off; @@ -3787,9 +3738,7 @@ OP_OFF (bytemode, sizeflag) } static void -OP_OFF64 (bytemode, sizeflag) - int bytemode ATTRIBUTE_UNUSED; - int sizeflag ATTRIBUTE_UNUSED; +OP_OFF64 (int bytemode ATTRIBUTE_UNUSED, int sizeflag ATTRIBUTE_UNUSED) { bfd_vma off; @@ -3817,9 +3766,7 @@ OP_OFF64 (bytemode, sizeflag) } static void -ptr_reg (code, sizeflag) - int code; - int sizeflag; +ptr_reg (int code, int sizeflag) { const char *s; if (intel_syntax) @@ -3847,18 +3794,14 @@ ptr_reg (code, sizeflag) } static void -OP_ESreg (code, sizeflag) - int code; - int sizeflag; +OP_ESreg (int code, int sizeflag) { oappend ("%es:" + intel_syntax); ptr_reg (code, sizeflag); } static void -OP_DSreg (code, sizeflag) - int code; - int sizeflag; +OP_DSreg (int code, int sizeflag) { if ((prefixes & (PREFIX_CS @@ -3873,9 +3816,7 @@ OP_DSreg (code, sizeflag) } static void -OP_C (dummy, sizeflag) - int dummy ATTRIBUTE_UNUSED; - int sizeflag ATTRIBUTE_UNUSED; +OP_C (int dummy ATTRIBUTE_UNUSED, int sizeflag ATTRIBUTE_UNUSED) { int add = 0; USED_REX (REX_EXTX); @@ -3886,9 +3827,7 @@ OP_C (dummy, sizeflag) } static void -OP_D (dummy, sizeflag) - int dummy ATTRIBUTE_UNUSED; - int sizeflag ATTRIBUTE_UNUSED; +OP_D (int dummy ATTRIBUTE_UNUSED, int sizeflag ATTRIBUTE_UNUSED) { int add = 0; USED_REX (REX_EXTX); @@ -3902,18 +3841,14 @@ OP_D (dummy, sizeflag) } static void -OP_T (dummy, sizeflag) - int dummy ATTRIBUTE_UNUSED; - int sizeflag ATTRIBUTE_UNUSED; +OP_T (int dummy ATTRIBUTE_UNUSED, int sizeflag ATTRIBUTE_UNUSED) { sprintf (scratchbuf, "%%tr%d", reg); oappend (scratchbuf + intel_syntax); } static void -OP_Rd (bytemode, sizeflag) - int bytemode; - int sizeflag; +OP_Rd (int bytemode, int sizeflag) { if (mod == 3) OP_E (bytemode, sizeflag); @@ -3922,9 +3857,7 @@ OP_Rd (bytemode, sizeflag) } static void -OP_MMX (bytemode, sizeflag) - int bytemode ATTRIBUTE_UNUSED; - int sizeflag ATTRIBUTE_UNUSED; +OP_MMX (int bytemode ATTRIBUTE_UNUSED, int sizeflag ATTRIBUTE_UNUSED) { int add = 0; USED_REX (REX_EXTX); @@ -3939,9 +3872,7 @@ OP_MMX (bytemode, sizeflag) } static void -OP_XMM (bytemode, sizeflag) - int bytemode ATTRIBUTE_UNUSED; - int sizeflag ATTRIBUTE_UNUSED; +OP_XMM (int bytemode ATTRIBUTE_UNUSED, int sizeflag ATTRIBUTE_UNUSED) { int add = 0; USED_REX (REX_EXTX); @@ -3952,9 +3883,7 @@ OP_XMM (bytemode, sizeflag) } static void -OP_EM (bytemode, sizeflag) - int bytemode; - int sizeflag; +OP_EM (int bytemode, int sizeflag) { int add = 0; if (mod != 3) @@ -3978,9 +3907,7 @@ OP_EM (bytemode, sizeflag) } static void -OP_EX (bytemode, sizeflag) - int bytemode; - int sizeflag; +OP_EX (int bytemode, int sizeflag) { int add = 0; if (mod != 3) @@ -4000,9 +3927,7 @@ OP_EX (bytemode, sizeflag) } static void -OP_MS (bytemode, sizeflag) - int bytemode; - int sizeflag; +OP_MS (int bytemode, int sizeflag) { if (mod == 3) OP_EM (bytemode, sizeflag); @@ -4011,9 +3936,7 @@ OP_MS (bytemode, sizeflag) } static void -OP_XS (bytemode, sizeflag) - int bytemode; - int sizeflag; +OP_XS (int bytemode, int sizeflag) { if (mod == 3) OP_EX (bytemode, sizeflag); @@ -4089,9 +4012,7 @@ static const char *const Suffix3DNow[] = { }; static void -OP_3DNowSuffix (bytemode, sizeflag) - int bytemode ATTRIBUTE_UNUSED; - int sizeflag ATTRIBUTE_UNUSED; +OP_3DNowSuffix (int bytemode ATTRIBUTE_UNUSED, int sizeflag ATTRIBUTE_UNUSED) { const char *mnemonic; @@ -4127,9 +4048,7 @@ static const char *simd_cmp_op[] = { }; static void -OP_SIMD_Suffix (bytemode, sizeflag) - int bytemode ATTRIBUTE_UNUSED; - int sizeflag ATTRIBUTE_UNUSED; +OP_SIMD_Suffix (int bytemode ATTRIBUTE_UNUSED, int sizeflag ATTRIBUTE_UNUSED) { unsigned int cmp_type; @@ -4169,9 +4088,7 @@ OP_SIMD_Suffix (bytemode, sizeflag) } static void -SIMD_Fixup (extrachar, sizeflag) - int extrachar; - int sizeflag ATTRIBUTE_UNUSED; +SIMD_Fixup (int extrachar, int sizeflag ATTRIBUTE_UNUSED) { /* Change movlps/movhps to movhlps/movlhps for 2 register operand forms of these instructions. */ @@ -4187,9 +4104,7 @@ SIMD_Fixup (extrachar, sizeflag) } static void -PNI_Fixup (extrachar, sizeflag) - int extrachar ATTRIBUTE_UNUSED; - int sizeflag ATTRIBUTE_UNUSED; +PNI_Fixup (int extrachar ATTRIBUTE_UNUSED, int sizeflag ATTRIBUTE_UNUSED) { if (mod == 3 && reg == 1) { diff --git a/opcodes/i960-dis.c b/opcodes/i960-dis.c index 9210d02..fa6f188 100644 --- a/opcodes/i960-dis.c +++ b/opcodes/i960-dis.c @@ -1,5 +1,5 @@ /* Disassemble i80960 instructions. - Copyright 1990, 1991, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001 + Copyright 1990, 1991, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2003 Free Software Foundation, Inc. This program is free software; you can redistribute it and/or modify @@ -31,26 +31,24 @@ static const char *const reg_names[] = { static FILE *stream; /* Output goes here */ static struct disassemble_info *info; -static void print_addr PARAMS ((bfd_vma)); -static void ctrl PARAMS ((bfd_vma, unsigned long, unsigned long)); -static void cobr PARAMS ((bfd_vma, unsigned long, unsigned long)); -static void reg PARAMS ((unsigned long)); -static int mem PARAMS ((bfd_vma, unsigned long, unsigned long, int)); -static void ea PARAMS ((bfd_vma, int, const char *, const char *, int, unsigned int)); -static void dstop PARAMS ((int, int, int)); -static void regop PARAMS ((int, int, int, int)); -static void invalid PARAMS ((int)); -static int pinsn PARAMS ((bfd_vma, unsigned long, unsigned long)); -static void put_abs PARAMS ((unsigned long, unsigned long)); +static void print_addr (bfd_vma); +static void ctrl (bfd_vma, unsigned long, unsigned long); +static void cobr (bfd_vma, unsigned long, unsigned long); +static void reg (unsigned long); +static int mem (bfd_vma, unsigned long, unsigned long, int); +static void ea (bfd_vma, int, const char *, const char *, int, unsigned int); +static void dstop (int, int, int); +static void regop (int, int, int, int); +static void invalid (int); +static int pinsn (bfd_vma, unsigned long, unsigned long); +static void put_abs (unsigned long, unsigned long); /* Print the i960 instruction at address 'memaddr' in debugged memory, on INFO->STREAM. Returns length of the instruction, in bytes. */ int -print_insn_i960 (memaddr, info_arg) - bfd_vma memaddr; - struct disassemble_info *info_arg; +print_insn_i960 (bfd_vma memaddr, struct disassemble_info *info_arg) { unsigned int word1, word2 = 0xdeadbeef; bfd_byte buffer[8]; @@ -118,12 +116,10 @@ struct sparse_tabent { }; static int -pinsn (memaddr, word1, word2) - bfd_vma memaddr; - unsigned long word1, word2; +pinsn (bfd_vma memaddr, unsigned long word1, unsigned long word2) { int instr_len; - + instr_len = 4; put_abs (word1, word2); @@ -161,10 +157,7 @@ pinsn (memaddr, word1, word2) /* CTRL format.. */ static void -ctrl (memaddr, word1, word2) - bfd_vma memaddr; - unsigned long word1; - unsigned long word2 ATTRIBUTE_UNUSED; +ctrl (bfd_vma memaddr, unsigned long word1, unsigned long word2 ATTRIBUTE_UNUSED) { int i; static const struct tabent ctrl_tab[] = { @@ -233,15 +226,12 @@ ctrl (memaddr, word1, word2) /* COBR format. */ static void -cobr (memaddr, word1, word2) - bfd_vma memaddr; - unsigned long word1; - unsigned long word2 ATTRIBUTE_UNUSED; +cobr (bfd_vma memaddr, unsigned long word1, unsigned long word2 ATTRIBUTE_UNUSED) { int src1; int src2; int i; - + static const struct tabent cobr_tab[] = { { "testno", 1, }, /* 0x20 */ { "testg", 1, }, /* 0x21 */ @@ -324,18 +314,14 @@ cobr (memaddr, word1, word2) /* Returns instruction length: 4 or 8. */ static int -mem (memaddr, word1, word2, noprint) - bfd_vma memaddr; - unsigned long word1, word2; - int noprint; /* If TRUE, return instruction length, but - don't output any text. */ +mem (bfd_vma memaddr, unsigned long word1, unsigned long word2, int noprint) { int i, j; int len; int mode; int offset; const char *reg1, *reg2, *reg3; - + /* This lookup table is too sparse to make it worth typing in, but not so large as to make a sparse array necessary. We create the table at runtime. */ @@ -395,7 +381,7 @@ mem (memaddr, word1, word2, noprint) && ((mode == 5) || (mode >= 12))) /* With 32-bit displacement. */ len = 8; - else + else len = 4; if (noprint) @@ -426,7 +412,7 @@ mem (memaddr, word1, word2, noprint) { /* MEMA FORMAT */ (*info->fprintf_func) (stream, "0x%x", (unsigned) offset); - if (mode & 8) + if (mode & 8) (*info->fprintf_func) (stream, "(%s)", reg2); (*info->fprintf_func)(stream, ",%s", reg1); @@ -445,7 +431,7 @@ mem (memaddr, word1, word2, noprint) /* MEMA FORMAT */ (*info->fprintf_func) (stream, "%s,0x%x", reg1, (unsigned) offset); - if (mode & 8) + if (mode & 8) (*info->fprintf_func) (stream, "(%s)", reg2); } break; @@ -472,8 +458,7 @@ mem (memaddr, word1, word2, noprint) /* REG format. */ static void -reg (word1) - unsigned long word1; +reg (unsigned long word1) { int i, j; int opcode; @@ -488,14 +473,14 @@ reg (word1) at runtime. */ /* NOTE: In this table, the meaning of 'numops' is: - 1: single operand, which is NOT a destination. - -1: single operand, which IS a destination. - 2: 2 operands, the 2nd of which is NOT a destination. - -2: 2 operands, the 2nd of which IS a destination. - 3: 3 operands - - If an opcode mnemonic begins with "F", it is a floating-point - opcode (the "F" is not printed). */ + 1: single operand, which is NOT a destination. + -1: single operand, which IS a destination. + 2: 2 operands, the 2nd of which is NOT a destination. + -2: 2 operands, the 2nd of which IS a destination. + 3: 3 operands + + If an opcode mnemonic begins with "F", it is a floating-point + opcode (the "F" is not printed). */ static struct tabent *reg_tab; static const struct sparse_tabent reg_init[] = @@ -777,13 +762,8 @@ reg (word1) /* Print out effective address for memb instructions. */ static void -ea (memaddr, mode, reg2, reg3, word1, word2) - bfd_vma memaddr; - int mode; - const char *reg2; - const char *reg3; - int word1; - unsigned int word2; +ea (bfd_vma memaddr, int mode, const char *reg2, const char *reg3, int word1, + unsigned int word2) { int scale; static const int scale_tab[] = { 1, 2, 4, 8, 16 }; @@ -842,8 +822,7 @@ ea (memaddr, mode, reg2, reg3, word1, word2) /* Register Instruction Operand. */ static void -regop (mode, spec, reg, fp) - int mode, spec, reg, fp; +regop (int mode, int spec, int reg, int fp) { if (fp) { @@ -897,8 +876,7 @@ regop (mode, spec, reg, fp) /* Register Instruction Destination Operand. */ static void -dstop (mode, reg, fp) - int mode, reg, fp; +dstop (int mode, int reg, int fp) { /* 'dst' operand can't be a literal. On non-FP instructions, register mode is assumed and "m3" acts as if were "s3"; on FP-instructions, @@ -910,23 +888,20 @@ dstop (mode, reg, fp) } static void -invalid (word1) - int word1; +invalid (int word1) { (*info->fprintf_func) (stream, ".word\t0x%08x", (unsigned) word1); } static void -print_addr (a) - bfd_vma a; +print_addr (bfd_vma a) { (*info->print_address_func) (a, info); } static void -put_abs (word1, word2) - unsigned long word1 ATTRIBUTE_UNUSED; - unsigned long word2 ATTRIBUTE_UNUSED; +put_abs (unsigned long word1 ATTRIBUTE_UNUSED, + unsigned long word2 ATTRIBUTE_UNUSED) { #ifdef IN_GDB return; diff --git a/opcodes/ia64-opc.c b/opcodes/ia64-opc.c index 9726381..fc90213 100644 --- a/opcodes/ia64-opc.c +++ b/opcodes/ia64-opc.c @@ -1,5 +1,5 @@ /* ia64-opc.c -- Functions to access the compacted opcode table - Copyright 1999, 2000 Free Software Foundation, Inc. + Copyright 1999, 2000, 2003 Free Software Foundation, Inc. Written by Bob Manson of Cygnus Solutions, <manson@cygnus.com> This file is part of GDB, GAS, and the GNU binutils. @@ -25,19 +25,19 @@ #include "ia64-asmtab.h" #include "ia64-asmtab.c" -static void get_opc_prefix PARAMS ((const char **, char *)); -static short int find_string_ent PARAMS ((const char *)); -static short int find_main_ent PARAMS ((short int)); -static short int find_completer PARAMS ((short int, short int, const char *)); -static ia64_insn apply_completer PARAMS ((ia64_insn, int)); -static int extract_op_bits PARAMS ((int, int, int)); -static int extract_op PARAMS ((int, int *, unsigned int *)); -static int opcode_verify PARAMS ((ia64_insn, int, enum ia64_insn_type)); -static int locate_opcode_ent PARAMS ((ia64_insn, enum ia64_insn_type)); +static void get_opc_prefix (const char **, char *); +static short int find_string_ent (const char *); +static short int find_main_ent (short int); +static short int find_completer (short int, short int, const char *); +static ia64_insn apply_completer (ia64_insn, int); +static int extract_op_bits (int, int, int); +static int extract_op (int, int *, unsigned int *); +static int opcode_verify (ia64_insn, int, enum ia64_insn_type); +static int locate_opcode_ent (ia64_insn, enum ia64_insn_type); static struct ia64_opcode *make_ia64_opcode - PARAMS ((ia64_insn, const char *, int, int)); + (ia64_insn, const char *, int, int); static struct ia64_opcode *ia64_find_matching_opcode - PARAMS ((const char *, short int)); + (const char *, short int); const struct ia64_templ_desc ia64_templ_desc[16] = { @@ -65,9 +65,7 @@ const struct ia64_templ_desc ia64_templ_desc[16] = of the opcode, or at the NUL character. */ static void -get_opc_prefix (ptr, dest) - const char **ptr; - char *dest; +get_opc_prefix (const char **ptr, char *dest) { char *c = strchr (*ptr, '.'); if (c != NULL) @@ -89,8 +87,7 @@ get_opc_prefix (ptr, dest) STR; return -1 if one does not exist. */ static short -find_string_ent (str) - const char *str; +find_string_ent (const char *str) { short start = 0; short end = sizeof (ia64_strings) / sizeof (const char *); @@ -124,8 +121,7 @@ find_string_ent (str) return -1 if one does not exist. */ static short -find_main_ent (nameindex) - short nameindex; +find_main_ent (short nameindex) { short start = 0; short end = sizeof (main_table) / sizeof (struct ia64_main_table); @@ -164,10 +160,7 @@ find_main_ent (nameindex) return -1 if one does not exist. */ static short -find_completer (main_ent, prev_completer, name) - short main_ent; - short prev_completer; - const char *name; +find_completer (short main_ent, short prev_completer, const char *name) { short name_index = find_string_ent (name); @@ -200,9 +193,7 @@ find_completer (main_ent, prev_completer, name) return the result. */ static ia64_insn -apply_completer (opcode, completer_index) - ia64_insn opcode; - int completer_index; +apply_completer (ia64_insn opcode, int completer_index) { ia64_insn mask = completer_table[completer_index].mask; ia64_insn bits = completer_table[completer_index].bits; @@ -220,10 +211,7 @@ apply_completer (opcode, completer_index) first byte in OP_POINTER.) */ static int -extract_op_bits (op_pointer, bitoffset, bits) - int op_pointer; - int bitoffset; - int bits; +extract_op_bits (int op_pointer, int bitoffset, int bits) { int res = 0; @@ -259,10 +247,7 @@ extract_op_bits (op_pointer, bitoffset, bits) state entry in bits is returned. */ static int -extract_op (op_pointer, opval, op) - int op_pointer; - int *opval; - unsigned int *op; +extract_op (int op_pointer, int *opval, unsigned int *op) { int oplen = 5; @@ -317,10 +302,7 @@ extract_op (op_pointer, opval, op) PLACE matches OPCODE and is of type TYPE. */ static int -opcode_verify (opcode, place, type) - ia64_insn opcode; - int place; - enum ia64_insn_type type; +opcode_verify (ia64_insn opcode, int place, enum ia64_insn_type type) { if (main_table[place].opcode_type != type) { @@ -364,9 +346,7 @@ opcode_verify (opcode, place, type) priority. */ static int -locate_opcode_ent (opcode, type) - ia64_insn opcode; - enum ia64_insn_type type; +locate_opcode_ent (ia64_insn opcode, enum ia64_insn_type type) { int currtest[41]; int bitpos[41]; @@ -545,11 +525,7 @@ locate_opcode_ent (opcode, type) /* Construct an ia64_opcode entry based on OPCODE, NAME and PLACE. */ static struct ia64_opcode * -make_ia64_opcode (opcode, name, place, depind) - ia64_insn opcode; - const char *name; - int place; - int depind; +make_ia64_opcode (ia64_insn opcode, const char *name, int place, int depind) { struct ia64_opcode *res = (struct ia64_opcode *) xmalloc (sizeof (struct ia64_opcode)); @@ -572,9 +548,7 @@ make_ia64_opcode (opcode, name, place, depind) /* Determine the ia64_opcode entry for the opcode specified by INSN and TYPE. If a valid entry is not found, return NULL. */ struct ia64_opcode * -ia64_dis_opcode (insn, type) - ia64_insn insn; - enum ia64_insn_type type; +ia64_dis_opcode (ia64_insn insn, enum ia64_insn_type type) { int disent = locate_opcode_ent (insn, type); @@ -633,9 +607,7 @@ ia64_dis_opcode (insn, type) matches NAME. Return NULL if one is not found. */ static struct ia64_opcode * -ia64_find_matching_opcode (name, place) - const char *name; - short place; +ia64_find_matching_opcode (const char *name, short place) { char op[129]; const char *suffix; @@ -696,8 +668,7 @@ ia64_find_matching_opcode (name, place) release any resources used by the returned entry. */ struct ia64_opcode * -ia64_find_next_opcode (prev_ent) - struct ia64_opcode *prev_ent; +ia64_find_next_opcode (struct ia64_opcode *prev_ent) { return ia64_find_matching_opcode (prev_ent->name, prev_ent->ent_index + 1); @@ -710,8 +681,7 @@ ia64_find_next_opcode (prev_ent) release any resources used by the returned entry. */ struct ia64_opcode * -ia64_find_opcode (name) - const char *name; +ia64_find_opcode (const char *name) { char op[129]; const char *suffix; @@ -741,16 +711,14 @@ ia64_find_opcode (name) /* Free any resources used by ENT. */ void -ia64_free_opcode (ent) - struct ia64_opcode *ent; +ia64_free_opcode (struct ia64_opcode *ent) { free ((void *)ent->name); free (ent); } const struct ia64_dependency * -ia64_find_dependency (index) - int index; +ia64_find_dependency (int index) { index = DEP(index); |