Open64 (mfef90, whirl2f, and IR tools)
TAG: version-openad; SVN changeset: 916
|
#include <alloca.h>
#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_bundle_gen.h"
Go to the source code of this file.
Classes | |
struct | isa_exec_unit_type |
struct | isa_bundle_type |
struct | BUNDLE_FIELD |
struct | BUNDLE_PACK_INFO |
Defines | |
#define | MAX_SLOTS 3 |
#define | TAG_SHIFT 12 |
#define | MAX_PACK_COMPS (FSLOT+MAX_SLOTS) |
#define | FNAME "targ_isa_bundle" |
Enumerations | |
enum | PACK_COMP_TYPE { END = 0, FTEMPLATE = 1, FSLOT = 2 } |
Functions | |
ISA_EXEC_UNIT_TYPE | ISA_Exec_Unit_Type_Create (const char *name, ISA_EXEC_UNIT_TYPE base_unit) |
void | Instruction_Exec_Unit_Group (ISA_EXEC_UNIT_TYPE unit_type,...) |
void | ISA_Bundle_Type_Create (const char *name, const char *asm_name, int no_slots) |
void | Slot (int slot_index, ISA_EXEC_UNIT_TYPE type) |
void | Stop (int slot_index) |
static void | Emit_Bundle_Scheduling (FILE *hfile, FILE *cfile, FILE *efile) |
void | ISA_Bundle_Pack_Create (ISA_BUNDLE_PACK_ENDIAN endian) |
void | Pack_Template (int comp_pos, int bundle_pos, int width) |
void | Pack_Slot (int slot, int comp_pos, int bundle_pos, int width) |
static unsigned long long | Mask64 (int width) |
static ISA_BUNDLE_PACK_ENDIAN | Host_Endian (void) |
static void | Emit_Pack_Component (FILE *cfile, BUNDLE_FIELD *field, int comp, int *first_comps, int *pack_index) |
static void | Emit_Bundle_Packing (FILE *hfile, FILE *cfile, FILE *efile) |
void | ISA_Bundle_Begin (const char *, int bundle_width) |
void | ISA_Bundle_End (void) |
Variables | |
static int | isa_exec_property_count = 0 |
static int | num_bundles = 0 |
static int | max_slots = 0 |
static int | bundle_bits |
static list< ISA_EXEC_UNIT_TYPE > | all_exec_types |
static list< ISA_BUNDLE_TYPE > | all_bundles |
static ISA_EXEC_UNIT_TYPE | current_exec_type_desc |
static ISA_BUNDLE_TYPE | current_bundle_desc |
static const char *const | interface [] |
static const char *const | pack_comp_type_name [] |
static const char *const | pack_comp_name [] |
static BUNDLE_PACK_INFO * | bundle_pack_info = NULL |
#define FNAME "targ_isa_bundle" |
#define MAX_PACK_COMPS (FSLOT+MAX_SLOTS) |
Definition at line 575 of file isa_bundle_gen.cxx.
Referenced by Emit_Bundle_Packing().
#define MAX_SLOTS 3 |
Definition at line 62 of file isa_bundle_gen.cxx.
Referenced by Pack_Slot().
#define TAG_SHIFT 12 |
Definition at line 63 of file isa_bundle_gen.cxx.
Referenced by Emit_Bundle_Scheduling().
enum PACK_COMP_TYPE |
Definition at line 569 of file isa_bundle_gen.cxx.
static void Emit_Bundle_Packing | ( | FILE * | hfile, |
FILE * | cfile, | ||
FILE * | efile | ||
) | [static] |
Definition at line 756 of file isa_bundle_gen.cxx.
References bundle_bits, bundle_pack_info, Emit_Pack_Component(), END, exit(), fprintf(), FSLOT, BUNDLE_PACK_INFO::fslot, FTEMPLATE, BUNDLE_PACK_INFO::ftemplate, MAX_PACK_COMPS, max_slots, NULL, pack_comp_name, and BUNDLE_FIELD::width.
Referenced by ISA_Bundle_End().
static void Emit_Bundle_Scheduling | ( | FILE * | hfile, |
FILE * | cfile, | ||
FILE * | efile | ||
) | [static] |
Definition at line 331 of file isa_bundle_gen.cxx.
References all_bundles, all_exec_types, isa_bundle_type::asm_name, isa_exec_unit_type::base_unit, isa_exec_unit_type::bit_position, fprintf(), isa_exec_property_count, max_slots, isa_exec_unit_type::members, isa_exec_unit_type::name, isa_bundle_type::name, num_bundles, isa_bundle_type::pack_code, isa_bundle_type::slot, isa_bundle_type::slot_count, isa_bundle_type::stop_bit, TAG_SHIFT, and top.
Referenced by ISA_Bundle_End().
static void Emit_Pack_Component | ( | FILE * | cfile, |
BUNDLE_FIELD * | field, | ||
int | comp, | ||
int * | first_comps, | ||
int * | pack_index | ||
) | [static] |
Definition at line 696 of file isa_bundle_gen.cxx.
References bundle_bits, bundle_pack_info, BUNDLE_FIELD::bundle_pos, BUNDLE_FIELD::comp_pos, END, BUNDLE_PACK_INFO::endian, fprintf(), Host_Endian(), Mask64(), pack_comp_name, pack_comp_type_name, and BUNDLE_FIELD::width.
Referenced by Emit_Bundle_Packing().
static ISA_BUNDLE_PACK_ENDIAN Host_Endian | ( | void | ) | [static] |
Definition at line 683 of file isa_bundle_gen.cxx.
References ISA_Bundle_Pack_Big_Endian, and ISA_Bundle_Pack_Little_Endian.
Referenced by Emit_Pack_Component().
void Instruction_Exec_Unit_Group | ( | ISA_EXEC_UNIT_TYPE | unit_type, |
... | |||
) |
Definition at line 252 of file isa_bundle_gen.cxx.
References current_exec_type_desc, exit(), fprintf(), isa_exec_unit_type::members, and isa_exec_unit_type::name.
Referenced by main().
void ISA_Bundle_Begin | ( | const char * | , |
int | bundle_width | ||
) |
void ISA_Bundle_End | ( | void | ) |
Definition at line 892 of file isa_bundle_gen.cxx.
References buf, cfile, efile, Emit_Bundle_Packing(), Emit_Bundle_Scheduling(), Emit_Footer(), Emit_Header(), fprintf(), hfile, and interface.
Referenced by main().
void ISA_Bundle_Pack_Create | ( | ISA_BUNDLE_PACK_ENDIAN | endian | ) |
Definition at line 608 of file isa_bundle_gen.cxx.
References bundle_pack_info, bzero(), BUNDLE_PACK_INFO::endian, exit(), and fprintf().
Referenced by main().
void ISA_Bundle_Type_Create | ( | const char * | name, |
const char * | asm_name, | ||
int | no_slots | ||
) |
Definition at line 274 of file isa_bundle_gen.cxx.
References all_bundles, isa_bundle_type::asm_name, current_bundle_desc, max_slots, isa_bundle_type::name, name, num_bundles, isa_bundle_type::pack_code, isa_bundle_type::slot_count, and isa_bundle_type::stop_bit.
Referenced by main().
ISA_EXEC_UNIT_TYPE ISA_Exec_Unit_Type_Create | ( | const char * | name, |
ISA_EXEC_UNIT_TYPE | base_unit | ||
) |
Definition at line 233 of file isa_bundle_gen.cxx.
References all_exec_types, isa_exec_unit_type::base_unit, isa_exec_unit_type::bit_position, current_exec_type_desc, isa_exec_property_count, isa_exec_unit_type::members, isa_exec_unit_type::name, and name.
Referenced by main().
static unsigned long long Mask64 | ( | int | width | ) | [static] |
Definition at line 668 of file isa_bundle_gen.cxx.
References exit(), fprintf(), and U.
Referenced by Emit_Pack_Component().
void Pack_Slot | ( | int | slot, |
int | comp_pos, | ||
int | bundle_pos, | ||
int | width | ||
) |
Definition at line 644 of file isa_bundle_gen.cxx.
References bundle_bits, bundle_pack_info, BUNDLE_FIELD::bundle_pos, BUNDLE_FIELD::comp_pos, exit(), fprintf(), BUNDLE_PACK_INFO::fslot, MAX_SLOTS, NULL, and BUNDLE_FIELD::width.
Referenced by main().
void Pack_Template | ( | int | comp_pos, |
int | bundle_pos, | ||
int | width | ||
) |
Definition at line 624 of file isa_bundle_gen.cxx.
References bundle_bits, bundle_pack_info, BUNDLE_FIELD::bundle_pos, BUNDLE_FIELD::comp_pos, exit(), fprintf(), BUNDLE_PACK_INFO::ftemplate, NULL, and BUNDLE_FIELD::width.
Referenced by main().
void Slot | ( | int | slot_index, |
ISA_EXEC_UNIT_TYPE | type | ||
) |
Definition at line 296 of file isa_bundle_gen.cxx.
References current_bundle_desc, exit(), fprintf(), isa_bundle_type::slot, and isa_bundle_type::slot_count.
Referenced by main().
void Stop | ( | int | slot_index | ) |
Definition at line 316 of file isa_bundle_gen.cxx.
References current_bundle_desc, exit(), fprintf(), isa_bundle_type::slot_count, and isa_bundle_type::stop_bit.
Referenced by main().
list<ISA_BUNDLE_TYPE> all_bundles [static] |
Definition at line 88 of file isa_bundle_gen.cxx.
Referenced by Emit_Bundle_Scheduling(), and ISA_Bundle_Type_Create().
list<ISA_EXEC_UNIT_TYPE> all_exec_types [static] |
Definition at line 87 of file isa_bundle_gen.cxx.
Referenced by Emit_Bundle_Scheduling(), and ISA_Exec_Unit_Type_Create().
int bundle_bits [static] |
Definition at line 86 of file isa_bundle_gen.cxx.
Referenced by Emit_Bundle_Packing(), Emit_Pack_Component(), ISA_Bundle_Begin(), Pack_Slot(), and Pack_Template().
BUNDLE_PACK_INFO* bundle_pack_info = NULL [static] |
Definition at line 605 of file isa_bundle_gen.cxx.
Referenced by Emit_Bundle_Packing(), Emit_Pack_Component(), ISA_Bundle_Pack_Create(), Pack_Slot(), and Pack_Template().
ISA_BUNDLE_TYPE current_bundle_desc [static] |
Definition at line 90 of file isa_bundle_gen.cxx.
Referenced by ISA_Bundle_Type_Create(), Slot(), and Stop().
ISA_EXEC_UNIT_TYPE current_exec_type_desc [static] |
Definition at line 89 of file isa_bundle_gen.cxx.
Referenced by Instruction_Exec_Unit_Group(), and ISA_Exec_Unit_Type_Create().
Definition at line 92 of file isa_bundle_gen.cxx.
Referenced by ISA_Bundle_End().
int isa_exec_property_count = 0 [static] |
Definition at line 82 of file isa_bundle_gen.cxx.
Referenced by Emit_Bundle_Scheduling(), and ISA_Exec_Unit_Type_Create().
int max_slots = 0 [static] |
Definition at line 85 of file isa_bundle_gen.cxx.
Referenced by Emit_Bundle_Packing(), Emit_Bundle_Scheduling(), and ISA_Bundle_Type_Create().
int num_bundles = 0 [static] |
Definition at line 84 of file isa_bundle_gen.cxx.
Referenced by Emit_Bundle_Scheduling(), and ISA_Bundle_Type_Create().
const char* const pack_comp_name[] [static] |
{ "ISA_BUNDLE_PACK_COMP_end", "ISA_BUNDLE_PACK_COMP_template", "ISA_BUNDLE_PACK_COMP_slot+0", "ISA_BUNDLE_PACK_COMP_slot+1", "ISA_BUNDLE_PACK_COMP_slot+2", }
Definition at line 585 of file isa_bundle_gen.cxx.
Referenced by Emit_Bundle_Packing(), and Emit_Pack_Component().
const char* const pack_comp_type_name[] [static] |
{ "END", "TEMPLATE", "SLOT0", "SLOT1", "SLOT2", }
Definition at line 577 of file isa_bundle_gen.cxx.
Referenced by Emit_Pack_Component().