osprey/be/cg/SL/cgdwarf_targ.cxx File Reference

#include <stdio.h>
#include <stdlib.h>
#include "libelf/libelf.h"
#include <sys/unwindP.h>
#include <list>
#include "elf_stuff.h"
#include <elfaccess.h>
#include "dwarf.h"
#include "defs.h"
#include "erglob.h"
#include "glob.h"
#include "flags.h"
#include "tracing.h"
#include "em_elf.h"
#include "em_dwarf.h"
#include "config.h"
#include "config_asm.h"
#include "cgir.h"
#include "register.h"
#include "cgtarget.h"
#include "calls.h"
#include "stblock.h"
#include "data_layout.h"
#include "cg_spill.h"
#include "cgdwarf.h"
#include "cgdwarf_targ.h"
#include "dwarf_incl.h"
#include "pro_opaque.h"
#include "pro_frame.h"
#include "be_util.h"

Include dependency graph for cgdwarf_targ.cxx:

Go to the source code of this file.

Defines

#define FD_R0   0
#define FD_RA   FD_R0
#define FD_R1   1
#define FD_R2   2
#define FD_SL   FD_R2
#define FD_R3   3
#define FD_R4   4
#define FD_R5   5
#define FD_R6   6
#define FD_R7   7
#define FD_R8   8
#define FD_R9   9
#define FD_R10   10
#define FD_R11   11
#define FD_R12   12
#define FD_R13   13
#define FD_R14   14
#define FD_R15   15
#define FD_R16   16
#define FD_R17   17
#define FD_R18   18
#define FD_R19   19
#define FD_R20   20
#define FD_R21   21
#define FD_R22   22
#define FD_R23   23
#define FD_R24   24
#define FD_R25   25
#define FD_R26   26
#define FD_R27   27
#define FD_CFA   28
#define FD_R29   29
#define FD_R30   30
#define FD_S8   FD_R30
#define FD_R31   31
#define FD_FIRST   FD_R0
#define FD_LAST   32
#define AS_4BYTE   ".4byte"
#define AS_1BYTE   ".byte"
#define AS_ASCII   ".ascii"
#define AS_ULEBW   ".uleb128"
#define AS_SLEBW   ".sleb128"
#define LOCAL_STATE(bb)   (local_state[BB_id(bb)])
#define ENTRY_STATE(bb)   (entry_state[BB_id(bb)])
#define EXIT_STATE(bb)   (exit_state[BB_id(bb)])

Typedefs

typedef UINT32 FD_REG

Enumerations

enum  CGD_STATES {
  DS_In_Register, DS_In_Memory, DS_CFA_Is_SP, DS_CFA_Is_Adj_SP,
  DS_CFA_Is_FP, DS_CFA_Last, DS_In_Register, DS_In_Memory,
  DS_CFA_Is_SP, DS_CFA_Is_Adj_SP, DS_CFA_Is_FP, DS_CFA_Last
}

Functions/Subroutines

static void CIE_dump2asm (Dwarf_P_Cie cie)
static void FDE_dump2asm (INT low_pc, INT high_pc)
static void CIE_end_dump2asm (void)
static void FDE_end_dump2asm (void)
static INT CFA_dump2asm (Dwarf_Small dw_op, Dwarf_Unsigned op1, Dwarf_Unsigned op2)
static Dwarf_P_Fde Add_Fde_Inst (Dwarf_P_Fde fde, Dwarf_Small dw_op, Dwarf_Unsigned op1, Dwarf_Unsigned op2)
static Dwarf_P_Fde update_state (Dwarf_P_Fde fde, FD_REG fd_reg, CGD_STATES *current_state, CGD_STATES new_state)
static FD_REG Machine_Reg_To_FD (TN *tn, UINT32 mc_id, ISA_REGISTER_CLASS c)
void dump_tn (TN *)
static FD_REG Save_TN_to_fd (TN *tn)
static FD_REG TN_to_fd (TN *tn)
static void Compute_Reg_State (BB *firstbb)
static BOOL Has_Matching_Load_In_BB (BB *bb, TN *dest, TN *spill)
static BOOL Has_Matching_Store_In_BB (BB *bb, TN *dest, TN *spill)
static INT32 OP_Inst_Size (const OP *op)
Dwarf_P_Fde Build_Fde_For_Proc (Dwarf_P_Debug dw_dbg, BB *firstbb, LABEL_IDX begin_label, LABEL_IDX end_label, INT end_offset, INT low_pc, INT high_pc)
static BOOL Is_Unwind_Simple (void)
void Init_Unwind_Info (BOOL trace)
void Finalize_Unwind_Info (void)
void Emit_Unwind_Directives_For_OP (OP *op, FILE *f)
void Check_Dwarf_Rel (Elf32_Rel const &current_reloc)
void Check_Dwarf_Rel (Elf64_AltRel const &current_reloc)
void Check_Dwarf_Rela (const Elf64_AltRela &current_reloc)
void Check_Dwarf_Rela (const Elf32_Rela &current_reloc)
BOOL Is_Dwarf_Section_To_Emit (const char *name)

Variables

static Dwarf_Error dw_error
static BOOL Trace_Unwind = TRUE
static UINT last_when
static BOOL simple_unwind = FALSE
static BOOL has_asm = FALSE
static UINT last_label = 0
static BOOL has_create = FALSE
static const UINT32 fd_to_track [FD_LAST]
static const UINT32 fd_to_dwarf [FD_LAST]
static STfd_to_spill_loc [FD_LAST]
static STprev_fd_to_spill_loc [FD_LAST]
static const char * CGD_Name [DS_CFA_Last]
static char * fmt_string = "\t%s\t0x%x\n"
static INT unw_info_pu_start_count
static INT32 curloc
static INT32 lastloc
static INTlocal_state
static INTentry_state
static INTexit_state
static char * drop_these []


Define Documentation

#define AS_1BYTE   ".byte"

Definition at line 134 of file cgdwarf_targ.cxx.

#define AS_4BYTE   ".4byte"

Definition at line 133 of file cgdwarf_targ.cxx.

#define AS_ASCII   ".ascii"

Definition at line 135 of file cgdwarf_targ.cxx.

#define AS_SLEBW   ".sleb128"

Definition at line 137 of file cgdwarf_targ.cxx.

#define AS_ULEBW   ".uleb128"

Definition at line 136 of file cgdwarf_targ.cxx.

#define ENTRY_STATE ( bb   )     (entry_state[BB_id(bb)])

Definition at line 516 of file cgdwarf_targ.cxx.

#define EXIT_STATE ( bb   )     (exit_state[BB_id(bb)])

Definition at line 517 of file cgdwarf_targ.cxx.

#define FD_CFA   28

Definition at line 77 of file cgdwarf_targ.cxx.

#define FD_FIRST   FD_R0

Definition at line 82 of file cgdwarf_targ.cxx.

#define FD_LAST   32

Definition at line 83 of file cgdwarf_targ.cxx.

#define FD_R0   0

Definition at line 47 of file cgdwarf_targ.cxx.

#define FD_R1   1

Definition at line 49 of file cgdwarf_targ.cxx.

#define FD_R10   10

Definition at line 59 of file cgdwarf_targ.cxx.

#define FD_R11   11

Definition at line 60 of file cgdwarf_targ.cxx.

#define FD_R12   12

Definition at line 61 of file cgdwarf_targ.cxx.

#define FD_R13   13

Definition at line 62 of file cgdwarf_targ.cxx.

#define FD_R14   14

Definition at line 63 of file cgdwarf_targ.cxx.

#define FD_R15   15

Definition at line 64 of file cgdwarf_targ.cxx.

#define FD_R16   16

Definition at line 65 of file cgdwarf_targ.cxx.

#define FD_R17   17

Definition at line 66 of file cgdwarf_targ.cxx.

#define FD_R18   18

Definition at line 67 of file cgdwarf_targ.cxx.

#define FD_R19   19

Definition at line 68 of file cgdwarf_targ.cxx.

#define FD_R2   2

Definition at line 50 of file cgdwarf_targ.cxx.

#define FD_R20   20

Definition at line 69 of file cgdwarf_targ.cxx.

#define FD_R21   21

Definition at line 70 of file cgdwarf_targ.cxx.

#define FD_R22   22

Definition at line 71 of file cgdwarf_targ.cxx.

#define FD_R23   23

Definition at line 72 of file cgdwarf_targ.cxx.

#define FD_R24   24

Definition at line 73 of file cgdwarf_targ.cxx.

#define FD_R25   25

Definition at line 74 of file cgdwarf_targ.cxx.

#define FD_R26   26

Definition at line 75 of file cgdwarf_targ.cxx.

#define FD_R27   27

Definition at line 76 of file cgdwarf_targ.cxx.

#define FD_R29   29

Definition at line 78 of file cgdwarf_targ.cxx.

#define FD_R3   3

Definition at line 52 of file cgdwarf_targ.cxx.

#define FD_R30   30

Definition at line 79 of file cgdwarf_targ.cxx.

#define FD_R31   31

Definition at line 81 of file cgdwarf_targ.cxx.

#define FD_R4   4

Definition at line 53 of file cgdwarf_targ.cxx.

#define FD_R5   5

Definition at line 54 of file cgdwarf_targ.cxx.

#define FD_R6   6

Definition at line 55 of file cgdwarf_targ.cxx.

#define FD_R7   7

Definition at line 56 of file cgdwarf_targ.cxx.

#define FD_R8   8

Definition at line 57 of file cgdwarf_targ.cxx.

#define FD_R9   9

Definition at line 58 of file cgdwarf_targ.cxx.

#define FD_RA   FD_R0

Definition at line 48 of file cgdwarf_targ.cxx.

#define FD_S8   FD_R30

Definition at line 80 of file cgdwarf_targ.cxx.

#define FD_SL   FD_R2

Definition at line 51 of file cgdwarf_targ.cxx.

#define LOCAL_STATE ( bb   )     (local_state[BB_id(bb)])

Definition at line 515 of file cgdwarf_targ.cxx.


Typedef Documentation

typedef UINT32 FD_REG

Definition at line 85 of file cgdwarf_targ.cxx.


Enumeration Type Documentation

enum CGD_STATES

Enumerator:
DS_In_Register 
DS_In_Memory 
DS_CFA_Is_SP 
DS_CFA_Is_Adj_SP 
DS_CFA_Is_FP 
DS_CFA_Last 
DS_In_Register 
DS_In_Memory 
DS_CFA_Is_SP 
DS_CFA_Is_Adj_SP 
DS_CFA_Is_FP 
DS_CFA_Last 

Definition at line 115 of file cgdwarf_targ.cxx.


Function Documentation

static Dwarf_P_Fde Add_Fde_Inst ( Dwarf_P_Fde  fde,
Dwarf_Small  dw_op,
Dwarf_Unsigned  op1,
Dwarf_Unsigned  op2 
) [static]

Dwarf_P_Fde Build_Fde_For_Proc ( Dwarf_P_Debug  dw_dbg,
BB firstbb,
LABEL_IDX  begin_label,
LABEL_IDX  end_label,
INT  end_offset,
INT  low_pc,
INT  high_pc 
)

static INT CFA_dump2asm ( Dwarf_Small  dw_op,
Dwarf_Unsigned  op1,
Dwarf_Unsigned  op2 
) [static]

void Check_Dwarf_Rel ( Elf64_AltRel const &  current_reloc  ) 

Definition at line 1102 of file cgdwarf_targ.cxx.

References FmtAssert, R_IA_64_DIR64MSB, and REL64_type.

void Check_Dwarf_Rel ( Elf32_Rel const &  current_reloc  ) 

Definition at line 1094 of file cgdwarf_targ.cxx.

References FmtAssert, R_IA_64_DIR32MSB, and REL32_type.

void Check_Dwarf_Rela ( const Elf32_Rela current_reloc  ) 

Definition at line 1118 of file cgdwarf_targ.cxx.

References FALSE, FmtAssert, and REL32_type.

void Check_Dwarf_Rela ( const Elf64_AltRela current_reloc  ) 

Definition at line 1110 of file cgdwarf_targ.cxx.

References FALSE, FmtAssert, and REL64_type.

static void CIE_dump2asm ( Dwarf_P_Cie  cie  )  [static]

static void CIE_end_dump2asm ( void   )  [static]

Definition at line 191 of file cgdwarf_targ.cxx.

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

static void Compute_Reg_State ( BB firstbb  )  [static]

void dump_tn ( TN  ) 

Definition at line 1121 of file tnutil.cxx.

References fPrint_TN().

void Emit_Unwind_Directives_For_OP ( OP op,
FILE f 
)

Definition at line 1089 of file cgdwarf_targ.cxx.

static void FDE_dump2asm ( INT  low_pc,
INT  high_pc 
) [static]

static void FDE_end_dump2asm ( void   )  [static]

Definition at line 199 of file cgdwarf_targ.cxx.

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

void Finalize_Unwind_Info ( void   ) 

Definition at line 1083 of file cgdwarf_targ.cxx.

static BOOL Has_Matching_Load_In_BB ( BB bb,
TN dest,
TN spill 
) [static]

static BOOL Has_Matching_Store_In_BB ( BB bb,
TN dest,
TN spill 
) [static]

void Init_Unwind_Info ( BOOL  trace  ) 

BOOL Is_Dwarf_Section_To_Emit ( const char *  name  ) 

Definition at line 1140 of file cgdwarf_targ.cxx.

References FALSE, i, strcmp(), and TRUE.

static BOOL Is_Unwind_Simple ( void   )  [static]

Definition at line 1030 of file cgdwarf_targ.cxx.

References BB_entry, BB_exit, BB_next, BB_prev, FALSE, has_asm, NULL, TRUE, ue_iter, and ue_list.

static FD_REG Machine_Reg_To_FD ( TN tn,
UINT32  mc_id,
ISA_REGISTER_CLASS  c 
) [static]

Definition at line 428 of file cgdwarf_targ.cxx.

References FD_F20, FD_GP, FD_JA, FD_RA, FD_S0, FD_S8, Is_True, TN_is_float, TN_save_rclass, and TN_save_reg.

static INT32 OP_Inst_Size ( const OP op  )  [static]

Definition at line 715 of file cgdwarf_targ.cxx.

References INT, INT32, OP_code, OP_Real_Ops(), op::opr, Simulated_Op_Real_Inst_Words(), and size.

Referenced by Build_Fde_For_Proc().

static FD_REG Save_TN_to_fd ( TN tn  )  [static]

static FD_REG TN_to_fd ( TN tn  )  [static]

Definition at line 499 of file cgdwarf_targ.cxx.

References Machine_Reg_To_FD(), NULL, TN_register, TN_register_class, TN_spill, and UINT32.

static Dwarf_P_Fde update_state ( Dwarf_P_Fde  fde,
FD_REG  fd_reg,
CGD_STATES current_state,
CGD_STATES  new_state 
) [static]


Variable Documentation

const char* CGD_Name[DS_CFA_Last] [static]

Initial value:

 {
   "DS_In_Register",
   "DS_In_Memory",
   "DS_CFA_Is_SP",
   "DS_CFA_Is_Adj_SP",
   "DS_CFA_Is_FP"
}

Definition at line 124 of file cgdwarf_targ.cxx.

INT32 curloc [static]

Definition at line 258 of file cgdwarf_targ.cxx.

char* drop_these[] [static]

Initial value:

 {
      
      
  ".debug_line",
     
     
  ".debug_weaknames",
  ".debug_varnames",
  ".debug_typenames",
  ".debug_funcnames",
     
  ".debug_frame",
  0
}

Definition at line 1125 of file cgdwarf_targ.cxx.

Definition at line 33 of file cgdwarf_targ.cxx.

INT * entry_state [static]

Definition at line 513 of file cgdwarf_targ.cxx.

INT * exit_state [static]

Definition at line 513 of file cgdwarf_targ.cxx.

const UINT32 fd_to_dwarf[FD_LAST] [static]

ST* fd_to_spill_loc[FD_LAST] [static]

Definition at line 109 of file cgdwarf_targ.cxx.

const UINT32 fd_to_track[FD_LAST] [static]

Initial value:

 {
  
  
  
  1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 
  1, 1, 1, 1, 1, 1, 1, 0, 0, 0, 0, 0, 1, 1, 1, 0,
}

Definition at line 87 of file cgdwarf_targ.cxx.

char* fmt_string = "\t%s\t0x%x\n" [static]

Definition at line 132 of file cgdwarf_targ.cxx.

BOOL has_asm = FALSE [static]

Definition at line 37 of file cgdwarf_targ.cxx.

BOOL has_create = FALSE [static]

Definition at line 39 of file cgdwarf_targ.cxx.

UINT last_label = 0 [static]

Definition at line 38 of file cgdwarf_targ.cxx.

UINT last_when [static]

Definition at line 35 of file cgdwarf_targ.cxx.

INT32 lastloc [static]

Definition at line 258 of file cgdwarf_targ.cxx.

INT* local_state [static]

Definition at line 513 of file cgdwarf_targ.cxx.

ST* prev_fd_to_spill_loc[FD_LAST] [static]

Definition at line 111 of file cgdwarf_targ.cxx.

BOOL simple_unwind = FALSE [static]

Definition at line 36 of file cgdwarf_targ.cxx.

BOOL Trace_Unwind = TRUE [static]

Definition at line 34 of file cgdwarf_targ.cxx.

Definition at line 139 of file cgdwarf_targ.cxx.


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