Open64 (mfef90, whirl2f, and IR tools)
TAG: version-openad; SVN changeset: 916
|
#include <cstddef>
#include <cstdlib>
#include <cstdarg>
#include <cstdio>
#include <cassert>
#include <cstring>
#include <vector>
#include <list>
#include "topcode.h"
#include "targ_isa_properties.h"
#include "gen_util.h"
#include "isa_pack_gen.h"
Go to the source code of this file.
Classes | |
struct | isa_args_type |
struct | isa_adj_type |
struct | isa_pack_type |
struct | op_assembly |
struct | opnd_adj_type |
Defines | |
#define | MAX_OPNDS 6 |
#define | MAX_RESULTS 2 |
#define | MAX_LISTING_OPERANDS (RESULT+MAX_RESULTS) |
#define | MAX_WORDS 20 |
#define | FNAME "targ_isa_pack" |
Typedefs | |
typedef struct isa_args_type * | ISA_ARGS_TYPE |
typedef struct isa_adj_type * | ISA_ADJ_TYPE |
Enumerations | |
enum | COMP_TYPE { END = 0, OPND = 1, RESULT = OPND+MAX_OPNDS, END = 0, NAME = 1, OPND = 2, RESULT = OPND+MAX_OPNDS } |
Functions | |
const char * | Print_Name (int print_index) |
void | ISA_Pack_Begin (const char *, int inst_bit_size) |
ISA_PACK_TYPE | ISA_Pack_Type_Create (const char *name) |
OPND_ADJ_TYPE | Create_Operand_Adjustment (const char *name, const char *adj) |
void | Instruction_Pack_Group (ISA_PACK_TYPE pack_type,...) |
void | Adjust_Operand (int operand_index, OPND_ADJ_TYPE pack_adj, OPND_ADJ_TYPE unpack_adj) |
void | Operand (int operand_index, int opnd_position, int inst_position, int width) |
void | Result (int result_index, int bit_position, int width) |
void | Next_Word (void) |
static unsigned long long | Mask (int width) |
void | ISA_Pack_End (void) |
Variables | |
static list< ISA_PACK_TYPE > | all_packs |
static list< OPND_ADJ_TYPE > | all_oadj |
static ISA_PACK_TYPE | current_pack_desc |
static op_assembly * | op_packs [TOP_count+1] |
static list< op_assembly * > | op_packs_list |
static bool | top_specified [TOP_count] |
static int | inst_bits |
static int | inst_words |
static int | num_adj |
static int | mask_width |
static const char *const | interface [] |
#define FNAME "targ_isa_pack" |
#define MAX_LISTING_OPERANDS (RESULT+MAX_RESULTS) |
Definition at line 76 of file isa_pack_gen.cxx.
Referenced by ISA_Pack_End(), and Print_Name().
#define MAX_OPNDS 6 |
Definition at line 66 of file isa_pack_gen.cxx.
Referenced by Adjust_Operand(), Operand(), and Print_Name().
#define MAX_RESULTS 2 |
Definition at line 67 of file isa_pack_gen.cxx.
Referenced by Print_Name(), and Result().
#define MAX_WORDS 20 |
Definition at line 93 of file isa_pack_gen.cxx.
Referenced by Instruction_Pack_Group(), and Next_Word().
typedef struct isa_adj_type * ISA_ADJ_TYPE |
typedef struct isa_args_type * ISA_ARGS_TYPE |
enum COMP_TYPE |
Definition at line 70 of file isa_pack_gen.cxx.
void Adjust_Operand | ( | int | operand_index, |
OPND_ADJ_TYPE | pack_adj, | ||
OPND_ADJ_TYPE | unpack_adj | ||
) |
Definition at line 335 of file isa_pack_gen.cxx.
References current_pack_desc, exit(), fprintf(), MAX_OPNDS, isa_pack_type::oadj, isa_adj_type::opnd_index, isa_adj_type::padj, and isa_adj_type::uadj.
Referenced by main().
OPND_ADJ_TYPE Create_Operand_Adjustment | ( | const char * | name, |
const char * | adj | ||
) |
Definition at line 287 of file isa_pack_gen.cxx.
References opnd_adj_type::adj, all_oadj, opnd_adj_type::code, opnd_adj_type::name, name, and num_adj.
Referenced by main().
void Instruction_Pack_Group | ( | ISA_PACK_TYPE | pack_type, |
... | |||
) |
Definition at line 301 of file isa_pack_gen.cxx.
References current_pack_desc, op_assembly::desc, inst_bits, inst_words, isa_pack_type::max_word, MAX_WORDS, op_packs, op_packs_list, op_assembly::opcode_mask, and top_specified.
Referenced by main().
void ISA_Pack_Begin | ( | const char * | , |
int | inst_bit_size | ||
) |
void ISA_Pack_End | ( | void | ) |
Definition at line 434 of file isa_pack_gen.cxx.
References opnd_adj_type::adj, isa_pack_type::adj_index, all_oadj, all_packs, buf, cfile, opnd_adj_type::code, op_assembly::desc, efile, Emit_Footer(), Emit_Header(), END, exit(), fprintf(), hfile, isa_pack_type::index, inst_bits, isa_args_type::inst_position, inst_words, interface, Mask(), mask_width, MAX_LISTING_OPERANDS, isa_pack_type::max_word, isa_args_type::name, isa_pack_type::name, opnd_adj_type::name, isa_pack_type::oadj, op_packs, op_assembly::opcode_mask, isa_pack_type::operands, OPND, isa_adj_type::opnd_index, isa_args_type::opnd_position, isa_adj_type::padj, Print_Name(), RESULT, isa_pack_type::results, top, top_specified, isa_adj_type::uadj, isa_args_type::width, and isa_pack_type::word.
Referenced by main().
ISA_PACK_TYPE ISA_Pack_Type_Create | ( | const char * | name | ) |
Definition at line 273 of file isa_pack_gen.cxx.
References all_packs, current_pack_desc, isa_pack_type::max_word, isa_pack_type::name, name, and result.
Referenced by main().
static unsigned long long Mask | ( | int | width | ) | [static] |
Definition at line 421 of file isa_pack_gen.cxx.
References exit(), and fprintf().
Referenced by ISA_Pack_End().
void Next_Word | ( | void | ) |
Definition at line 406 of file isa_pack_gen.cxx.
References current_pack_desc, exit(), fprintf(), isa_pack_type::max_word, and MAX_WORDS.
Referenced by main().
void Operand | ( | int | operand_index, |
int | opnd_position, | ||
int | inst_position, | ||
int | width | ||
) |
Definition at line 356 of file isa_pack_gen.cxx.
References current_pack_desc, exit(), fprintf(), isa_args_type::inst_position, mask_width, MAX_OPNDS, isa_pack_type::max_word, isa_args_type::name, isa_pack_type::operands, OPND, isa_args_type::opnd_position, isa_args_type::width, and isa_pack_type::word.
const char* Print_Name | ( | int | print_index | ) |
Definition at line 232 of file isa_pack_gen.cxx.
References buf, END, initialized, MAX_LISTING_OPERANDS, MAX_OPNDS, MAX_RESULTS, OPND, RESULT, and strdup.
Referenced by ISA_Pack_End(), and ISA_Print_End().
void Result | ( | int | result_index, |
int | bit_position, | ||
int | width | ||
) |
Definition at line 382 of file isa_pack_gen.cxx.
References current_pack_desc, exit(), fprintf(), isa_args_type::inst_position, mask_width, MAX_RESULTS, isa_pack_type::max_word, isa_args_type::name, isa_args_type::opnd_position, RESULT, isa_pack_type::results, isa_args_type::width, and isa_pack_type::word.
list<OPND_ADJ_TYPE> all_oadj [static] |
Definition at line 121 of file isa_pack_gen.cxx.
Referenced by Create_Operand_Adjustment(), and ISA_Pack_End().
list<ISA_PACK_TYPE> all_packs [static] |
Definition at line 120 of file isa_pack_gen.cxx.
Referenced by ISA_Pack_End(), and ISA_Pack_Type_Create().
ISA_PACK_TYPE current_pack_desc [static] |
Definition at line 122 of file isa_pack_gen.cxx.
Referenced by Adjust_Operand(), Instruction_Pack_Group(), ISA_Pack_Type_Create(), Next_Word(), Operand(), and Result().
int inst_bits [static] |
Definition at line 126 of file isa_pack_gen.cxx.
Referenced by Instruction_Pack_Group(), ISA_Pack_Begin(), and ISA_Pack_End().
int inst_words [static] |
Definition at line 127 of file isa_pack_gen.cxx.
Referenced by Instruction_Pack_Group(), and ISA_Pack_End().
Definition at line 131 of file isa_pack_gen.cxx.
Referenced by ISA_Pack_End().
int mask_width [static] |
Definition at line 129 of file isa_pack_gen.cxx.
Referenced by ISA_Pack_End(), Operand(), and Result().
int num_adj [static] |
Definition at line 128 of file isa_pack_gen.cxx.
Referenced by Create_Operand_Adjustment().
op_assembly* op_packs[TOP_count+1] [static] |
Definition at line 123 of file isa_pack_gen.cxx.
Referenced by Instruction_Pack_Group(), and ISA_Pack_End().
list<op_assembly*> op_packs_list [static] |
Definition at line 124 of file isa_pack_gen.cxx.
Referenced by Instruction_Pack_Group().
bool top_specified[TOP_count] [static] |
Definition at line 125 of file isa_pack_gen.cxx.
Referenced by Instruction_Pack_Group(), and ISA_Pack_End().