Open64 (mfef90, whirl2f, and IR tools)
TAG: version-openad; SVN changeset: 916
|
#include <elf.h>
#include <cmplrs/rcodes.h>
#include <sys/resource.h>
#include "defs.h"
#include "erglob.h"
#include "erbe.h"
#include "config.h"
#include "tracing.h"
#include "strtab.h"
#include "stab.h"
#include "const.h"
#include "glob.h"
#include "mtypes.h"
#include "targ_const.h"
#include "targ_sim.h"
#include "ttype.h"
#include "irbdata.h"
#include "util.h"
#include "stblock.h"
#include "data_layout.h"
Go to the source code of this file.
Classes | |
struct | is_slink_sym |
Defines | |
#define | SYMTAB_level(s) s |
#define | Has_No_Base_Block(st) (ST_base(st) == st) |
#define | ROUNDUP(val, align) ( (-(INT64)align) & (INT64)(val+align-1) ) |
#define | ROUNDDOWN(val, align) ( (-(INT64)align) & (INT64)(val) ) |
Functions | |
INT16 | Adjusted_Alignment (ST *sym) |
ST * | New_ST_Block (STR_IDX name, BOOL is_global, ST_SCLASS sclass, UINT16 align, INT64 size) |
ST * | Copy_ST_Block (ST *orig_blk) |
static ST * | Create_And_Set_ST_Base (ST *blk1, ST *blk2, STACK_DIR dir) |
void | St_Block_Union (ST *blk1, ST *blk2) |
INT64 | Offset_From_Base_Symbol (ST *st) |
ST * | Base_Symbol (ST *st) |
void | Create_Slink_Symbol (void) |
ST * | Find_Slink_Symbol (SYMTAB_IDX stab) |
ST * | Find_Slink_For_ST (ST *st) |
ST * | Find_Slink_For_Scope (ST *function, ST *sym) |
BOOL | ST_is_uplevelTemp (const ST *st) |
void | Base_Symbol_And_Offset_For_Addressing (ST *sym, INT64 ofst, ST **base_symbol, INT64 *offset_from_base) |
#define Has_No_Base_Block | ( | st | ) | (ST_base(st) == st) |
Definition at line 78 of file stblock.cxx.
Referenced by Create_And_Set_ST_Base().
Definition at line 81 of file stblock.cxx.
Definition at line 80 of file stblock.cxx.
Referenced by St_Block_Union().
#define SYMTAB_level | ( | s | ) | s |
Definition at line 76 of file stblock.cxx.
Referenced by Find_Slink_For_ST().
INT16 Adjusted_Alignment | ( | ST * | sym | ) |
Definition at line 94 of file stblock.cxx.
References Aggregate_Alignment, CLASS_BLOCK, CLASS_CONST, CLASS_VAR, Is_Composite_Type(), Is_Structure_Type(), KIND_POINTER, KIND_SCALAR, MAX, MTYPE_align_best, MTYPE_STR, nearest_power_of_two(), SCLASS_AUTO, SCLASS_COMMON, SCLASS_DGLOBAL, SCLASS_FORMAL, SCLASS_FSTATIC, SCLASS_PSTATIC, SCLASS_UGLOBAL, size, Spill_Int_Mtype, ST_class(), ST_is_datapool(), ST_sclass(), ST_size(), ST_type(), stack_align, Stack_Alignment(), STB_align(), STC_val(), TCON_ty, TRUE, TY_align(), TY_is_packed(), TY_kind(), TY_pointed(), and Ty_Table.
Referenced by Allocate_Entry_Formal(), Allocate_Object(), Allocate_Space(), Assign_Offset(), Calc_Local_Area(), Create_And_Set_ST_Base(), Shorten_Section(), and St_Block_Union().
ST* Base_Symbol | ( | ST * | st | ) |
Definition at line 376 of file stblock.cxx.
References Base_Symbol_And_Offset().
Referenced by Allocate_Object(), Create_And_Set_ST_Base(), and ST_on_stack().
void Base_Symbol_And_Offset_For_Addressing | ( | ST * | sym, |
INT64 | ofst, | ||
ST ** | base_symbol, | ||
INT64 * | offset_from_base | ||
) |
Definition at line 526 of file stblock.cxx.
References Gen_PIC_Call_Shared, Gen_PIC_Shared, SCLASS_TEXT, ST_base(), ST_is_preemptible(), ST_ofst(), and ST_sclass().
ST* Copy_ST_Block | ( | ST * | orig_blk | ) |
Definition at line 234 of file stblock.cxx.
References GLOBAL_SYMTAB, New_ST_Block(), Set_STB_flags(), Set_STB_scninfo_idx(), Set_STB_section_idx(), ST_level(), ST_name_idx(), ST_sclass(), STB_align(), STB_flags(), STB_scninfo_idx(), STB_section_idx(), and STB_size().
Referenced by Get_Section_ST_With_Given_Name().
static ST* Create_And_Set_ST_Base | ( | ST * | blk1, |
ST * | blk2, | ||
STACK_DIR | dir | ||
) | [static] |
Definition at line 261 of file stblock.cxx.
References Adjusted_Alignment(), Base_Symbol(), CLASS_BLOCK, DECREMENT, Enter_ST, FmtAssert, Has_No_Base_Block, Is_Global_Symbol(), Is_True, New_ST_Block(), Save_Str2(), SCLASS_UNKNOWN, Set_ST_base(), Set_STB_decrement, ST_class(), ST_name(), ST_sclass(), and ST_size().
Referenced by St_Block_Union().
void Create_Slink_Symbol | ( | void | ) |
Definition at line 388 of file stblock.cxx.
References Gen_Temp_Symbol(), Get_Current_PU(), MTYPE_To_TY, Pointer_type, and PU_is_nested_func().
ST* Find_Slink_For_Scope | ( | ST * | function, |
ST * | sym | ||
) |
Definition at line 466 of file stblock.cxx.
References CURRENT_SYMTAB, Find_Slink_Symbol(), Is_True, NULL, PU_lexical_level(), and SYMTAB_parent.
ST* Find_Slink_For_ST | ( | ST * | st | ) |
Definition at line 431 of file stblock.cxx.
References CURRENT_SYMTAB, FALSE, Find_Slink_Symbol(), FmtAssert, Is_True, NULL, ST_level(), ST_name(), SYMTAB_level, and SYMTAB_parent.
ST* Find_Slink_Symbol | ( | SYMTAB_IDX | stab | ) |
Definition at line 406 of file stblock.cxx.
References For_all_until(), Get_Scope_PU(), NULL, PU_is_nested_func(), and St_Table.
Referenced by Find_Slink_For_Scope(), and Find_Slink_For_ST().
Definition at line 221 of file stblock.cxx.
References CLASS_BLOCK, CURRENT_SYMTAB, EXPORT_LOCAL, GLOBAL_SYMTAB, New_BLK(), New_ST(), Set_ST_blk(), Set_STB_align(), Set_STB_size(), and ST_Init().
Referenced by Copy_ST_Block(), Create_And_Set_ST_Base(), Create_Local_Block(), Fill_Align_Symbol(), and Get_Section_ST().
INT64 Offset_From_Base_Symbol | ( | ST * | st | ) |
Definition at line 357 of file stblock.cxx.
References Base_Symbol_And_Offset().
void St_Block_Union | ( | ST * | blk1, |
ST * | blk2 | ||
) |
Definition at line 313 of file stblock.cxx.
References Adjusted_Alignment(), Allocate_Object(), Create_And_Set_ST_Base(), fprintf(), Get_Trace(), INCREMENT, Is_Global_Symbol(), Is_True, MAX, ROUNDUP, Set_ST_ofst(), Set_STB_align(), Set_STB_size(), ST_is_initialized(), ST_name(), ST_sclass(), ST_size(), STB_align(), TFile, and TP_DATALAYOUT.
Referenced by pad_global_arrays::operator()().
BOOL ST_is_uplevelTemp | ( | const ST * | st | ) |
Definition at line 487 of file stblock.cxx.
References CLASS_BLOCK, CLASS_VAR, FALSE, Get_Current_PU(), Is_Global_Symbol(), Is_Local_Symbol(), PU_has_altentry(), SCLASS_AUTO, SCLASS_FORMAL, ST_class(), ST_declared_static(), ST_sclass(), and TRUE.