Open64 (mfef90, whirl2f, and IR tools)
TAG: version-openad; SVN changeset: 916
|
#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"
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< STATE > | all_states |
static const char *const | interface [] |
#define FNAME "targ_isa_decode" |
enum STATE_TYPE |
Definition at line 60 of file isa_decode_gen.cxx.
enum VISIT_KIND |
Definition at line 62 of file isa_decode_gen.cxx.
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 | ||
) |
Definition at line 148 of file isa_decode_gen.cxx.
References all_states, state::i, idx, INST_STATE, state::is_final, NULL, state::pos, state::tag, state::u, state::visit, VISIT_UNVISITED, and state::width.
Referenced by main().
STATE Create_Unit_State | ( | const char * | tag, |
int | pos, | ||
int | width | ||
) |
Definition at line 127 of file isa_decode_gen.cxx.
References all_states, state::i, state::is_final, NULL, state::pos, state::tag, state::u, UNIT_STATE, state::visit, VISIT_UNVISITED, and state::width.
Referenced by main().
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 | ) |
void ISA_Decode_Begin | ( | const char * | ) |
Definition at line 119 of file isa_decode_gen.cxx.
Referenced by main().
void ISA_Decode_End | ( | void | ) |
Definition at line 354 of file isa_decode_gen.cxx.
References all_states, buf, cfile, efile, Emit_Footer(), Emit_Header(), exit(), state::final, fprintf(), hfile, state::i, initial_state, interface, state::is_final, NULL, state::u, state::visit, VISIT_GEN_CODE, VISIT_GEN_DATA, Visit_State(), and VISIT_UNVISITED.
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().
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().
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().
{ "/* ====================================================================", " * ====================================================================", " *", " * 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().