#include <bstring.h>#include "elf_stuff.h"#include "libelf/libelf.h"#include <elfaccess.h>#include <stdlib.h>#include <cmplrs/elf_interfaces.h>#include "defs.h"#include "config.h"#include "config_debug.h"#include "symtab.h"#include "erglob.h"#include "erlib.h"#include "ercg.h"#include "flags.h"#include "glob.h"#include "tracing.h"#include "tn.h"#include "calls.h"#include "targ_sim.h"#include "ttype.h"#include "em_elf.h"#include "cgemit.h"#include "iface_scn.h"

Go to the source code of this file.
| #define IFACE_SCN_HASH_SIZE (1013) |
Definition at line 167 of file iface_scn.cxx.
Referenced by Hash_INTERFACE_SCN(), and Interface_Scn_End_File().
| #define INTERFACE_SCN_eid | ( | is | ) | ((is).eid) |
Definition at line 140 of file iface_scn.cxx.
Referenced by Interface_Scn_Add_Call(), and Interface_Scn_Add_Def().
| #define INTERFACE_SCN_next | ( | is | ) | ((is).next) |
Definition at line 143 of file iface_scn.cxx.
| #define INTERFACE_SCN_parm | ( | is | ) | ((is).parm) |
Definition at line 141 of file iface_scn.cxx.
| #define INTERFACE_SCN_symbol | ( | is | ) | ((is).symbol) |
Definition at line 142 of file iface_scn.cxx.
| #define pINTERFACE_SCN_eid | ( | pis | ) | ((pis)->eid) |
Definition at line 144 of file iface_scn.cxx.
Referenced by Cmp_Interface_Scn(), Emit_Interface_Scn(), Hash_INTERFACE_SCN(), Initialize_Interface_Description(), Print_INTERFACE_SCN(), Set_Parameter_Info(), and Update_Interface_Scn().
| #define pINTERFACE_SCN_next | ( | pis | ) | ((pis)->next) |
Definition at line 147 of file iface_scn.cxx.
Referenced by Add_Interface_Description(), Interface_Scn_End_File(), and Is_Duplicate_Interface_Description().
| #define pINTERFACE_SCN_parm | ( | pis | ) | ((pis)->parm) |
Definition at line 145 of file iface_scn.cxx.
Referenced by Emit_Interface_Scn(), and Set_Parameter_Info().
| #define pINTERFACE_SCN_symbol | ( | pis | ) | ((pis)->symbol) |
Definition at line 146 of file iface_scn.cxx.
Referenced by Emit_Interface_Scn(), Hash_INTERFACE_SCN(), Initialize_Interface_Description(), and Update_Interface_Scn().
| #define pPARM_DESCRIPTOR_flags | ( | ppd | ) | ((ppd)->flags) |
Definition at line 155 of file iface_scn.cxx.
Referenced by Classify_Type(), and Emit_Interface_Scn().
| #define pPARM_DESCRIPTOR_fundamental_type | ( | ppd | ) | ((ppd)->fundamental_type) |
Definition at line 157 of file iface_scn.cxx.
Referenced by Classify_Type(), and Emit_Interface_Scn().
| #define pPARM_DESCRIPTOR_next | ( | ppd | ) | ((ppd)->next) |
Definition at line 161 of file iface_scn.cxx.
Referenced by Add_Parameter_Descriptor(), and Emit_Interface_Scn().
| #define pPARM_DESCRIPTOR_qual_count | ( | ppd | ) | ((ppd)->qual_count) |
Definition at line 156 of file iface_scn.cxx.
Referenced by Classify_Type(), and Emit_Interface_Scn().
| #define pPARM_DESCRIPTOR_qualifiers | ( | ppd | ) | ((ppd)->qualifiers) |
| #define pPARM_DESCRIPTOR_size | ( | ppd | ) | ((ppd)->size) |
Definition at line 160 of file iface_scn.cxx.
Referenced by Classify_Type(), and Emit_Interface_Scn().
| #define pPARM_PROFILE_first | ( | ppp | ) | ((ppp)->first) |
Definition at line 152 of file iface_scn.cxx.
Referenced by Add_Parameter_Descriptor(), and Emit_Interface_Scn().
| #define pPARM_PROFILE_last | ( | ppp | ) | ((ppp)->last) |
| #define pPARM_PROFILE_parm_count | ( | ppp | ) | ((ppp)->parm_count) |
Definition at line 150 of file iface_scn.cxx.
Referenced by Add_Parameter_Descriptor(), Add_Result_Descriptor(), Emit_Interface_Scn(), and Set_Parameter_Info().
| #define pPARM_PROFILE_result | ( | ppp | ) | ((ppp)->result) |
Definition at line 151 of file iface_scn.cxx.
Referenced by Add_Result_Descriptor(), Emit_Interface_Scn(), and Set_Parameter_Info().
| #define pPARM_PROFILE_var_size | ( | ppp | ) | ((ppp)->var_size) |
Definition at line 149 of file iface_scn.cxx.
Referenced by Add_Parameter_Descriptor(), Add_Result_Descriptor(), Emit_Interface_Scn(), and Set_Parameter_Info().
| #define USE_STANDARD_TYPES 1 |
Definition at line 78 of file iface_scn.cxx.
| typedef struct interface_scn INTERFACE_SCN |
| typedef struct parm_descriptor PARM_DESCRIPTOR |
| typedef struct parm_profile PARM_PROFILE |
| static void Add_Interface_Description | ( | INTERFACE_SCN * | desc | ) | [static] |
Definition at line 368 of file iface_scn.cxx.
References Hash_INTERFACE_SCN(), Iface_Scn_Hash_Count, INT32, pINTERFACE_SCN_next, Print_INTERFACE_SCN(), Trace_Iface, and TYPE_SRC_ALLOC.
Referenced by Interface_Scn_Add_Call(), and Interface_Scn_Add_Def().
| static void Add_Parameter_Descriptor | ( | PARM_PROFILE * | current_profile, | |
| TY_IDX | arg_type, | |||
| BOOL | ign_cv | |||
| ) | [static] |
Definition at line 601 of file iface_scn.cxx.
References bzero(), Classify_Type(), fprintf(), mUINT8, NULL, pPARM_DESCRIPTOR_next, pPARM_PROFILE_first, pPARM_PROFILE_last, pPARM_PROFILE_parm_count, pPARM_PROFILE_var_size, TFile, Trace_Iface, and TYPE_SRC_ALLOC.
Referenced by Set_Parameter_Info().
| static void Add_Result_Descriptor | ( | PARM_PROFILE * | current_profile, | |
| TY_IDX | ret_type | |||
| ) | [static] |
Definition at line 640 of file iface_scn.cxx.
References bzero(), Classify_Type(), mUINT8, pPARM_PROFILE_parm_count, pPARM_PROFILE_result, pPARM_PROFILE_var_size, and TYPE_SRC_ALLOC.
Referenced by Set_Parameter_Info().
| static mUINT8 Classify_Type | ( | PARM_DESCRIPTOR * | pd, | |
| TY_IDX | arg_type, | |||
| BOOL | ign_cv | |||
| ) | [static] |
Definition at line 399 of file iface_scn.cxx.
References FT_signed_char, FT_signed_int32, FT_signed_int64, FT_signed_short, FT_unsigned_char, FT_unsigned_int32, FT_unsigned_int64, FT_unsigned_short, FT_void, KIND_ARRAY, KIND_FUNCTION, KIND_INVALID, KIND_POINTER, KIND_SCALAR, KIND_STRUCT, KIND_VOID, MOD_const, MOD_pointer_to, MOD_volatile, MTYPE_C10, MTYPE_C4, MTYPE_C8, MTYPE_CQ, MTYPE_F10, MTYPE_F16, MTYPE_F4, MTYPE_F8, MTYPE_FQ, MTYPE_I1, MTYPE_I2, MTYPE_I4, MTYPE_I8, MTYPE_U1, MTYPE_U2, MTYPE_U4, MTYPE_U8, MTYPE_V, mUINT8, pPARM_DESCRIPTOR_flags, pPARM_DESCRIPTOR_fundamental_type, pPARM_DESCRIPTOR_qual_count, pPARM_DESCRIPTOR_qualifiers, pPARM_DESCRIPTOR_size, Print_TY(), TFile, Trace_Iface, TY_etype, TY_is_const, TY_is_union, TY_is_volatile, TY_kind, TY_mtype, TY_pointed, TY_ret_type, and TY_size.
Referenced by Add_Parameter_Descriptor(), and Add_Result_Descriptor().
Definition at line 1113 of file iface_scn.cxx.
References i1, i2, and pINTERFACE_SCN_eid.
Referenced by Sort_Interface_Scn().
| static void Emit_Interface_Scn | ( | INTERFACE_SCN * | iface_scn | ) | [static] |
Definition at line 945 of file iface_scn.cxx.
References bcopy(), d, DEBUG_Full_Interface_Check, EC_Unimplemented, Em_Add_New_Interface(), ErrMsg(), fprintf(), idata, Is_True, mUINT16, mUINT32, mUINT8, n, NULL, pINTERFACE_SCN_eid, pINTERFACE_SCN_parm, pINTERFACE_SCN_symbol, pPARM_DESCRIPTOR_flags, pPARM_DESCRIPTOR_fundamental_type, pPARM_DESCRIPTOR_next, pPARM_DESCRIPTOR_qual_count, pPARM_DESCRIPTOR_qualifier, pPARM_DESCRIPTOR_size, pPARM_PROFILE_first, pPARM_PROFILE_parm_count, pPARM_PROFILE_result, pPARM_PROFILE_var_size, putc(), ST_name, TFile, Trace_Iface, TYPE_SRC_ALLOC_N, and variable_size().
Referenced by Interface_Scn_End_File().
| static UINT32 Hash_INTERFACE_SCN | ( | INTERFACE_SCN * | iface_scn | ) | [static] |
Definition at line 230 of file iface_scn.cxx.
References IFACE_SCN_HASH_SIZE, pINTERFACE_SCN_eid, pINTERFACE_SCN_symbol, and UINT32.
Referenced by Add_Interface_Description(), and Is_Duplicate_Interface_Description().
| static void Initialize_Interface_Description | ( | INTERFACE_SCN * | desc, | |
| ST * | symbol | |||
| ) | [static] |
Definition at line 254 of file iface_scn.cxx.
References bzero(), EC_Inv_TY, EMT_Put_Elf_Symbol(), ErrMsg(), KIND_FUNCTION, Kind_Name(), NULL, pINTERFACE_SCN_eid, pINTERFACE_SCN_symbol, ST_addr_taken, ST_pu_type, TY_has_prototype, TY_is_varargs, and TY_kind.
Referenced by Interface_Scn_Add_Call(), and Interface_Scn_Add_Def().
Definition at line 1314 of file iface_scn.cxx.
References Add_Interface_Description(), DEBUG_Full_Interface_Check, FALSE, fprintf(), Initialize_Interface_Description(), INTERFACE_SCN_eid, Is_Duplicate_Interface_Description(), Print_ST(), Set_Parameter_Info(), ST_flags, ST_name, ST_pu_type, ST_sclass, ST_symclass, STF_flags2, TFile, Trace_Iface, and Want_Interface_Section_For_Function().
Referenced by CGEMIT_Add_Call_Information().
Definition at line 1246 of file iface_scn.cxx.
References Add_Interface_Description(), CLASS_FUNC, DEBUG_Full_Interface_Check, EC_Unimplemented, ErrMsg(), FALSE, fprintf(), Initialize_Interface_Description(), INTERFACE_SCN_eid, Print_ST(), Set_Parameter_Info(), ST_class, ST_flags, ST_name, ST_pu_type, ST_sclass, ST_symclass, STF_flags2, TFile, Trace_Iface, and Want_Interface_Section_For_Function().
Referenced by EMT_Assemble_BB().
Definition at line 1166 of file iface_scn.cxx.
References bzero(), fprintf(), Get_Trace(), Iface_Scn_Hash_Count, TFile, TP_EMIT, and Trace_Iface.
Referenced by EMT_Begin_File().
Definition at line 1193 of file iface_scn.cxx.
References Emit_Interface_Scn(), fprintf(), Iface_Scn_Hash_Count, IFACE_SCN_HASH_SIZE, INT32, Is_True, NULL, pINTERFACE_SCN_next, Sort_Interface_Scn(), TFile, Trace_Iface, TYPE_SRC_ALLOC_N, and Update_Interface_Scn().
Referenced by EMT_End_File().
| static BOOL Is_Duplicate_Interface_Description | ( | INTERFACE_SCN * | desc | ) | [static] |
Definition at line 298 of file iface_scn.cxx.
References bcmp(), FALSE, Hash_INTERFACE_SCN(), INT32, NULL, pINTERFACE_SCN_next, and TRUE.
Referenced by Interface_Scn_Add_Call().
| static void Print_Elf_Interface_Descriptor | ( | Elf_Ifd * | eid | ) | [static] |
Definition at line 181 of file iface_scn.cxx.
References fprintf(), and TFile.
Referenced by Print_INTERFACE_SCN().
| static void Print_INTERFACE_SCN | ( | INTERFACE_SCN * | iface_scn | ) | [static] |
Definition at line 214 of file iface_scn.cxx.
References pINTERFACE_SCN_eid, and Print_Elf_Interface_Descriptor().
Referenced by Add_Interface_Description(), and Sort_Interface_Scn().
| static void Set_Parameter_Info | ( | INTERFACE_SCN * | iface_scn, | |
| TY_IDX | func_type, | |||
| WN * | rwn | |||
| ) | [static] |
Definition at line 666 of file iface_scn.cxx.
References Add_Parameter_Descriptor(), Add_Result_Descriptor(), BOOL, bzero(), DEBUG_Full_Interface_Check, First_Float_Preg_Param_Offset, First_Input_PLOC_Reg(), First_Output_PLOC_Reg(), Float_Preg_Min_Offset, fprintf(), FT_void, parm_descriptor::fundamental_type, Get_Input_Parameter_Location(), Get_Output_Parameter_Location(), i, INT, mINT32, mUINT32, Next_Input_PLOC_Reg(), Next_Output_PLOC_Reg(), NULL, OPR_FUNC_ENTRY, pINTERFACE_SCN_eid, pINTERFACE_SCN_parm, PLOC_is_nonempty, PLOC_reg, PLOC_total_size, pPARM_PROFILE_parm_count, pPARM_PROFILE_result, pPARM_PROFILE_var_size, Preg_Offset_Is_Float, Print_TY(), parm_descriptor::qual_count, parm_profile::result, Setup_Input_Parameter_Locations(), Setup_Output_Parameter_Locations(), TFile, Trace_Iface, TY_Of_Parameter(), TY_ret_type, TY_return_to_param, TYPE_SRC_ALLOC, WN_actual, WN_num_actuals(), WN_num_formals, and WN_operator().
Referenced by Interface_Scn_Add_Call(), and Interface_Scn_Add_Def().
| static void Sort_Interface_Scn | ( | INTERFACE_SCN * | sort_array[], | |
| INT32 | count | |||
| ) | [static] |
Definition at line 1129 of file iface_scn.cxx.
References Cmp_Interface_Scn(), fprintf(), INT32, Print_INTERFACE_SCN(), qsort(), TFile, and Trace_Iface.
Referenced by Interface_Scn_End_File().
| static void Update_Interface_Scn | ( | INTERFACE_SCN * | iface_scn | ) | [static] |
Definition at line 924 of file iface_scn.cxx.
References EMT_Put_Elf_Symbol(), Is_True, NULL, pINTERFACE_SCN_eid, pINTERFACE_SCN_symbol, and sym.
Referenced by Interface_Scn_End_File().
Definition at line 331 of file iface_scn.cxx.
References DEBUG_Full_Interface_Check, EXPORT_OPTIONAL, EXPORT_PREEMPTIBLE, EXPORT_PROTECTED, FALSE, NULL, ST_export, ST_is_export_local(), and TRUE.
Referenced by Interface_Scn_Add_Call(), and Interface_Scn_Add_Def().
INT32 Iface_Scn_Hash_Count [static] |
Definition at line 169 of file iface_scn.cxx.
Referenced by Add_Interface_Description(), Interface_Scn_Begin_File(), and Interface_Scn_End_File().
INTERFACE_SCN* Iface_Scn_Hash_Table[IFACE_SCN_HASH_SIZE] [static] |
Definition at line 168 of file iface_scn.cxx.
BOOL Trace_Iface = FALSE [static] |
Definition at line 164 of file iface_scn.cxx.
Referenced by Add_Interface_Description(), Add_Parameter_Descriptor(), Classify_Type(), Emit_Interface_Scn(), Interface_Scn_Add_Call(), Interface_Scn_Add_Def(), Interface_Scn_Begin_File(), Interface_Scn_End_File(), Set_Parameter_Info(), and Sort_Interface_Scn().
1.5.6