osprey/be/cg/x8664/cgemit_targ.cxx File Reference

#include <stdint.h>
#include "elf_stuff.h"
#include "defs.h"
#include "config_targ_opt.h"
#include "targ_const.h"
#include "targ_const_private.h"
#include "vstring.h"
#include "config_asm.h"
#include "em_elf.h"
#include "symtab.h"
#include "tn.h"
#include "cgemit.h"
#include "cgemit_targ.h"
#include "cgtarget.h"
#include "data_layout.h"
#include "bb.h"
#include "op.h"
#include "iface_scn.h"
#include "cg_flags.h"
#include "glob.h"
#include "sections.h"
#include "targ_isa_print.h"
#include "config_debug.h"

Include dependency graph for cgemit_targ.cxx:

Go to the source code of this file.

Defines

#define USE_STANDARD_TYPES   1
#define EH_REGION_LINKONCE_PREFIX   ".gnu.linkonce.e."
#define EH_DESC_LINKONCE_PREFIX   ".gnu.linkonce.h."
#define NAME_LEN   8192

Enumerations

enum  OPND_REG {
  BYTE_REG = 0, WORD_REG, DWORD_REG, QWORD_REG,
  SSE2_REG
}

Functions/Subroutines

static BOOL Non_Default_Text_Section (ST *pu)
void CGEMIT_Targ_Initialize (ST *pu)
void CGEMIT_Targ_Text_Initialize (ST *pu)
void CGEMIT_Targ_Text_Finalize (ST *pu)
BOOL CGEMIT_Align_Section_Once (const char *scn_name)
void CGEMIT_Prn_File_Dir_In_Asm (USRCPOS usrcpos, const char *pathname, const char *filename)
void CGEMIT_Prn_Line_Dir_In_Asm (USRCPOS usrcpos)
void CGEMIT_Prn_Scn_In_Asm (ST *st, ST *cur_section)
void CGEMIT_Prn_Scn_In_Asm (FILE *asm_file, const char *scn_name, Elf64_Word scn_type, Elf64_Word scn_flags, Elf64_Xword scn_entsize, Elf64_Word scn_align, const char *cur_scn_name)
void CGEMIT_Change_Origin_In_Asm (ST *st, INT64 offset)
BOOL CGEMIT_Use_Base_ST_For_Reloc (INT reloc, ST *st)
INT CGEMIT_Relocs_In_Asm (TN *t, ST *st, vstring *buf, INT64 *val)
void CGEMIT_Relocs_In_Object (TN *t, ST *st, INT32 PC, pSCNINFO PU_section, INT64 *val)
void CGEMIT_Add_Call_Information (OP *op, BB *bb, INT32 PC, pSCNINFO PU_section)
void CGEMIT_Gen_Asm_Frame (INT64 frame_len)
void CGEMIT_Prn_Ent_In_Asm (ST *pu)
void STACK_FP_Fixup_PU ()
void CGEMIT_Weak_Alias (ST *sym, ST *strongsym)
void CGEMIT_Write_Literal_TCON (ST *lit_st, TCON tcon)
void CGEMIT_Write_Literal_Label (ST *lit_st, LABEL_IDX lab)
void CGEMIT_Write_Literal_Symbol (ST *lit_st, ST *sym, Elf64_Sxword sym_ofst)
void CGEMIT_Alias (ST *sym, ST *strongsym)
static void Init_OP_Name ()
static enum OPND_REG Get_Opnd_Reg (TOP topcode, int opnd)
static void Str_Prepend (char *str, char c)
static void Adjust_Opnd_Name (OP *op, int opnd, char *name)
static const char * Segment_Prefix (OP *op)
INT CGEMIT_Print_Inst (OP *op, const char *result[], const char *opnd[], FILE *f)
void CGEMIT_Setup_Ctrl_Register (FILE *f)
void CGEMIT_Setup_IP_Calc (void)

Variables

const char * ip_calc_funcname
static STcurrent_pu = NULL
static const char * OP_Name [TOP_count]
static const char * int_reg_names [4][16]


Define Documentation

#define EH_DESC_LINKONCE_PREFIX   ".gnu.linkonce.h."

#define EH_REGION_LINKONCE_PREFIX   ".gnu.linkonce.e."

#define NAME_LEN   8192

Definition at line 1502 of file cgemit_targ.cxx.

Referenced by CGEMIT_Print_Inst().

#define USE_STANDARD_TYPES   1

Definition at line 71 of file cgemit_targ.cxx.


Enumeration Type Documentation

enum OPND_REG

Enumerator:
BYTE_REG 
WORD_REG 
DWORD_REG 
QWORD_REG 
SSE2_REG 

Definition at line 1504 of file cgemit_targ.cxx.


Function Documentation

static void Adjust_Opnd_Name ( OP op,
int  opnd,
char *  name 
) [static]

void CGEMIT_Add_Call_Information ( OP op,
BB bb,
INT32  PC,
pSCNINFO  PU_section 
)

void CGEMIT_Alias ( ST sym,
ST strongsym 
)

BOOL CGEMIT_Align_Section_Once ( const char *  scn_name  ) 

Definition at line 134 of file cgemit_targ.cxx.

References strcmp().

void CGEMIT_Change_Origin_In_Asm ( ST st,
INT64  offset 
)

void CGEMIT_Gen_Asm_Frame ( INT64  frame_len  ) 

INT CGEMIT_Print_Inst ( OP op,
const char *  result[],
const char *  opnd[],
FILE f 
)

void CGEMIT_Prn_Ent_In_Asm ( ST pu  ) 

Definition at line 519 of file cgemit_targ.cxx.

References FmtAssert.

Referenced by EMT_Emit_PU().

void CGEMIT_Prn_File_Dir_In_Asm ( USRCPOS  usrcpos,
const char *  pathname,
const char *  filename 
)

Definition at line 140 of file cgemit_targ.cxx.

References AS_FILE, Asm_File, CG_emit_non_gas_syntax, fprintf(), and USRCPOS_filenum.

Referenced by Cg_Dwarf_Add_Line_Entry().

void CGEMIT_Prn_Line_Dir_In_Asm ( USRCPOS  usrcpos  ) 

void CGEMIT_Prn_Scn_In_Asm ( FILE asm_file,
const char *  scn_name,
Elf64_Word  scn_type,
Elf64_Word  scn_flags,
Elf64_Xword  scn_entsize,
Elf64_Word  scn_align,
const char *  cur_scn_name 
)

void CGEMIT_Prn_Scn_In_Asm ( ST st,
ST cur_section 
)

INT CGEMIT_Relocs_In_Asm ( TN t,
ST st,
vstring buf,
INT64 val 
)

void CGEMIT_Relocs_In_Object ( TN t,
ST st,
INT32  PC,
pSCNINFO  PU_section,
INT64 val 
)

Definition at line 462 of file cgemit_targ.cxx.

References FALSE, and FmtAssert.

Referenced by r_assemble_binary().

void CGEMIT_Setup_Ctrl_Register ( FILE f  ) 

void CGEMIT_Setup_IP_Calc ( void   ) 

Definition at line 1889 of file cgemit_targ.cxx.

References Asm_File, fprintf(), and ip_calc_funcname.

Referenced by EETARG_Emit_IP_Calc_Func().

void CGEMIT_Targ_Initialize ( ST pu  ) 

Definition at line 111 of file cgemit_targ.cxx.

void CGEMIT_Targ_Text_Finalize ( ST pu  ) 

Definition at line 126 of file cgemit_targ.cxx.

References Asm_File, fprintf(), and Non_Default_Text_Section().

void CGEMIT_Targ_Text_Initialize ( ST pu  ) 

Definition at line 118 of file cgemit_targ.cxx.

References Asm_File, fprintf(), Non_Default_Text_Section(), ST_base, and ST_name.

BOOL CGEMIT_Use_Base_ST_For_Reloc ( INT  reloc,
ST st 
)

void CGEMIT_Weak_Alias ( ST sym,
ST strongsym 
)

Definition at line 531 of file cgemit_targ.cxx.

References AS_WEAK, Asm_File, CGEMIT_Alias(), fprintf(), and ST_name.

Referenced by EMT_End_File().

void CGEMIT_Write_Literal_Label ( ST lit_st,
LABEL_IDX  lab 
)

void CGEMIT_Write_Literal_Symbol ( ST lit_st,
ST sym,
Elf64_Sxword  sym_ofst 
)

void CGEMIT_Write_Literal_TCON ( ST lit_st,
TCON  tcon 
)

static enum OPND_REG Get_Opnd_Reg ( TOP  topcode,
int  opnd 
) [static]

Definition at line 1506 of file cgemit_targ.cxx.

References BYTE_REG, DWORD_REG, FmtAssert, Is_Target_32bit, Pointer_Size, QWORD_REG, SSE2_REG, and WORD_REG.

Referenced by Adjust_Opnd_Name().

static void Init_OP_Name (  )  [static]

static BOOL Non_Default_Text_Section ( ST pu  )  [static]

Definition at line 100 of file cgemit_targ.cxx.

References FALSE, SCLASS_TEXT, ST_base, ST_name, ST_sclass, and strcmp().

static const char* Segment_Prefix ( OP op  )  [static]

Definition at line 1679 of file cgemit_targ.cxx.

References CGTARG_Is_Thread_Local_Memory_OP(), and Is_Target_32bit.

Referenced by CGEMIT_Print_Inst().

void STACK_FP_Fixup_PU (  ) 

Definition at line 527 of file cgemit_targ.cxx.

Referenced by EMT_Emit_PU().

static void Str_Prepend ( char *  str,
char  c 
) [static]

Definition at line 1554 of file cgemit_targ.cxx.

References i, and strlen().

Referenced by Adjust_Opnd_Name().


Variable Documentation

ST* current_pu = NULL [static]

Definition at line 97 of file cgemit_targ.cxx.

const char* int_reg_names[4][16] [static]

Initial value:

 {
  
  { "%al", "%bl", "%bpl", "%spl", "%dil", "%sil", "%dl", "%cl",
    "%r8b",  "%r9b",  "%r10b", "%r11b", "%r12b", "%r13b", "%r14b", "%r15b" },
  
  { "%ax", "%bx", "%bp", "%sp", "%di", "%si", "%dx", "%cx",
    "%r8w",  "%r9w",  "%r10w", "%r11w", "%r12w", "%r13w", "%r14w", "%r15w" },
  
  { "%eax", "%ebx", "%ebp", "%esp", "%edi", "%esi", "%edx", "%ecx",
    "%r8d",  "%r9d",  "%r10d", "%r11d", "%r12d", "%r13d", "%r14d", "%r15d" },
  
  { "%rax", "%rbx", "%rbp", "%rsp", "%rdi", "%rsi", "%rdx", "%rcx",
    "%r8",  "%r9",  "%r10", "%r11", "%r12", "%r13", "%r14", "%r15" },
}

Definition at line 1563 of file cgemit_targ.cxx.

const char* ip_calc_funcname

Definition at line 79 of file entry_exit_targ.cxx.

Referenced by CGEMIT_Setup_IP_Calc(), and EETARG_Generate_PIC_Entry_Code().

const char* OP_Name[TOP_count] [static]

Definition at line 625 of file cgemit_targ.cxx.

Referenced by CGEMIT_Print_Inst(), and Init_OP_Name().


Generated on Wed Apr 8 14:26:57 2009 for Open64 by  doxygen 1.5.6