Back to index

cell-binutils  2.17cvs20070401
Defines | Functions | Variables
iq2000-opc.c File Reference
#include "sysdep.h"
#include "ansidecl.h"
#include "bfd.h"
#include "symcat.h"
#include "iq2000-desc.h"
#include "iq2000-opc.h"
#include "libiberty.h"

Go to the source code of this file.

Defines

#define F(f)   & iq2000_cgen_ifld_table[IQ2000_f]
#define A(a)   (1 << CGEN_INSN_a)
#define OPERAND(op)   IQ2000_OPERAND_op
#define MNEM   CGEN_SYNTAX_MNEMONIC /* syntax value for mnemonic */
#define OP(field)   CGEN_SYNTAX_MAKE_FIELD (OPERAND (field))
#define F(f)   & iq2000_cgen_ifld_table[IQ2000_f]
#define A(a)   (1 << CGEN_INSN_a)
#define OPERAND(op)   IQ2000_OPERAND_op
#define MNEM   CGEN_SYNTAX_MNEMONIC /* syntax value for mnemonic */
#define OP(field)   CGEN_SYNTAX_MAKE_FIELD (OPERAND (field))
#define CGEN_ASM_HASH_P(insn)   1
#define CGEN_DIS_HASH_P(insn)   1
#define CGEN_ASM_HASH_SIZE   127
#define CGEN_ASM_HASH(mnem)   (*(unsigned char *) (mnem) % CGEN_ASM_HASH_SIZE)

Functions

static int asm_hash_insn_p (const CGEN_INSN *)
static unsigned int asm_hash_insn (const char *)
static int dis_hash_insn_p (const CGEN_INSN *)
static unsigned int dis_hash_insn (const char *, CGEN_INSN_INT)
static int asm_hash_insn_p (insn) const
static int dis_hash_insn_p (CGEN_INSN *insn) const
static unsigned int asm_hash_insn (char *mnem) const
static unsigned int dis_hash_insn (buf, value) const
static void set_fields_bitsize (CGEN_FIELDS *fields, int size)
void iq2000_cgen_init_opcode_table (CGEN_CPU_DESC cd)

Variables

static const CGEN_IFMT ifmt_empty ATTRIBUTE_UNUSED
static const CGEN_OPCODE iq2000_cgen_insn_opcode_table [MAX_INSNS]
static const CGEN_IBASE iq2000_cgen_macro_insn_table []
static const CGEN_OPCODE iq2000_cgen_macro_insn_opcode_table []

Define Documentation

#define A (   a)    (1 << CGEN_INSN_a)

Definition at line 2298 of file iq2000-opc.c.

#define A (   a)    (1 << CGEN_INSN_a)

Definition at line 2298 of file iq2000-opc.c.

#define CGEN_ASM_HASH (   mnem)    (*(unsigned char *) (mnem) % CGEN_ASM_HASH_SIZE)

Definition at line 3391 of file iq2000-opc.c.

#define CGEN_ASM_HASH_P (   insn)    1

Definition at line 3360 of file iq2000-opc.c.

#define CGEN_ASM_HASH_SIZE   127

Definition at line 3389 of file iq2000-opc.c.

#define CGEN_DIS_HASH_P (   insn)    1

Definition at line 3364 of file iq2000-opc.c.

#define F (   f)    & iq2000_cgen_ifld_table[IQ2000_f]

Definition at line 1913 of file iq2000-opc.c.

#define F (   f)    & iq2000_cgen_ifld_table[IQ2000_f]

Definition at line 1913 of file iq2000-opc.c.

#define MNEM   CGEN_SYNTAX_MNEMONIC /* syntax value for mnemonic */

Definition at line 2305 of file iq2000-opc.c.

#define MNEM   CGEN_SYNTAX_MNEMONIC /* syntax value for mnemonic */

Definition at line 2305 of file iq2000-opc.c.

#define OP (   field)    CGEN_SYNTAX_MAKE_FIELD (OPERAND (field))

Definition at line 2306 of file iq2000-opc.c.

#define OP (   field)    CGEN_SYNTAX_MAKE_FIELD (OPERAND (field))

Definition at line 2306 of file iq2000-opc.c.

#define OPERAND (   op)    IQ2000_OPERAND_op

Definition at line 2303 of file iq2000-opc.c.

#define OPERAND (   op)    IQ2000_OPERAND_op

Definition at line 2303 of file iq2000-opc.c.


Function Documentation

static unsigned int asm_hash_insn ( const char *  ) [static]
static unsigned int asm_hash_insn ( char *  mnem) const [static]

Definition at line 3411 of file iq2000-opc.c.

{
  return CGEN_ASM_HASH (mnem);
}
static int asm_hash_insn_p ( const CGEN_INSN *  ) [static]
static int asm_hash_insn_p ( insn  ) const [static]

Definition at line 3371 of file iq2000-opc.c.

{
  return CGEN_ASM_HASH_P (insn);
}
static unsigned int dis_hash_insn ( const char *  ,
CGEN_INSN_INT   
) [static]
static unsigned int dis_hash_insn ( buf  ,
value   
) const [static]

Definition at line 3421 of file iq2000-opc.c.

{
  return CGEN_DIS_HASH (buf, value);
}
static int dis_hash_insn_p ( const CGEN_INSN *  ) [static]
static int dis_hash_insn_p ( CGEN_INSN *  insn) const [static]

Definition at line 3378 of file iq2000-opc.c.

{
  /* If building the hash table and the NO-DIS attribute is present,
     ignore.  */
  if (CGEN_INSN_ATTR_VALUE (insn, CGEN_INSN_NO_DIS))
    return 0;
  return CGEN_DIS_HASH_P (insn);
}

Definition at line 3440 of file iq2000-opc.c.

{
  int i;
  int num_macros = (sizeof (iq2000_cgen_macro_insn_table) /
                  sizeof (iq2000_cgen_macro_insn_table[0]));
  const CGEN_IBASE *ib = & iq2000_cgen_macro_insn_table[0];
  const CGEN_OPCODE *oc = & iq2000_cgen_macro_insn_opcode_table[0];
  CGEN_INSN *insns = xmalloc (num_macros * sizeof (CGEN_INSN));

  memset (insns, 0, num_macros * sizeof (CGEN_INSN));
  for (i = 0; i < num_macros; ++i)
    {
      insns[i].base = &ib[i];
      insns[i].opcode = &oc[i];
      iq2000_cgen_build_insn_regex (& insns[i]);
    }
  cd->macro_insn_table.init_entries = insns;
  cd->macro_insn_table.entry_size = sizeof (CGEN_IBASE);
  cd->macro_insn_table.num_init_entries = num_macros;

  oc = & iq2000_cgen_insn_opcode_table[0];
  insns = (CGEN_INSN *) cd->insn_table.init_entries;
  for (i = 0; i < MAX_INSNS; ++i)
    {
      insns[i].opcode = &oc[i];
      iq2000_cgen_build_insn_regex (& insns[i]);
    }

  cd->sizeof_fields = sizeof (CGEN_FIELDS);
  cd->set_fields_bitsize = set_fields_bitsize;

  cd->asm_hash_p = asm_hash_insn_p;
  cd->asm_hash = asm_hash_insn;
  cd->asm_hash_size = CGEN_ASM_HASH_SIZE;

  cd->dis_hash_p = dis_hash_insn_p;
  cd->dis_hash = dis_hash_insn;
  cd->dis_hash_size = CGEN_DIS_HASH_SIZE;
}

Here is the call graph for this function:

Here is the caller graph for this function:

static void set_fields_bitsize ( CGEN_FIELDS *  fields,
int  size 
) [static]

Definition at line 3431 of file iq2000-opc.c.

{
  CGEN_FIELDS_BITSIZE (fields) = size;
}

Here is the caller graph for this function:


Variable Documentation

const CGEN_IFMT ifmt_m_wbiu ATTRIBUTE_UNUSED [static]
Initial value:
 {
  0, 0, 0x0, { { 0 } }
}

Definition at line 48 of file iq2000-opc.c.

Definition at line 245 of file iq2000-opc.c.

Definition at line 2786 of file iq2000-opc.c.

Definition at line 2310 of file iq2000-opc.c.