summaryrefslogtreecommitdiff
path: root/opcodes/cgen-asm.c
diff options
context:
space:
mode:
authorMichael Meissner <gnu@the-meissners.org>2003-08-08 21:21:24 +0000
committerMichael Meissner <gnu@the-meissners.org>2003-08-08 21:21:24 +0000
commit360c5c446fa1a227d0d5a399c46d009d09c1b20a (patch)
treea7fc44dfad3aa375edcf4ae0a3966aca6ba4d970 /opcodes/cgen-asm.c
parent0ea0578c167dd3a344ef5c44a5afbfd93c544ccc (diff)
downloadgdb-360c5c446fa1a227d0d5a399c46d009d09c1b20a.tar.gz
Convert cgen to C-90
Diffstat (limited to 'opcodes/cgen-asm.c')
-rw-r--r--opcodes/cgen-asm.c90
1 files changed, 39 insertions, 51 deletions
diff --git a/opcodes/cgen-asm.c b/opcodes/cgen-asm.c
index c71c70de08e..7231e2d7aed 100644
--- a/opcodes/cgen-asm.c
+++ b/opcodes/cgen-asm.c
@@ -28,16 +28,14 @@
#include "opcode/cgen.h"
#include "opintl.h"
-static CGEN_INSN_LIST * hash_insn_array PARAMS ((CGEN_CPU_DESC, const CGEN_INSN *, int, int, CGEN_INSN_LIST **, CGEN_INSN_LIST *));
-static CGEN_INSN_LIST * hash_insn_list PARAMS ((CGEN_CPU_DESC, const CGEN_INSN_LIST *, CGEN_INSN_LIST **, CGEN_INSN_LIST *));
-static void build_asm_hash_table PARAMS ((CGEN_CPU_DESC));
+static CGEN_INSN_LIST * hash_insn_array (CGEN_CPU_DESC, const CGEN_INSN *, int, int, CGEN_INSN_LIST **, CGEN_INSN_LIST *);
+static CGEN_INSN_LIST * hash_insn_list (CGEN_CPU_DESC, const CGEN_INSN_LIST *, CGEN_INSN_LIST **, CGEN_INSN_LIST *);
+static void build_asm_hash_table (CGEN_CPU_DESC);
/* Set the cgen_parse_operand_fn callback. */
void
-cgen_set_parse_operand_fn (cd, fn)
- CGEN_CPU_DESC cd;
- cgen_parse_operand_fn fn;
+cgen_set_parse_operand_fn (CGEN_CPU_DESC cd, cgen_parse_operand_fn fn)
{
cd->parse_operand_fn = fn;
}
@@ -45,8 +43,7 @@ cgen_set_parse_operand_fn (cd, fn)
/* Called whenever starting to parse an insn. */
void
-cgen_init_parse_operand (cd)
- CGEN_CPU_DESC cd;
+cgen_init_parse_operand (CGEN_CPU_DESC cd)
{
/* This tells the callback to re-initialize. */
(void) (* cd->parse_operand_fn)
@@ -66,13 +63,12 @@ cgen_init_parse_operand (cd)
list and we want earlier ones to be prefered. */
static CGEN_INSN_LIST *
-hash_insn_array (cd, insns, count, entsize, htable, hentbuf)
- CGEN_CPU_DESC cd;
- const CGEN_INSN *insns;
- int count;
- int entsize ATTRIBUTE_UNUSED;
- CGEN_INSN_LIST **htable;
- CGEN_INSN_LIST *hentbuf;
+hash_insn_array (CGEN_CPU_DESC cd,
+ const CGEN_INSN *insns,
+ int count,
+ int entsize ATTRIBUTE_UNUSED,
+ CGEN_INSN_LIST **htable,
+ CGEN_INSN_LIST *hentbuf)
{
int i;
@@ -97,11 +93,10 @@ hash_insn_array (cd, insns, count, entsize, htable, hentbuf)
in a list. */
static CGEN_INSN_LIST *
-hash_insn_list (cd, insns, htable, hentbuf)
- CGEN_CPU_DESC cd;
- const CGEN_INSN_LIST *insns;
- CGEN_INSN_LIST **htable;
- CGEN_INSN_LIST *hentbuf;
+hash_insn_list (CGEN_CPU_DESC cd,
+ const CGEN_INSN_LIST *insns,
+ CGEN_INSN_LIST **htable,
+ CGEN_INSN_LIST *hentbuf)
{
const CGEN_INSN_LIST *ilist;
@@ -123,8 +118,7 @@ hash_insn_list (cd, insns, htable, hentbuf)
/* Build the assembler instruction hash table. */
static void
-build_asm_hash_table (cd)
- CGEN_CPU_DESC cd;
+build_asm_hash_table (CGEN_CPU_DESC cd)
{
int count = cgen_insn_count (cd) + cgen_macro_insn_count (cd);
CGEN_INSN_TABLE *insn_table = &cd->insn_table;
@@ -179,9 +173,7 @@ build_asm_hash_table (cd)
/* Return the first entry in the hash list for INSN. */
CGEN_INSN_LIST *
-cgen_asm_lookup_insn (cd, insn)
- CGEN_CPU_DESC cd;
- const char *insn;
+cgen_asm_lookup_insn (CGEN_CPU_DESC cd, const char *insn)
{
unsigned int hash;
@@ -201,11 +193,10 @@ cgen_asm_lookup_insn (cd, insn)
recording something in the keyword table]. */
const char *
-cgen_parse_keyword (cd, strp, keyword_table, valuep)
- CGEN_CPU_DESC cd ATTRIBUTE_UNUSED;
- const char **strp;
- CGEN_KEYWORD *keyword_table;
- long *valuep;
+cgen_parse_keyword (CGEN_CPU_DESC cd ATTRIBUTE_UNUSED,
+ const char **strp,
+ CGEN_KEYWORD *keyword_table,
+ long *valuep)
{
const CGEN_KEYWORD_ENTRY *ke;
char buf[256];
@@ -262,11 +253,10 @@ cgen_parse_keyword (cd, strp, keyword_table, valuep)
cgen_parse_address. */
const char *
-cgen_parse_signed_integer (cd, strp, opindex, valuep)
- CGEN_CPU_DESC cd;
- const char **strp;
- int opindex;
- long *valuep;
+cgen_parse_signed_integer (CGEN_CPU_DESC cd,
+ const char **strp,
+ int opindex,
+ long *valuep)
{
bfd_vma value;
enum cgen_parse_operand_result result;
@@ -287,11 +277,10 @@ cgen_parse_signed_integer (cd, strp, opindex, valuep)
cgen_parse_address. */
const char *
-cgen_parse_unsigned_integer (cd, strp, opindex, valuep)
- CGEN_CPU_DESC cd;
- const char **strp;
- int opindex;
- unsigned long *valuep;
+cgen_parse_unsigned_integer (CGEN_CPU_DESC cd,
+ const char **strp,
+ int opindex,
+ unsigned long *valuep)
{
bfd_vma value;
enum cgen_parse_operand_result result;
@@ -309,13 +298,12 @@ cgen_parse_unsigned_integer (cd, strp, opindex, valuep)
/* Address parser. */
const char *
-cgen_parse_address (cd, strp, opindex, opinfo, resultp, valuep)
- CGEN_CPU_DESC cd;
- const char **strp;
- int opindex;
- int opinfo;
- enum cgen_parse_operand_result *resultp;
- bfd_vma *valuep;
+cgen_parse_address (CGEN_CPU_DESC cd,
+ const char **strp,
+ int opindex,
+ int opinfo,
+ enum cgen_parse_operand_result *resultp,
+ bfd_vma *valuep)
{
bfd_vma value;
enum cgen_parse_operand_result result_type;
@@ -337,8 +325,7 @@ cgen_parse_address (cd, strp, opindex, opinfo, resultp, valuep)
/* Signed integer validation routine. */
const char *
-cgen_validate_signed_integer (value, min, max)
- long value, min, max;
+cgen_validate_signed_integer (long value, long min, long max)
{
if (value < min || value > max)
{
@@ -358,8 +345,9 @@ cgen_validate_signed_integer (value, min, max)
cases where min != 0 (and max > LONG_MAX). */
const char *
-cgen_validate_unsigned_integer (value, min, max)
- unsigned long value, min, max;
+cgen_validate_unsigned_integer (unsigned long value,
+ unsigned long min,
+ unsigned long max)
{
if (value < min || value > max)
{