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

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_typeISA_ARGS_TYPE
typedef struct isa_adj_typeISA_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_TYPEall_packs
static list< OPND_ADJ_TYPEall_oadj
static ISA_PACK_TYPE current_pack_desc
static op_assemblyop_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 Documentation

#define FNAME   "targ_isa_pack"

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 Documentation

typedef struct isa_adj_type * ISA_ADJ_TYPE
typedef struct isa_args_type * ISA_ARGS_TYPE

Enumeration Type Documentation

enum COMP_TYPE
Enumerator:
END 
OPND 
RESULT 
END 
NAME 
OPND 
RESULT 

Definition at line 70 of file isa_pack_gen.cxx.


Function Documentation

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

Here is the call graph for this function:

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 ISA_Pack_Begin ( const char *  ,
int  inst_bit_size 
)

Definition at line 264 of file isa_pack_gen.cxx.

References inst_bits.

Referenced by main().

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

Here is the call graph for this function:

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

Here is the call graph for this function:

void Operand ( int  operand_index,
int  opnd_position,
int  inst_position,
int  width 
)
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 
)

Variable Documentation

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

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

const char* const interface[] [static]

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

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines