Open64 (mfef90, whirl2f, and IR tools)  TAG: version-openad; SVN changeset: 916
isa_bundle_gen.cxx File Reference
#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"
Include dependency graph for isa_bundle_gen.cxx:

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_TYPEall_exec_types
static list< ISA_BUNDLE_TYPEall_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_INFObundle_pack_info = NULL

Define Documentation

#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().


Enumeration Type Documentation

Enumerator:
END 
FTEMPLATE 
FSLOT 

Definition at line 569 of file isa_bundle_gen.cxx.


Function Documentation

static void Emit_Bundle_Packing ( FILE *  hfile,
FILE *  cfile,
FILE *  efile 
) [static]
static void Emit_Pack_Component ( FILE *  cfile,
BUNDLE_FIELD field,
int  comp,
int *  first_comps,
int *  pack_index 
) [static]
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().

Here is the call graph for this function:

void ISA_Bundle_Begin ( const char *  ,
int  bundle_width 
)

Definition at line 883 of file isa_bundle_gen.cxx.

References bundle_bits.

Referenced by main().

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().

Here is the call graph for this function:

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().

Here is the call graph for this function:

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().

Here is the call graph for this function:

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().

Here is the call graph for this function:

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().

Here is the call graph for this function:

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().

Here is the call graph for this function:

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().

Here is the call graph for this function:


Variable Documentation

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().

Definition at line 87 of file isa_bundle_gen.cxx.

Referenced by Emit_Bundle_Scheduling(), and ISA_Exec_Unit_Type_Create().

Definition at line 90 of file isa_bundle_gen.cxx.

Referenced by ISA_Bundle_Type_Create(), Slot(), and Stop().

const char* const interface[] [static]

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]
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]
Initial value:
 {
  "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]
Initial value:
 {
  "END",
  "TEMPLATE",
  "SLOT0",
  "SLOT1",
  "SLOT2",
}

Definition at line 577 of file isa_bundle_gen.cxx.

Referenced by Emit_Pack_Component().

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines