Open64 (mfef90, whirl2f, and IR tools)  TAG: version-openad; SVN changeset: 916
isa_decode_gen.cxx File Reference
#include <stddef.h>
#include <stdlib.h>
#include <stdarg.h>
#include <string.h>
#include <stdio.h>
#include <assert.h>
#include <alloca.h>
#include <list>
#include "topcode.h"
#include "gen_util.h"
#include "isa_decode_gen.h"
Include dependency graph for isa_decode_gen.cxx:

Go to the source code of this file.

Classes

struct  state

Defines

#define FNAME   "targ_isa_decode"

Enumerations

enum  STATE_TYPE { INST_STATE, UNIT_STATE }
enum  VISIT_KIND { VISIT_UNVISITED, VISIT_GEN_DATA, VISIT_GEN_CODE }

Functions

void ISA_Decode_Begin (const char *)
STATE Create_Unit_State (const char *tag, int pos, int width)
STATE Create_Inst_State (const char *tag, int idx, int pos, int width)
void Transitions (STATE state,...)
void Initial_State (STATE state)
STATE Final (TOP topcode)
static int Compare_NonFinals (const void *p1, const void *p2)
static void Visit_State (STATE state, FILE *f, VISIT_KIND vk)
void ISA_Decode_End (void)

Variables

static STATE initial_state
static list< STATEall_states
static const char *const interface []

Define Documentation

#define FNAME   "targ_isa_decode"

Enumeration Type Documentation

enum STATE_TYPE
Enumerator:
INST_STATE 
UNIT_STATE 

Definition at line 60 of file isa_decode_gen.cxx.

enum VISIT_KIND
Enumerator:
VISIT_UNVISITED 
VISIT_GEN_DATA 
VISIT_GEN_CODE 

Definition at line 62 of file isa_decode_gen.cxx.


Function Documentation

static int Compare_NonFinals ( const void *  p1,
const void *  p2 
) [static]

Definition at line 229 of file isa_decode_gen.cxx.

References state::i, and state::u.

Referenced by Visit_State().

STATE Create_Inst_State ( const char *  tag,
int  idx,
int  pos,
int  width 
)
STATE Create_Unit_State ( const char *  tag,
int  pos,
int  width 
)
STATE Final ( TOP  topcode)

Definition at line 216 of file isa_decode_gen.cxx.

References all_states, state::final, state::is_final, and state::u.

Referenced by main().

void Initial_State ( STATE  state)

Definition at line 207 of file isa_decode_gen.cxx.

References initial_state.

Referenced by main().

void ISA_Decode_Begin ( const char *  )

Definition at line 119 of file isa_decode_gen.cxx.

Referenced by main().

void Transitions ( STATE  state,
  ... 
)

Definition at line 169 of file isa_decode_gen.cxx.

References END_TRANSITIONS, exit(), fprintf(), state::i, state::is_final, state::transition, and state::u.

Referenced by main().

Here is the call graph for this function:

static void Visit_State ( STATE  state,
FILE *  f,
VISIT_KIND  vk 
) [static]

Definition at line 241 of file isa_decode_gen.cxx.

References Compare_NonFinals(), state::final, fprintf(), state::i, indent, INST_STATE, state::is_final, NULL, state::u, state::visit, VISIT_GEN_CODE, and VISIT_GEN_DATA.

Referenced by ISA_Decode_End().

Here is the call graph for this function:


Variable Documentation

list<STATE> all_states [static]

Definition at line 96 of file isa_decode_gen.cxx.

Referenced by Create_Inst_State(), Create_Unit_State(), Final(), and ISA_Decode_End().

STATE initial_state [static]

Definition at line 95 of file isa_decode_gen.cxx.

Referenced by Initial_State(), and ISA_Decode_End().

const char* const interface[] [static]
Initial value:
 {
  "/* ====================================================================",
  " * ====================================================================",
  " *",
  " * Description:",
  " *",
  " *   Utilities for decoding binary instructions. The following",
  " *   are exported:",
  " *",
  " *   TOP ISA_Decode_Inst(const ISA_PACK_INST *pinst, ISA_EXEC_UNIT unit)",
  " *       Decode the instruction pointed to by <pinst> in execution unit",
  " *       <unit> and return its opcode by function return value.",
  " *",
  " * ====================================================================",
  " * ====================================================================",
  " */",
  NULL
}

Definition at line 98 of file isa_decode_gen.cxx.

Referenced by ISA_Decode_End().

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines