osprey/be/cg/cgemit.cxx File Reference

#include <stdint.h>
#include <ctype.h>
#include <fcntl.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <errno.h>
#include <bstring.h>
#include "elf_stuff.h"
#include <elfaccess.h>
#include <alloca.h>
#include <stdlib.h>
#include <cmplrs/rcodes.h>
#include <stamp.h>
#include <vector>
#include "defs.h"
#include "config.h"
#include "config_asm.h"
#include "config_targ_opt.h"
#include "config_debug.h"
#include "targ_const.h"
#include "strtab.h"
#include "symtab.h"
#include "wn.h"
#include "erglob.h"
#include "erlib.h"
#include "ercg.h"
#include "file_util.h"
#include "flags.h"
#include "glob.h"
#include "xstats.h"
#include "tracing.h"
#include "cgir.h"
#include "opt_alias_interface.h"
#include "anl_driver.h"
#include "ti_asm.h"
#include "ti_errors.h"
#include "targ_proc_properties.h"
#include "targ_abi_properties.h"
#include "targ_isa_print.h"
#include "targ_isa_enums.h"
#include "targ_isa_pack.h"
#include "targ_isa_bundle.h"
#include "targ_isa_operands.h"
#include "cg.h"
#include "const.h"
#include "whirl2ops.h"
#include "stblock.h"
#include "data_layout.h"
#include "sections.h"
#include "dwarf_DST_mem.h"
#include "calls.h"
#include "cgemit.h"
#include "cgtarget.h"
#include "irbdata.h"
#include "em_elf.h"
#include "cgdwarf.h"
#include "cgdwarf_targ.h"
#include "em_dwarf.h"
#include "tn_set.h"
#include "iface_scn.h"
#include "config_targ.h"
#include "config_list.h"
#include "note.h"
#include "cgexp.h"
#include "eh_region.h"
#include "cg_flags.h"
#include "region_util.h"
#include "cg_region.h"
#include "targ_isa_lits.h"
#include "freq.h"
#include "vstring.h"
#include "label_util.h"
#include "cgemit_targ.h"
#include "cg_swp.h"
#include "tag.h"
#include "be_symtab.h"
#include "be_util.h"
#include "dwarf_stuff.h"
#include "pro_encode_nm.h"

Go to the source code of this file.

Data Types

type  AUX_SCN
type  BB_INFO
type  longb_info
type  stub_info

Defines

#define __STDC_LIMIT_MACROS
#define USE_STANDARD_TYPES   1
#define PAD_SIZE_LIMIT   2048
#define LBUF_LEN   (OP_MAX_FIXED_OPNDS*1024)
#define BB_cold   BB_local_flag1
#define Set_BB_cold   Set_BB_local_flag1
#define Reset_BB_cold   Reset_BB_local_flag1
#define EMIT_DATA_SECTIONS
#define Use_Separate_PU_Section(pu, st)
#define MAX_SYMTAB_DEPTH   6
#define Is_Text_Section(st)   (STB_exec(st) && strncmp(ST_name(st), ELF_TEXT,5)==0)
#define Init_Sanity_Checking_For_BB()
#define Perform_Sanity_Checks_For_OP(op, check_def)
#define FUDGE_ZONE   16000
#define FREQUENT_BB_DIFF   5.0
#define R10K_PRIMARY_ICACHE_LINE_WORDS   16

Typedefs

typedef struct longb_info LONGB_INFO
typedef struct stub_info STUB_INFO

Enumerations

enum  { IHOT = FALSE, ICOLD = TRUE }

Functions/Subroutines

void Early_Terminate (INT status)
static void Allocate_Elf_Index_Space (UINT level)
static void Init_ST_elf_index (UINT stab)
static INT32 ST_elf_index (ST *st)
static void Set_ST_elf_index (ST *st, INT32 v)
static BOOL ST_is_gp_relative (ST *st)
static void Init_Section (ST *st)
static unsigned char st_other_for_sym (ST *sym)
static INT64 Get_Offset_From_Full (ST *sym)
static void add_reloc_type (Elf64_AltRela *preloc, unsigned char reloc_type, pSCNINFO scn)
INT32 PC_Bundle (INT32 pc)
INT32 PC_Slot (INT32 pc)
INT32 PC_Incr (INT32 pc)
INT32 PC_Incr_N (INT32 pc, UINT32 incr)
void EMT_Write_Qualified_Name (FILE *f, ST *st)
static void Print_Dynsym (FILE *pfile, ST *st)
static void Print_Label (FILE *pfile, ST *st, INT64 size)
static void Print_Common (FILE *pfile, ST *st)
mINT32 EMT_Put_Elf_Symbol (ST *sym)
void EMT_Change_Symbol_To_Undefined (ST *sym)
void EMT_Change_Symbol_To_Weak (ST *sym)
static void put_TN_comment (TN *t, BOOL add_name, vstring *comment)
static BOOL r_apply_l_const (OP *op, INT opidx, vstring *buf)
static void print_prefetch_info (vstring *comment, WN *wn)
static void r_assemble_list (OP *op, BB *bb)
static void Verify_Operand (const ISA_OPERAND_INFO *oinfo, OP *op, INT opnd, BOOL is_result)
static void Verify_Instruction (OP *op)
static INT r_assemble_binary (OP *op, BB *bb, ISA_PACK_INST *pinst)
 for (i=0;i< OP_results(op);++i)
 FmtAssert (words > 0,("%s", TI_errmsg))
static INT r_assemble_op (OP *op, BB *bb, ISA_BUNDLE *bundle, INT slot)
static char * Replace_Substring (char *in, char *from, const char *to)
static char * Modify_Asm_String (char *asm_string, UINT32 position, bool memory, TN *offset_tn, TN *tn, BB *bb)
static char * Generate_Asm_String (OP *asm_op, BB *bb)
static void Assemble_Simulated_OP (OP *op, BB *bb)
static void Assemble_Bundles (BB *bb)
static void Assemble_Ops (BB *bb)
static void Emit_Loop_Note (BB *bb, FILE *file)
static void EMT_Assemble_BB (BB *bb, WN *rwn)
static BBFind_Stub_BB (const LONGB_INFO *longb, const STUB_INFO *stubs)
static BBCreate_Stub_BB (LONGB_INFO *longb, INT *stub_loc, BOOL fwd_branch)
static void Recompute_Label_Offset (INT32 pcs[2])
static INT BB_Info_Maintain_Sort (BB_INFO *bb_info, INT n_bb_info, INT bbindex, INT stub_len)
static INT Compare_Long_Branches (const void *p1, const void *p2)
static LONGB_INFOSort_Long_Branches (INT num_longb, LONGB_INFO *longb_list)
static void Print_Long_Branches (LONGB_INFO *longb_list)
static void Fixup_Long_Branches (INT32 *hot_size, INT32 *cold_size)
static BOOL Branch_Skips_First_Op (BB *pred, BB *succ)
static INT Num_of_OPs_in_First_Group (BB *bb)
INT Check_If_Should_Align_BB (BB *bb, INT32 curpc)
static void Pad_BB_With_Noops (BB *bb, INT num)
static void R_Resolve_Branches (ST *pu_st)
static void Trace_Init_Loc (INT scn_idx, Elf64_Xword scn_ofst, INT32 repeat)
static Elf64_Word Write_Diff (LABEL_IDX, LABEL_IDX, INT, Elf64_Word)
static Elf64_Xword Handle_EH_Region_Length (LABEL_IDX l, INT scn_idx, Elf64_Xword scn_ofst)
static Elf64_Word Write_TCON (TCON *tcon, INT scn_idx, Elf64_Xword scn_ofst, INT32 repeat)
static Elf64_Word Write_Symbol (ST *sym, Elf64_Sxword sym_ofst, INT scn_idx, Elf64_Word scn_ofst, INT32 repeat)
static Elf64_Word Write_Label (LABEL_IDX lab, Elf64_Sxword lab_ofst, INT scn_idx, Elf64_Word scn_ofst, INT32 repeat, INT32 flags, mTYPE_ID mtype)
static Elf64_Word Write_Symdiff (LABEL_IDX lab1, ST_IDX sym2idx, INT scn_idx, Elf64_Word scn_ofst, INT32 repeat, INT size)
static Elf64_Word Write_INITV (INITV_IDX invidx, INT scn_idx, Elf64_Word scn_ofst, bool etable=0, int format=0)
static void Write_INITO (INITO *inop, INT scn_idx, Elf64_Xword scn_ofst)
static int num_digits (int in)
static Elf64_Xword Generate_Exception_Table_Header (INT scn_idx, Elf64_Xword scn_ofst, LABEL_IDX *labels)
static void Change_Section_Origin (ST *base, INT64 ofst)
bool section_lt (ST *s1, ST *s2)
bool offset_lt (ST *s1, ST *s2)
bool size_lt (ST *s1, ST *s2)
static void Process_Initos_And_Literals (SYMTAB_IDX stab)
static void Process_Distr_Array ()
static void Process_Bss_Data (SYMTAB_IDX stab)
static INT Check_If_Should_Align_PU (INT curpc)
static void Create_Cold_Text_Section (void)
static void Setup_Text_Section_For_BB (BB *bb)
static void cache_last_label_info (LABEL_IDX label_idx, Dwarf_Unsigned base_elf_idx, PU_IDX pu_idx, Dwarf_Unsigned end_offset)
static void end_previous_text_region (pSCNINFO scninfo, INT end_offset)
static void Setup_Text_Section_For_PU (ST *pu)
void EMT_Emit_PU (ST *pu, DST_IDX pu_dst, WN *rwn)
static INT format_operand (char *buf, INT n, BOOL qp, const ISA_OPERAND_VALTYP *vtype)
static void Enumerate_Insts (void)
static void Get_Ism_Name (void)
void EMT_Begin_File (char *process_name, char *options)
static void Em_Options_Scn (void)
void EMT_End_File (void)

Variables

const char __Release_ID []
BOOL CG_emit_asm_dwarf = TRUE
BOOL CG_emit_unwind_info = TRUE
BOOL CG_emit_unwind_info_Set = FALSE
BOOL CG_emit_unwind_directives = FALSE
static BOOL generate_dwarf = FALSE
static BOOL generate_elf_symbols = FALSE
static BOOL Trace_Init = FALSE
static BOOL Trace_Inst = FALSE
static BOOL Trace_Elf = FALSE
static BOOL Trace_Longbr = FALSE
BOOL Use_Page_Zero = FALSE
static BOOL Use_Prefetch = FALSE
static LABEL_IDX Last_Label = LABEL_IDX_ZERO
static INT32 Offset_From_Last_Label = 0
static LABEL_IDX Initial_Pu_Label
static INT32 PC = 0
static INT32 text_PC = 0
static INT32 cold_PC = 0
static STPU_base = NULL
static STtext_base = NULL
static STcold_base = NULL
static pSCNINFO PU_section = NULL
static pSCNINFO text_section = NULL
static pSCNINFO cold_section = NULL
static INT current_rid = 0
static AUX_SCNem_scn
static INT last_scn = 0
static INT max_scn = 0
static STcur_section = NULL
static PU_IDX current_pu = 0
static FILEanl_file
static INT32elf_index_array [MAX_SYMTAB_DEPTH]
static INT max_elf_index [MAX_SYMTAB_DEPTH] = {0,0,0,0,0,0}
 words = TI_ASM_Pack_Inst(opcode, result, opnd, pinst)
static INT num_longb_inst_words
static BB_INFObb_info
static int exception_table_id = 0
const char * lsda_ttype_base = ".LSDATTYPEB"
const char * lsda_ttype_disp = ".LSDATTYPED"
const char * lsda_cs_begin = ".LSDACSB"
const char * lsda_cs_end = ".LSDACSE"
static LABEL_IDX prev_pu_last_label = LABEL_IDX_ZERO
static Dwarf_Unsigned prev_pu_base_elfsym = 0
static PU_IDX prev_pu_pu_idx = (PU_IDX) 0
static Dwarf_Unsigned prev_pu_end_offset_from_last_label = 0
static char * prev_pu_last_label_name = NULL
static Dwarf_Unsigned prev_pu_last_offset = 0
static char ism_name [40]
BOOL pad_data_section = FALSE


Define Documentation

#define __STDC_LIMIT_MACROS

Definition at line 61 of file cgemit.cxx.

#define BB_cold   BB_local_flag1

#define EMIT_DATA_SECTIONS

Definition at line 249 of file cgemit.cxx.

#define FREQUENT_BB_DIFF   5.0

#define FUDGE_ZONE   16000

Definition at line 4830 of file cgemit.cxx.

Referenced by Create_Stub_BB().

 
#define Init_Sanity_Checking_For_BB (  ) 

Definition at line 2409 of file cgemit.cxx.

Referenced by EMT_Assemble_BB().

#define Is_Text_Section ( st   )     (STB_exec(st) && strncmp(ST_name(st), ELF_TEXT,5)==0)

Definition at line 656 of file cgemit.cxx.

Referenced by Init_Section().

#define LBUF_LEN   (OP_MAX_FIXED_OPNDS*1024)

Definition at line 190 of file cgemit.cxx.

Referenced by r_assemble_list().

#define MAX_SYMTAB_DEPTH   6

Definition at line 338 of file cgemit.cxx.

Referenced by Init_ST_elf_index(), Set_ST_elf_index(), and ST_elf_index().

#define PAD_SIZE_LIMIT   2048

Definition at line 185 of file cgemit.cxx.

Referenced by Em_Options_Scn().

#define Perform_Sanity_Checks_For_OP ( op,
check_def   ) 

Definition at line 2410 of file cgemit.cxx.

Referenced by Assemble_Bundles(), Assemble_Ops(), and Assemble_Simulated_OP().

#define R10K_PRIMARY_ICACHE_LINE_WORDS   16

#define Reset_BB_cold   Reset_BB_local_flag1

Definition at line 208 of file cgemit.cxx.

Referenced by Create_Cold_Text_Section().

#define Set_BB_cold   Set_BB_local_flag1

Definition at line 207 of file cgemit.cxx.

Referenced by Create_Cold_Text_Section(), and Create_Stub_BB().

#define Use_Separate_PU_Section ( pu,
st   ) 

Value:

((pu != (PU_IDX) NULL) \
  && (Section_For_Each_Function || PU_in_elf_section(pu)) \
  && (ST_class(st) == CLASS_BLOCK) \
  && (strcmp(ST_name(st),ELF_TEXT) == 0))

Definition at line 312 of file cgemit.cxx.

Referenced by r_apply_l_const(), r_assemble_binary(), Write_Label(), Write_Symbol(), and Write_Symdiff().

#define USE_STANDARD_TYPES   1

Definition at line 84 of file cgemit.cxx.


Typedef Documentation


Enumeration Type Documentation

anonymous enum

Enumerator:
IHOT 
ICOLD 

Definition at line 201 of file cgemit.cxx.


Function Documentation

static void add_reloc_type ( Elf64_AltRela preloc,
unsigned char  reloc_type,
pSCNINFO  scn 
) [static]

Definition at line 797 of file cgemit.cxx.

References BZERO, Em_Add_New_Composite_Rela(), REL64_type, REL64_type2, REL64_type3, and REL_offset.

static void Allocate_Elf_Index_Space ( UINT  level  )  [static]

static void Assemble_Bundles ( BB bb  )  [static]

static void Assemble_Ops ( BB bb  )  [static]

static void Assemble_Simulated_OP ( OP op,
BB bb 
) [static]

static INT BB_Info_Maintain_Sort ( BB_INFO bb_info,
INT  n_bb_info,
INT  bbindex,
INT  stub_len 
) [static]

Definition at line 5115 of file cgemit.cxx.

References BB_INFO::bb_inum, longb_info::bbindex, FmtAssert, INT, Is_True, longb_info::next, and NULL.

Referenced by Fixup_Long_Branches().

static BOOL Branch_Skips_First_Op ( BB pred,
BB succ 
) [static]

Definition at line 5658 of file cgemit.cxx.

References BB_branch_op(), BB_next, FALSE, INT, NULL, OP_opnd, OP_opnds, TN_is_label, TN_offset, and TRUE.

Referenced by Check_If_Should_Align_BB().

static void cache_last_label_info ( LABEL_IDX  label_idx,
Dwarf_Unsigned  base_elf_idx,
PU_IDX  pu_idx,
Dwarf_Unsigned  end_offset 
) [static]

Definition at line 8130 of file cgemit.cxx.

References Get_Label_Offset(), and LABEL_name.

Referenced by EMT_Emit_PU().

static void Change_Section_Origin ( ST base,
INT64  ofst 
) [static]

INT Check_If_Should_Align_BB ( BB bb,
INT32  curpc 
)

static INT Check_If_Should_Align_PU ( INT  curpc  )  [static]

Definition at line 7994 of file cgemit.cxx.

References Align_Instructions, CGTARG_Text_Alignment(), INST_BYTES, INT, and OPT_Space.

Referenced by Setup_Text_Section_For_PU().

static INT Compare_Long_Branches ( const void p1,
const void p2 
) [static]

Definition at line 5209 of file cgemit.cxx.

References longb_info::distance, INT32, Is_True, and longb_info::longb_inum.

Referenced by Sort_Long_Branches().

static void Create_Cold_Text_Section ( void   )  [static]

static BB* Create_Stub_BB ( LONGB_INFO longb,
INT stub_loc,
BOOL  fwd_branch 
) [static]

void Early_Terminate ( INT  status  ) 

Definition at line 206 of file cleanup.cxx.

static void Em_Options_Scn ( void   )  [static]

static void Emit_Loop_Note ( BB bb,
FILE file 
) [static]

static void EMT_Assemble_BB ( BB bb,
WN rwn 
) [static]

Definition at line 4409 of file cgemit.cxx.

References alloca, anl_file, ANNOT_ENTRYINFO, ANNOT_entryinfo, ANNOT_First, ANNOT_Get(), ANNOT_label, ANNOT_LABEL, ANNOT_Next, ANNOT_rotating_kernel, ANNOT_ROTATING_KERNEL, AS_AENT, ASM_CMNT, ASM_CMNT_LINE, Asm_File, Assemble_Bundles(), Assemble_Ops(), Assembly, BB_annotations, BB_asm, BB_cold, BB_cycle, BB_entry, BB_exit, BB_Fall_Thru_Predecessor(), BB_Find_Succ(), BB_freq, BB_handler, BB_Has_Exc_Label(), BB_has_note, BB_id, BB_last_op, BB_length, BB_loop_head_bb, BB_next, BB_preds, BB_rid, BB_st(), BBLIST_item, BBlist_Len(), BBLIST_prob, BOOL, Cg_Dwarf_Add_Line_Entry(), CG_emit_unwind_info, CG_opt_level, CGEMIT_Setup_Ctrl_Register(), Cur_PU_Name, current_rid, CURRENT_SYMTAB, DevWarn, Em_Add_New_Event(), Em_Define_Symbol(), EMIT_interface_section, Emit_KEY_SWP_Note(), emit_label(), Emit_Loop_Note(), Emit_SWP_Note(), EMT_Put_Elf_Symbol(), ENTRYINFO_name, ENTRYINFO_srcpos, FALSE, FmtAssert, FOR_ALL_BB_PREDS, fprintf(), FREQ_Print_BB_Note(), Gen_Label_For_BB(), Get_Current_PU, Get_Label_Offset(), Has_Base_Block, Init_Sanity_Checking_For_BB, Initial_Pu_Label, INST_BYTES, INT, Interface_Scn_Add_Def(), Is_True, lab, LABEL_IDX_ZERO, LABEL_Init(), LABEL_name, Last_Label, ops::length, List_Notes, LKIND_DEFAULT, LL_FORMAT, New_LABEL(), NOTE_BB_Act(), NOTE_PRINT_TO_ANL_FILE, NOTE_PRINT_TO_FILE, NULL, Object_Code, Offset_From_Last_Label, OP_dummy, OP_prev, bb::ops, PC, bb::prev, Print_Label(), PU_ftn_lang(), REGION_First_BB, RID_cginfo, RID_id, RID_is_glue_code, ROTATING_KERNEL_INFO_ii, Save_Str(), Set_OP_Tag(), Set_ST_ofst, sprintf(), ST_base, ST_is_export_local(), ST_is_not_used, ST_name, ST_ofst, strcmp(), strlen(), tag, TFile, Trace_Inst, and TRUE.

Referenced by EMT_Emit_PU().

void EMT_Begin_File ( char *  process_name,
char *  options 
)

void EMT_Change_Symbol_To_Undefined ( ST sym  ) 

Definition at line 1324 of file cgemit.cxx.

References Em_Undefine_Symbol(), and ST_elf_index().

Referenced by CG_Change_Elf_Symbol_To_Undefined().

void EMT_Change_Symbol_To_Weak ( ST sym  ) 

Definition at line 1334 of file cgemit.cxx.

References Em_Set_Symbol_Binding(), ST_elf_index(), and STB_WEAK.

Referenced by Can_Be_Tail_Call().

void EMT_Emit_PU ( ST pu,
DST_IDX  pu_dst,
WN rwn 
)

Definition at line 8335 of file cgemit.cxx.

References anl_file, Anl_File_Path(), AS_END, AS_ENT, AS_GLOBAL, AS_SECTION, AS_TYPE, AS_TYPE_FUNC, ASM_CMNT, Asm_File, Assembly, Base_Symbol(), Base_Symbol_And_Offset(), BB_next, BOOL, cache_last_label_info(), Cg_Dwarf_Process_PU(), CG_emit_non_gas_syntax, CGEMIT_Function_Definition(), CGEMIT_Gen_Asm_Frame(), CGEMIT_Prn_Ent_In_Asm(), CGEMIT_Setup_Ctrl_Register(), CLASS_BLOCK, CLASS_VAR, count, Create_Cold_Text_Section(), Cur_PU_Name, CURRENT_SYMTAB, CXX_Exceptions_On, CXX_NEW, Debug_Level, DevWarn, DW_DLX_EH_OFFSET_UNAVAILABLE, DW_DLX_NO_EH_OFFSET, EH_Get_PU_Range_INITO(), EH_Get_PU_Range_ST(), Em_Add_New_Event(), Em_Create_Section_Symbol(), EMT_Assemble_BB(), EMT_Put_Elf_Symbol(), EMT_Write_Qualified_Name(), end, FALSE, fclose(), Finalize_Unwind_Info(), Fix_Cache_Conflict_latency(), Fix_MM_Latency(), fopen, FOR_ALL_BB_OPs, FOREACH_SYMBOL, fprintf(), fputc(), fputs(), Frame_Len, bb::freq, generate_dwarf, Get_Current_PU, Get_Trace(), GLOBAL_SYMTAB, Has_Base_Block, Init_Section(), Init_ST_elf_index(), Init_Unwind_Info(), Initial_Pu_Label, INST_BYTES, INT, INT64, Is_True, LABEL_name, Last_Label, LL_FORMAT, LOCS_Enable_Bundle_Formation, MEM_local_pool, NULL, Object_Code, Offset_From_Last_Label, OP_code, OP_dummy, OP_simulated, path, PC, Print_Label(), Process_Bss_Data(), Process_Initos_And_Literals(), PU_CXX_LANG, PU_F77_LANG, PU_F90_LANG, PU_ftn_lang(), PU_has_exc_scopes(), PU_Size, PU_src_lang, Pu_Table, R_Resolve_Branches(), REGION_First_BB, SCLASS_AUTO, SCLASS_COMMON, SCLASS_EXTERN, Set_ST_is_not_used, Set_ST_ofst, Set_STB_size, Setup_Text_Section_For_BB(), Setup_Text_Section_For_PU(), ST_class, ST_elf_index(), ST_is_export_local(), ST_is_not_used, ST_name, ST_pu(), ST_sclass, St_Table, ST_Table_Size(), STACK_FP_Fixup_PU(), STB_section, strcmp(), Target, TARGET_ITANIUM, text_PC, TFile, TP_EMIT, Trace_Inst, TRUE, UINT, and UINT8.

Referenced by CG_Generate_Code().

void EMT_End_File ( void   ) 

Definition at line 9293 of file cgemit.cxx.

References alloca, AS_ALIGN, AS_GLOBAL, AS_SECTION, ASM_DIR_ALIGN, ASM_DIR_GPVALUE, ASM_DIR_STOINTERNAL, Asm_File, Assembly, Cg_Dwarf_Finish(), Cg_Dwarf_Translate_To_Elf(), Cg_Dwarf_Write_Assembly_From_Symbolic_Relocs(), CG_emit_asm_dwarf, CG_emit_non_gas_syntax, CGEMIT_Alias(), CGEMIT_Weak_Alias(), Change_Section_Origin(), CLASS_BLOCK, CLASS_CONST, CLASS_FUNC, CLASS_NAME, CLASS_VAR, Debug_Level, DEBUG_Optimize_Space, EC_Is_Bad_Pragma_Abort, EETARG_Emit_IP_Calc_Func(), Em_Add_Bytes_To_Scn(), Em_Add_Comment(), Em_Add_New_Symbol(), Em_Add_New_Weak_Symbol(), Em_Change_Section_Alignment(), Em_Cleanup_Unwind(), Em_Dwarf_End(), Em_Dwarf_Prepare_Output(), Em_Dwarf_Write_Scns(), Em_End_File(), Em_End_Section(), Em_Get_Section_Index(), Em_Get_Section_Offset(), Em_Options_Scn(), Em_Write_Reginfo(), Emit_Global_Data, EMIT_interface_section, EMT_Put_Elf_Symbol(), end_previous_text_region(), ErrMsg(), EXPORT_INTERNAL, FOREACH_SYMBOL, fprintf(), fputs(), generate_dwarf, generate_elf_symbols, GLOBAL_SYMTAB, GP_DISP, Has_Base_Block, Has_Strong_Symbol(), Index_To_Str(), Init_Section(), Init_ST_elf_index(), INT, INT16, Interface_Scn_End_File(), IPA_Object_Name, last_scn, NULL, Object_Code, Print_Dynsym(), Process_Bss_Data(), Process_Distr_Array(), Process_Initos_And_Literals(), Pure_ABI, Read_Global_Data, Reset_STB_root_base, Reset_STB_section, Save_Str2(), SCLASS_COMMENT, SCLASS_COMMON, SCLASS_EXTERN, SEC_is_merge(), Set_ST_base, Set_ST_export, Set_ST_name, Set_ST_ofst, Set_ST_sclass, Set_STB_align, Set_STB_compiler_layout, Set_STB_scninfo_idx(), Set_STB_section_idx, sprintf(), ST_base, ST_class, ST_emit_symbol, ST_is_export_local(), ST_is_fill_align, ST_is_not_used, ST_is_weak_symbol, ST_name, st_other_for_sym(), ST_sclass, ST_strong, STB_align, STB_GLOBAL, STB_nobits, STB_scninfo_idx(), STB_section, STB_section_idx, STB_size, STO_INTERNAL, strlen(), strncmp(), STT_FUNC, STT_OBJECT, AUX_SCN::sym, UINT32, Use_32_Bit_Pointers, and void.

Referenced by CG_Fini().

mINT32 EMT_Put_Elf_Symbol ( ST sym  ) 

void EMT_Write_Qualified_Name ( FILE f,
ST st 
)

static void end_previous_text_region ( pSCNINFO  scninfo,
INT  end_offset 
) [static]

static void Enumerate_Insts ( void   )  [static]

static BB* Find_Stub_BB ( const LONGB_INFO longb,
const STUB_INFO stubs 
) [static]

static void Fixup_Long_Branches ( INT32 hot_size,
INT32 cold_size 
) [static]

FmtAssert ( words  ,
,
("%s", TI_errmsg)   
)

for (  ) 

Definition at line 2255 of file cgemit.cxx.

Referenced by RGN_CFLOW_MGR::_acquire_cflow_info(), _bfd_ecoff_slurp_symbolic_info(), _bfd_mips_relax_section(), _bfd_XXi_only_swap_filehdr_out(), _FWN(), _nl_strd_derv(), _nl_stride_dv(), _nlstrent(), _stride_dv(), _Unwind_VRS_Pop(), Access_Vector_Condition_Provable(), add_phi_args_after_copy(), aff_combination_add(), aff_combination_scale(), alpha_fallback_frame_state(), bfd_ecoff_debug_accumulate(), build_def_use(), can_copy_bbs_p(), cgraph_postorder(), check_code_macro(), CIO_RWTRAN::CICSE_Transform(), collect_args(), copy_token_list(), DEFUN(), df_rd_alloc(), df_ru_alloc(), duplicate_loop_to_header_edge(), elf32_avr_check_relocs(), elf32_d10v_check_relocs(), elf32_dlx_check_relocs(), elf32_h8_relax_delete_bytes(), elf32_h8_symbol_address_p(), elf32_m68hc11_check_relocs(), elf32_msp430_check_relocs(), elf64_alpha_calc_got_offsets_for_symbol(), elf64_alpha_can_merge_gots(), elf64_alpha_merge_gots(), elf64_alpha_relax_tls_get_addr(), elf_strptr(), elfNN_ia64_global_dyn_sym_thunk(), eliminate_regs_in_insn(), evaluate_equiv_classes(), find_reg(), folder_driver(), fr30_cgen_init_opcode_table(), fr30_elf_check_relocs(), frv_cgen_init_opcode_table(), gen_insn(), get_dominated_by_region(), ggc_pch_read(), ia64_dependencies_evaluation_hook(), ia64_sched_init(), ieee_canonicalize_symtab(), init_reg_map(), ip2k_cgen_init_opcode_table(), iq2000_cgen_init_opcode_table(), iq2000_elf_check_relocs(), localvar_alloc(), loop_regs_scan(), lshift_significand(), m32r_cgen_init_opcode_table(), m32r_cgen_init_opinst_table(), malloc_find_inpool_(), mark_constant_pool(), mark_replaceable(), match_insn_m68k(), mcore_elf_check_relocs(), merge_states(), mips_elf64_write_rel(), mips_elf64_write_rela(), mips_fallback_frame_state(), mmix_elf_check_common_relocs(), mn10200_elf_relax_delete_bytes(), mn10300_elf_relax_delete_bytes(), msp430_elf_relax_delete_bytes(), oasys_write_record(), openrisc_cgen_init_opcode_table(), openrisc_elf_check_relocs(), output_min_issue_delay_table(), pa32_fallback_frame_state(), pex_msdos_cleanup(), pex_msdos_open(), PF_LG::PF_LG(), ppc_fallback_frame_state(), print_insn_cris_generic(), process_embedded_commands(), process_state_for_insn_equiv_partition(), readonly_dynrelocs(), replace_args(), rshift_significand(), s390_fallback_frame_state(), sh_fallback_frame_state(), solve_program_flow_graph(), sparc64_elf_write_relocs(), sparc_fallback_frame_state(), sticky_rshift_significand(), sunos_canonicalize_dynamic_reloc(), tpa_compact(), units_to_automata_heuristic_distr(), update_single_exits_after_duplication(), v850_elf_relax_delete_bytes(), WN_read_generic_map(), and xstormy16_cgen_init_opcode_table().

static INT format_operand ( char *  buf,
INT  n,
BOOL  qp,
const ISA_OPERAND_VALTYP *  vtype 
) [static]

Definition at line 8804 of file cgemit.cxx.

References count, FALSE, FmtAssert, INT, INT64, NULL, and sprintf().

Referenced by Enumerate_Insts().

static char* Generate_Asm_String ( OP asm_op,
BB bb 
) [static]

static Elf64_Xword Generate_Exception_Table_Header ( INT  scn_idx,
Elf64_Xword  scn_ofst,
LABEL_IDX labels 
) [static]

static void Get_Ism_Name ( void   )  [static]

Definition at line 8948 of file cgemit.cxx.

References __Release_ID, NULL, s, strchr, and strncpy().

Referenced by EMT_Begin_File().

static INT64 Get_Offset_From_Full ( ST sym  )  [static]

Definition at line 780 of file cgemit.cxx.

References atoll(), FmtAssert, NULL, ST_name, and strrchr().

Referenced by EMT_Put_Elf_Symbol().

static Elf64_Xword Handle_EH_Region_Length ( LABEL_IDX  l,
INT  scn_idx,
Elf64_Xword  scn_ofst 
) [static]

Definition at line 5985 of file cgemit.cxx.

References FmtAssert, and Write_Diff().

Referenced by Write_INITV().

static void Init_Section ( ST st  )  [static]

static void Init_ST_elf_index ( UINT  stab  )  [static]

static char* Modify_Asm_String ( char *  asm_string,
UINT32  position,
bool  memory,
TN offset_tn,
TN tn,
BB bb 
) [static]

static int num_digits ( int  in  )  [static]

static INT Num_of_OPs_in_First_Group ( BB bb  )  [static]

Definition at line 5676 of file cgemit.cxx.

References BB_first_op, INT, OP_dummy, OP_end_group, and OP_next.

Referenced by Check_If_Should_Align_BB().

bool offset_lt ( ST s1,
ST s2 
) [inline]

Definition at line 7459 of file cgemit.cxx.

References Offset_From_Base_Symbol().

Referenced by Process_Bss_Data(), and Process_Initos_And_Literals().

static void Pad_BB_With_Noops ( BB bb,
INT  num 
) [static]

INT32 PC_Bundle ( INT32  pc  )  [inline]

Definition at line 840 of file cgemit.cxx.

References INST_BYTES.

Referenced by Fixup_Long_Branches(), PC_Incr_N(), and r_assemble_binary().

INT32 PC_Incr ( INT32  pc  )  [inline]

Definition at line 855 of file cgemit.cxx.

References INST_BYTES, and PC_Slot().

Referenced by Check_If_Should_Align_BB().

INT32 PC_Incr_N ( INT32  pc,
UINT32  incr 
) [inline]

INT32 PC_Slot ( INT32  pc  )  [inline]

Definition at line 847 of file cgemit.cxx.

References INST_BYTES.

Referenced by PC_Incr(), and PC_Incr_N().

static void Print_Common ( FILE pfile,
ST st 
) [static]

static void Print_Dynsym ( FILE pfile,
ST st 
) [static]

static void Print_Label ( FILE pfile,
ST st,
INT64  size 
) [static]

static void Print_Long_Branches ( LONGB_INFO longb_list  )  [static]

static void print_prefetch_info ( vstring comment,
WN wn 
) [static]

Definition at line 1620 of file cgemit.cxx.

References vstr_concat(), WN_pf_stride_1L, and WN_pf_stride_2L.

static void Process_Bss_Data ( SYMTAB_IDX  stab  )  [static]

static void Process_Distr_Array (  )  [static]

static void Process_Initos_And_Literals ( SYMTAB_IDX  stab  )  [static]

static void put_TN_comment ( TN t,
BOOL  add_name,
vstring comment 
) [static]

static BOOL r_apply_l_const ( OP op,
INT  opidx,
vstring buf 
) [static]

static INT r_assemble_binary ( OP op,
BB bb,
ISA_PACK_INST *  pinst 
) [static]

static void r_assemble_list ( OP op,
BB bb 
) [static]

static INT r_assemble_op ( OP op,
BB bb,
ISA_BUNDLE *  bundle,
INT  slot 
) [static]

static void R_Resolve_Branches ( ST pu_st  )  [static]

static void Recompute_Label_Offset ( INT32  pcs[2]  )  [static]

static char* Replace_Substring ( char *  in,
char *  from,
const char *  to 
) [static]

Definition at line 3005 of file cgemit.cxx.

References alloca, NULL, sprintf(), strdup, strlen(), strstr(), and UINT.

Referenced by Generate_Asm_String(), and Modify_Asm_String().

bool section_lt ( ST s1,
ST s2 
) [inline]

Definition at line 7452 of file cgemit.cxx.

References Base_Symbol().

Referenced by Process_Bss_Data(), and Process_Initos_And_Literals().

static void Set_ST_elf_index ( ST st,
INT32  v 
) [static]

static void Setup_Text_Section_For_BB ( BB bb  )  [static]

static void Setup_Text_Section_For_PU ( ST pu  )  [static]

bool size_lt ( ST s1,
ST s2 
) [inline]

Definition at line 7465 of file cgemit.cxx.

References ST_type, and TY_size.

Referenced by Process_Bss_Data(), and Process_Initos_And_Literals().

static LONGB_INFO* Sort_Long_Branches ( INT  num_longb,
LONGB_INFO longb_list 
) [static]

Definition at line 5268 of file cgemit.cxx.

References alloca, Compare_Long_Branches(), INT, longb_info::next, NULL, qsort(), and vec.

Referenced by Fixup_Long_Branches().

static INT32 ST_elf_index ( ST st  )  [static]

static BOOL ST_is_gp_relative ( ST st  )  [static]

Definition at line 646 of file cgemit.cxx.

References Base_Symbol(), CLASS_BLOCK, CLASS_VAR, ST_class, and ST_gprel.

Referenced by EMT_Put_Elf_Symbol(), r_assemble_binary(), and r_assemble_op().

static unsigned char st_other_for_sym ( ST sym  )  [static]

static void Trace_Init_Loc ( INT  scn_idx,
Elf64_Xword  scn_ofst,
INT32  repeat 
) [static]

Definition at line 5960 of file cgemit.cxx.

References fprintf(), INT64, ST_name, and TFile.

Referenced by Write_INITO(), Write_Label(), Write_Symbol(), Write_Symdiff(), and Write_TCON().

static void Verify_Instruction ( OP op  )  [static]

static void Verify_Operand ( const ISA_OPERAND_INFO *  oinfo,
OP op,
INT  opnd,
BOOL  is_result 
) [static]

static Elf64_Word Write_Diff ( LABEL_IDX  lab1,
LABEL_IDX  lab2,
INT  scn_idx,
Elf64_Word  scn_ofst 
) [static]

Definition at line 7312 of file cgemit.cxx.

References Asm_File, fputc(), fputs(), and LABEL_name.

Referenced by Generate_Exception_Table_Header(), and Handle_EH_Region_Length().

static void Write_INITO ( INITO inop,
INT  scn_idx,
Elf64_Xword  scn_ofst 
) [static]

static Elf64_Word Write_INITV ( INITV_IDX  invidx,
INT  scn_idx,
Elf64_Word  scn_ofst,
bool  etable = 0,
int  format = 0 
) [static]

static Elf64_Word Write_Label ( LABEL_IDX  lab,
Elf64_Sxword  lab_ofst,
INT  scn_idx,
Elf64_Word  scn_ofst,
INT32  repeat,
INT32  flags,
mTYPE_ID  mtype 
) [static]

static Elf64_Word Write_Symbol ( ST sym,
Elf64_Sxword  sym_ofst,
INT  scn_idx,
Elf64_Word  scn_ofst,
INT32  repeat 
) [static]

static Elf64_Word Write_Symdiff ( LABEL_IDX  lab1,
ST_IDX  sym2idx,
INT  scn_idx,
Elf64_Word  scn_ofst,
INT32  repeat,
INT  size 
) [static]

static Elf64_Word Write_TCON ( TCON tcon,
INT  scn_idx,
Elf64_Xword  scn_ofst,
INT32  repeat 
) [static]


Variable Documentation

const char __Release_ID[]

Definition at line 144 of file ipa_ld.c.

Referenced by Get_Ism_Name().

FILE* anl_file [static]

BB_INFO* bb_info [static]

Definition at line 4840 of file cgemit.cxx.

Definition at line 235 of file cgemit.cxx.

Referenced by Build_Fde_For_Proc(), and Emit_Unwind_Directives_For_OP().

Definition at line 234 of file cgemit.cxx.

Referenced by CG_Generate_Code().

ST* cold_base = NULL [static]

Definition at line 282 of file cgemit.cxx.

INT32 cold_PC = 0 [static]

pSCNINFO cold_section = NULL [static]

Definition at line 286 of file cgemit.cxx.

ST* cur_section = NULL [static]

PU_IDX current_pu = 0 [static]

INT current_rid = 0 [static]

Definition at line 293 of file cgemit.cxx.

Referenced by EMT_Assemble_BB().

INT32* elf_index_array[MAX_SYMTAB_DEPTH] [static]

Initial value:

  {NULL,NULL,NULL,NULL,NULL,NULL}

Definition at line 340 of file cgemit.cxx.

Referenced by Allocate_Elf_Index_Space(), Init_ST_elf_index(), Set_ST_elf_index(), and ST_elf_index().

AUX_SCN* em_scn [static]

Definition at line 301 of file cgemit.cxx.

int exception_table_id = 0 [static]

Definition at line 5977 of file cgemit.cxx.

BOOL generate_dwarf = FALSE [static]

Definition at line 252 of file cgemit.cxx.

Referenced by EMT_Begin_File(), EMT_Emit_PU(), EMT_End_File(), and Setup_Text_Section_For_PU().

BOOL generate_elf_symbols = FALSE [static]

Definition at line 271 of file cgemit.cxx.

Referenced by EMT_Assemble_BB(), EMT_Emit_PU(), and Setup_Text_Section_For_PU().

char ism_name[40] [static]

Definition at line 8944 of file cgemit.cxx.

Definition at line 268 of file cgemit.cxx.

Referenced by EMT_Assemble_BB(), EMT_Emit_PU(), r_assemble_op(), and Setup_Text_Section_For_PU().

INT last_scn = 0 [static]

Definition at line 302 of file cgemit.cxx.

Referenced by EMT_End_File(), and Init_Section().

const char* lsda_cs_begin = ".LSDACSB"

Definition at line 5980 of file cgemit.cxx.

const char* lsda_cs_end = ".LSDACSE"

Definition at line 5981 of file cgemit.cxx.

const char* lsda_ttype_base = ".LSDATTYPEB"

Definition at line 5978 of file cgemit.cxx.

const char* lsda_ttype_disp = ".LSDATTYPED"

Definition at line 5979 of file cgemit.cxx.

INT max_elf_index[MAX_SYMTAB_DEPTH] = {0,0,0,0,0,0} [static]

INT max_scn = 0 [static]

Definition at line 303 of file cgemit.cxx.

Referenced by Init_Section().

Definition at line 4832 of file cgemit.cxx.

Definition at line 269 of file cgemit.cxx.

Referenced by EMT_Assemble_BB(), EMT_Emit_PU(), r_assemble_op(), and Setup_Text_Section_For_PU().

Definition at line 9093 of file cgemit.cxx.

INT32 PC = 0 [static]

Definition at line 276 of file cgemit.cxx.

Definition at line 8123 of file cgemit.cxx.

Definition at line 8125 of file cgemit.cxx.

Definition at line 8122 of file cgemit.cxx.

char* prev_pu_last_label_name = NULL [static]

Definition at line 8126 of file cgemit.cxx.

Definition at line 8127 of file cgemit.cxx.

PU_IDX prev_pu_pu_idx = (PU_IDX) 0 [static]

Definition at line 8124 of file cgemit.cxx.

ST* PU_base = NULL [static]

Definition at line 280 of file cgemit.cxx.

pSCNINFO PU_section = NULL [static]

Definition at line 284 of file cgemit.cxx.

ST* text_base = NULL [static]

Definition at line 281 of file cgemit.cxx.

INT32 text_PC = 0 [static]

pSCNINFO text_section = NULL [static]

BOOL Trace_Elf = FALSE [static]

Definition at line 258 of file cgemit.cxx.

Referenced by EMT_Begin_File(), and EMT_Put_Elf_Symbol().

BOOL Trace_Init = FALSE [static]

BOOL Trace_Inst = FALSE [static]

BOOL Trace_Longbr = FALSE [static]

Definition at line 259 of file cgemit.cxx.

Referenced by Create_Stub_BB(), and Fixup_Long_Branches().

Definition at line 261 of file cgemit.cxx.

Referenced by Can_OP_Move(), and Em_Options_Scn().

BOOL Use_Prefetch = FALSE [static]

Definition at line 262 of file cgemit.cxx.

Referenced by Em_Options_Scn(), and r_assemble_op().

return words = TI_ASM_Pack_Inst(opcode, result, opnd, pinst)

Definition at line 2274 of file cgemit.cxx.

Referenced by _find_dupcnt(), _X_PROP_CREATE_(), _X_PROP_INTERSECTION_IS_NONEMPTY_(), _X_PROP_UNIOND_(), alpha_arg_partial_bytes(), alpha_expand_block_clear(), alpha_expand_block_move(), BB_Check_Bundle_Integrity(), blk_match_err(), broadcast_scalar(), CGGRP_Check_Split_BB(), check_bool2_init(), check_cond_init(), check_for_dup_derived_type_lbl(), check_for_initialization(), check_init(), classify_argument(), cris_split_movdx(), d30v_expand_builtin_va_start(), d30v_function_arg_advance(), d30v_function_arg_partial_nregs(), expand_block_move(), find_constant_index(), Find_Pattern_OPS(), fr30_move_double(), frv_arg_partial_bytes(), frv_function_arg_advance(), function_arg(), function_arg_advance(), function_arg_partial_nregs(), gen_forall_derived_type(), gen_split_move_double(), ia64_arg_partial_bytes(), ia64_function_arg(), ia64_function_arg_advance(), ia64_function_arg_partial_nregs(), ia64_function_arg_words(), Instruction_Pack_Group(), iq2000_expand_prologue(), ISA_Pack_End(), ix86_expand_vector_init_general(), ix86_va_start(), m32r_arg_partial_bytes(), m88k_function_arg(), make_ro_entry(), match_blk(), md5_process_block(), minval_intrinsic(), mips_expand_prologue(), mt_arg_partial_bytes(), native_encode_int(), native_encode_real(), native_interpret_int(), native_interpret_real(), parse_case_stmt(), parse_cpnt_dcl_stmt(), parse_dir_directives(), parse_else_stmt(), parse_end_stmt(), power_o_two(), r_assemble_binary(), rs6000_output_load_multiple(), rs6000_va_start(), sh_arg_partial_bytes(), TI_ASM_Get_Bundle_Reloc_Value(), TI_ASM_Pack_Inst(), TI_ASM_Set_Bundle_Reloc_Value(), TI_ASM_Unpack_Inst(), write_constant(), and write_real_cst().


Generated on Wed Apr 8 14:25:47 2009 for Open64 by  doxygen 1.5.6