osprey/cygnus/opcodes/or32-opc.c File Reference

#include <string.h>
#include <stdio.h>
#include <stdlib.h>
#include "safe-ctype.h"
#include "ansidecl.h"
#include "opcode/or32.h"

Include dependency graph for or32-opc.c:

Go to the source code of this file.

Data Types

type  temp_insn_struct

Defines

#define EFN   &l_none
#define EF(func)   EFN
#define EFI   EFN
#define MAX_AUTOMATA_SIZE   (1200)
#define MAX_OP_TABLE_SIZE   (1200)
#define LEAF_FLAG   (0x80000000)
#define MAX_LEN   (8)
#define MIN(x, y)   ((x) < (y) ? (x) : (y))

Functions/Subroutines

static unsigned long insn_extract PARAMS ((char, char *))
static unsigned long *cover_insn PARAMS ((unsigned long *, int, unsigned int))
static int num_ones PARAMS ((unsigned long))
static struct insn_op_struct
*parse_params 
PARAMS ((const struct or32_opcode *, struct insn_op_struct *))
static unsigned long or32_extract PARAMS ((char, char *, unsigned long))
static unsigned long extend_imm PARAMS ((unsigned long, char))
static void debug PARAMS ((int, const char *,...))
static void debug (int level ATTRIBUTE_UNUSED, const char *format ATTRIBUTE_UNUSED,...)
int insn_len (insn_index)
int letter_signed (char l)
int letter_range (char l)
int insn_index (char *insn)
const char * insn_name (int index)
void l_none ()
static unsigned long insn_extract (char param_ch, char *enc_initial)
static unsigned longcover_insn (unsigned long *cur, int pass, unsigned int mask)
static int num_ones (unsigned long value)
static struct insn_op_structparse_params (struct or32_opcode *opcode, struct insn_op_struct *cur) const
void build_automata ()
void destruct_automata ()
int insn_decode (unsigned int insn)
static unsigned long extend_imm (unsigned long imm, char l)
static unsigned long or32_extract (char param_ch, char *enc_initial, unsigned long insn)
static void or32_print_register (char param_ch, char *encoding, unsigned long insn)
static void or32_print_immediate (char param_ch, char *encoding, unsigned long insn)
int disassemble_insn (unsigned long insn)

Variables

struct or32_letter or32_letters []
struct or32_opcode or32_opcodes []
const unsigned int or32_num_opcodes = ((sizeof(or32_opcodes)) / (sizeof(struct or32_opcode))) - 1
unsigned longautomata
int nuncovered
int curpass = 0
struct temp_insn_structti
struct insn_op_structop_data
struct insn_op_struct ** op_start
static char disassembled_str [50]
char * disassembled = &disassembled_str[0]


Define Documentation

#define EF ( func   )     EFN

Definition at line 78 of file or32-opc.c.

#define EFI   EFN

Definition at line 79 of file or32-opc.c.

#define EFN   &l_none

Definition at line 72 of file or32-opc.c.

#define LEAF_FLAG   (0x80000000)

Definition at line 484 of file or32-opc.c.

Referenced by cover_insn(), and insn_decode().

#define MAX_AUTOMATA_SIZE   (1200)

Definition at line 482 of file or32-opc.c.

Referenced by build_automata().

#define MAX_LEN   (8)

Definition at line 485 of file or32-opc.c.

#define MAX_OP_TABLE_SIZE   (1200)

Definition at line 483 of file or32-opc.c.

Referenced by build_automata().

#define MIN ( x,
 )     ((x) < (y) ? (x) : (y))

Definition at line 488 of file or32-opc.c.


Function Documentation

void build_automata ( void   ) 

static unsigned long* cover_insn ( unsigned long cur,
int  pass,
unsigned int  mask 
) [static]

static void debug ( int level  ATTRIBUTE_UNUSED,
const char *format  ATTRIBUTE_UNUSED,
  ... 
) [static]

Definition at line 352 of file or32-opc.c.

void destruct_automata ( void   ) 

Definition at line 820 of file or32-opc.c.

References free(), and ti.

int disassemble_insn ( unsigned long  insn  ) 

static unsigned long extend_imm ( unsigned long  imm,
char  l 
) [static]

Definition at line 876 of file or32-opc.c.

References letter_range(), and letter_signed().

Referenced by or32_print_immediate().

int insn_decode ( unsigned int  insn  ) 

Definition at line 831 of file or32-opc.c.

References a, debug, first, i, LEAF_FLAG, and ti.

Referenced by disassemble_insn().

static unsigned long insn_extract ( char  param_ch,
char *  enc_initial 
) [static]

Definition at line 447 of file or32-opc.c.

References ISALPHA, NULL, ret, strtol(), and tmp.

Referenced by build_automata(), extract_insn(), and parse_params().

int insn_index ( char *  insn  ) 

Definition at line 414 of file or32-opc.c.

References i, and strcmp().

int insn_len ( insn_index   ) 

Definition at line 362 of file or32-opc.c.

const char* insn_name ( int  index  ) 

Definition at line 429 of file or32-opc.c.

References or32_opcode::name.

Referenced by arcExtMap_add(), and output_state_arcs().

void l_none ( void   ) 

Definition at line 439 of file or32-opc.c.

int letter_range ( char  l  ) 

Definition at line 387 of file or32-opc.c.

References or32_opcode::encoding, exit(), or32_opcode::name, pinsn(), printf(), strchr, and strlen().

Referenced by extend_imm(), and or32_extract().

int letter_signed ( char  l  ) 

static int num_ones ( unsigned long  value  )  [static]

Definition at line 629 of file or32-opc.c.

References c.

Referenced by Can_Do_Fast_Multiply(), Expand_Constant_Multiply(), and parse_params().

static unsigned long or32_extract ( char  param_ch,
char *  enc_initial,
unsigned long  insn 
) [static]

Definition at line 897 of file or32-opc.c.

References ISALPHA, ISLOWER, NULL, printf(), ret, strtol(), tmp, and x1.

static void or32_print_immediate ( char  param_ch,
char *  encoding,
unsigned long  insn 
) [static]

Definition at line 992 of file or32-opc.c.

References extend_imm(), letter_signed(), or32_extract(), and sprintf().

static void or32_print_register ( char  param_ch,
char *  encoding,
unsigned long  insn 
) [static]

Definition at line 979 of file or32-opc.c.

References or32_extract(), and sprintf().

static void debug PARAMS ( (int, const char *,...)   )  [static]

static unsigned long extend_imm PARAMS ( (unsigned long, char)   )  [static]

static unsigned long or32_extract PARAMS ( (char, char *, unsigned long  )  [static]

static struct insn_op_struct* parse_params PARAMS ( (const struct or32_opcode *, struct insn_op_struct *)   )  [static, read]

static int num_ones PARAMS ( (unsigned long  )  [static]

static unsigned long* cover_insn PARAMS ( (unsigned long *, int, unsigned int)   )  [static]

static unsigned long insn_extract PARAMS ( (char, char *)   )  [static]

static struct insn_op_struct* parse_params ( struct or32_opcode opcode,
struct insn_op_struct cur 
) const [static, read]


Variable Documentation

unsigned long* automata

Definition at line 491 of file or32-opc.c.

int curpass = 0

Definition at line 493 of file or32-opc.c.

Definition at line 869 of file or32-opc.c.

char disassembled_str[50] [static]

Definition at line 868 of file or32-opc.c.

Definition at line 492 of file or32-opc.c.

Definition at line 503 of file or32-opc.c.

Referenced by safe_insn_predicate().

Definition at line 503 of file or32-opc.c.

Initial value:

  {
    { 'A', NUM_UNSIGNED },
    { 'B', NUM_UNSIGNED },
    { 'D', NUM_UNSIGNED },
    { 'I', NUM_SIGNED },
    { 'K', NUM_UNSIGNED },
    { 'L', NUM_UNSIGNED },
    { 'N', NUM_SIGNED },
    { '0', NUM_UNSIGNED },
    { '\0', 0 }     
  }

Definition at line 46 of file or32-opc.c.

const unsigned int or32_num_opcodes = ((sizeof(or32_opcodes)) / (sizeof(struct or32_opcode))) - 1

Definition at line 357 of file or32-opc.c.

Definition at line 82 of file or32-opc.c.


Generated on Wed Apr 8 15:05:56 2009 for Open64 by  doxygen 1.5.6