aboutsummaryrefslogtreecommitdiff
path: root/opcodes/ia64-opc.c
diff options
context:
space:
mode:
authorAndreas Jaeger <aj@suse.de>2003-09-14 15:16:57 +0000
committerAndreas Jaeger <aj@suse.de>2003-09-14 15:16:57 +0000
commit26ca545091edbd761ec3e0ff05e5f2f15fc6f68b (patch)
treead04a8c82d951d03555dc11334dee06d8768122f /opcodes/ia64-opc.c
parentd65b72117eaef86562a56d1460f7209ed45bfb76 (diff)
downloadgdb-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.
Diffstat (limited to 'opcodes/ia64-opc.c')
-rw-r--r--opcodes/ia64-opc.c88
1 files changed, 28 insertions, 60 deletions
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);