Open64 (mfef90, whirl2f, and IR tools)
TAG: version-openad; SVN changeset: 916
|
#include <limits.h>
#include "defs.h"
#include "mtypes.h"
#include "errors.h"
#include "erglob.h"
#include "stab.h"
#include "config_targ.h"
#include "targ_sim.h"
#include "targ_sim_body.h"
Go to the source code of this file.
#define F0 Float_Preg_Min_Offset |
Definition at line 65 of file targ_sim.cxx.
#define I0 (Int_Preg_Min_Offset - 1) |
Definition at line 64 of file targ_sim.cxx.
#define PSTRUCT_first_call pstruct.first_call |
Definition at line 837 of file targ_sim.cxx.
Referenced by Get_Struct_Parameter_Location(), and Setup_Struct_Parameter_Locations().
#define PSTRUCT_hfa pstruct.is_hfa |
Definition at line 838 of file targ_sim.cxx.
Referenced by Get_Struct_Parameter_Location(), and Setup_Struct_Parameter_Locations().
#define PSTRUCT_hfa_mtype pstruct.hfa_mtype |
Definition at line 839 of file targ_sim.cxx.
Referenced by Get_Struct_Parameter_Location(), and Setup_Struct_Parameter_Locations().
#define PSTRUCT_offset pstruct.offset |
Definition at line 840 of file targ_sim.cxx.
Referenced by Get_Struct_Parameter_Location(), and Setup_Struct_Parameter_Locations().
#define PSTRUCT_size pstruct.size |
Definition at line 841 of file targ_sim.cxx.
Referenced by Get_Struct_Parameter_Location(), and Setup_Struct_Parameter_Locations().
#define PSTRUCT_struct pstruct.is_struct |
Definition at line 836 of file targ_sim.cxx.
Referenced by Get_Struct_Parameter_Location(), and Setup_Struct_Parameter_Locations().
#define TRACE_ENTRY | ( | x | ) |
Definition at line 45 of file targ_sim.cxx.
Referenced by Get_Current_Float_Preg_Num().
#define TRACE_EXIT | ( | x | ) |
Definition at line 46 of file targ_sim.cxx.
#define TRACE_EXIT_i | ( | x, | |
i | |||
) |
Definition at line 47 of file targ_sim.cxx.
Referenced by Get_Current_Float_Preg_Num().
static BOOL Array_Is_HFA | ( | const TY_IDX | ty, |
Mtype_Return_Level | level, | ||
TYPE_ID & | hfa_mtype | ||
) | [static] |
Definition at line 138 of file targ_sim.cxx.
References FALSE, KIND_ARRAY, KIND_SCALAR, KIND_STRUCT, MTYPE_C10, MTYPE_C16, MTYPE_C4, MTYPE_C8, MTYPE_CQ, MTYPE_F10, MTYPE_F16, MTYPE_F4, MTYPE_F8, MTYPE_FQ, MTYPE_V, Struct_Is_HFA(), TRUE, TY_etype(), TY_kind(), and TY_mtype().
Referenced by Struct_Is_HFA().
static PREG_NUM Get_Current_Float_Preg_Num | ( | Preg_Range | pr | ) | [inline, static] |
Definition at line 642 of file targ_sim.cxx.
References Current_Float_Param_Num, Current_Param_Num, PR_first_reg, PR_last_reg, PR_skip_value, TRACE_ENTRY, and TRACE_EXIT_i.
Referenced by Get_Parameter_Location().
static PLOC Get_Parameter_Location | ( | TY_IDX | ty, |
BOOL | is_output | ||
) | [static] |
Definition at line 660 of file targ_sim.cxx.
References Current_Float_Param_Num, Current_Param_Num, FALSE, First_Param_In_Return_Reg, Fix_TY_mtype(), FmtAssert, Get_Current_Float_Preg_Num(), Get_Current_Preg_Num(), Get_Return_Info(), Input_Base_Preg, IS_INT_PREG, KIND_VOID, Last_Fixed_Param, Last_Param_Offset, MTYPE_A4, MTYPE_A8, MTYPE_C4, MTYPE_C8, MTYPE_CQ, MTYPE_F4, MTYPE_F8, MTYPE_float, MTYPE_FQ, MTYPE_I1, MTYPE_I2, MTYPE_I4, MTYPE_I8, MTYPE_M, MTYPE_name, MTYPE_RegisterSize, MTYPE_size_reg, MTYPE_U1, MTYPE_U2, MTYPE_U4, MTYPE_U8, No_Simulated, Output_Base_Preg, PLOC_reg, PR_first_reg, psize, PLOC::reg, RETURN_INFO_count(), RETURN_INFO_mtype(), SIM_INFO, SIM_varargs_floats, PLOC::size, PLOC::start_offset, Target_Byte_Sex, TY_align_exp(), TY_kind(), TY_size(), and PLOC::vararg_reg.
RETURN_INFO Get_Return_Info | ( | TY_IDX | rtype, |
Mtype_Return_Level | level | ||
) |
Definition at line 389 of file targ_sim.cxx.
References Be_Type_Tbl, RETURN_INFO::count, Fail_FmtAssertion(), FALSE, MAX_NUMBER_OF_REGISTERS_FOR_RETURN, RETURN_INFO::mtype, MTYPE_A4, MTYPE_A8, MTYPE_C10, MTYPE_C4, MTYPE_C8, Mtype_complex_to_real(), MTYPE_CQ, MTYPE_F10, MTYPE_F4, MTYPE_F8, MTYPE_FQ, MTYPE_I1, MTYPE_I2, MTYPE_I4, MTYPE_I8, MTYPE_M, MTYPE_name, MTYPE_RegisterSize, MTYPE_U1, MTYPE_U2, MTYPE_U4, MTYPE_U8, MTYPE_UNKNOWN, MTYPE_V, No_Simulated, PR_first_reg, PR_skip_value, RETURN_INFO::preg, RETURN_INFO::return_via_first_arg, SIM_INFO, size, Struct_Is_HFA(), TRUE, TY_mtype(), TY_size(), Ty_Table, and Use_Simulated.
Referenced by cwh_stmt_call_helper(), cwh_stmt_return_altentry(), cwh_stmt_return_scalar(), Find_Return_Registers(), Get_Parameter_Location(), WN_Verifier::Is_return_register_of_call(), PUinfo_Get_ReturnPreg(), and Setup_Parameter_Locations().
void Get_Return_Mtypes | ( | TY_IDX | rtype, |
Mtype_Return_Level | level, | ||
TYPE_ID * | mreg1, | ||
TYPE_ID * | mreg2 | ||
) |
Definition at line 361 of file targ_sim.cxx.
References Fail_FmtAssertion().
Referenced by cwh_stmt_call_helper(), cwh_stmt_return_altentry(), cwh_stmt_return_scalar(), Find_Return_Registers(), WN_Verifier::Is_return_register_of_call(), and PUinfo_Get_ReturnPreg().
void Get_Return_Pregs | ( | TYPE_ID | mreg1, |
TYPE_ID | mreg2, | ||
PREG_NUM * | rreg1, | ||
PREG_NUM * | rreg2 | ||
) |
Definition at line 378 of file targ_sim.cxx.
References Fail_FmtAssertion().
Referenced by cwh_stmt_return_altentry(), cwh_stmt_return_scalar(), Find_Return_Registers(), WN_Verifier::Is_return_register_of_call(), and PUinfo_Get_ReturnPreg().
static PLOC Get_Struct_Parameter_Location | ( | PLOC | prev | ) | [static] |
Definition at line 854 of file targ_sim.cxx.
References Be_Type_Tbl, Current_Param_Num, FALSE, Get_Current_Preg_Num(), IS_FLT_PREG, Is_Int_Output_Preg(), IS_INT_PREG, Last_Fixed_Param, MTYPE_C4, MTYPE_F4, MTYPE_F8, MTYPE_RegisterSize, next, PLOC_offset, PLOC_reg, PLOC_size, PR_last_reg, PR_skip_value, PSTRUCT_first_call, PSTRUCT_hfa, PSTRUCT_hfa_mtype, PSTRUCT_offset, PSTRUCT_size, PSTRUCT_struct, PLOC::reg, SIM_INFO, SIM_varargs_floats, and TY_size().
static PLOC Get_Vararg_Parameter_Location | ( | PLOC | prev | ) | [static] |
Definition at line 936 of file targ_sim.cxx.
References Current_Param_Num, Get_Current_Preg_Num(), Last_Param_Offset, MTYPE_RegisterSize, next, PR_last_reg, PLOC::reg, SIM_INFO, PLOC::size, and PLOC::start_offset.
void Init_Targ_Sim | ( | void | ) |
Definition at line 963 of file targ_sim.cxx.
References Is_Caller_Save_GP, and SIM_caller_save_gp.
Referenced by Configure_Target().
BOOL Is_Formal_Preg | ( | PREG_NUM | preg | ) |
Definition at line 127 of file targ_sim.cxx.
References First_Float_Preg_Param_Offset, First_Int_Preg_Param_Offset, and MAX_NUMBER_OF_REGISTER_PARAMETERS.
Referenced by Allocate_All_Formals().
BOOL Is_Int_Output_Preg | ( | PREG_NUM | preg | ) |
Definition at line 119 of file targ_sim.cxx.
References MAX_NUMBER_OF_REGISTER_PARAMETERS, and Output_Base_Preg.
Referenced by Get_Struct_Parameter_Location().
BOOL Is_Return_Preg | ( | PREG_NUM | preg | ) |
Definition at line 109 of file targ_sim.cxx.
References First_Float_Preg_Return_Offset, First_Int_Preg_Return_Offset, Last_Float_Preg_Return_Offset, and Last_Int_Preg_Return_Offset.
static BOOL Is_Simulated_Type | ( | TYPE_ID | mtype | ) | [static] |
static BOOL no_overlap | ( | const FLD_HANDLE | fld1, |
const FLD_HANDLE | fld2 | ||
) | [static] |
Definition at line 302 of file targ_sim.cxx.
References FLD_ofst(), FLD_type(), and TY_size().
Referenced by Struct_Has_Two_Floats().
static PLOC Setup_Parameter_Locations | ( | TY_IDX | pu_type | ) | [static] |
Definition at line 609 of file targ_sim.cxx.
References Current_Float_Param_Num, Current_Param_Num, First_Param_In_Return_Reg, Get_Return_Info(), idx, KIND_FUNCTION, Last_Fixed_Param, Last_Param_Offset, No_Simulated, RETURN_INFO_return_via_first_arg(), SIM_return_addr_via_int_return_reg, TY_has_prototype(), TY_is_varargs(), TY_kind(), TY_ret_type(), TY_return_to_param(), TY_tylist(), and Tylist_Table.
static void Setup_Struct_Parameter_Locations | ( | TY_IDX | struct_ty | ) | [static] |
Definition at line 844 of file targ_sim.cxx.
References No_Simulated, PSTRUCT_first_call, PSTRUCT_hfa, PSTRUCT_hfa_mtype, PSTRUCT_offset, PSTRUCT_size, PSTRUCT_struct, Struct_Is_HFA(), TRUE, TY_is_union(), and TY_size().
static BOOL Struct_Has_One_Float | ( | const TY_IDX | ty, |
TYPE_ID & | ftype | ||
) | [static] |
Definition at line 279 of file targ_sim.cxx.
References FALSE, FLD_last_field(), FLD_type(), KIND_SCALAR, MTYPE_float, MTYPE_V, TRUE, TY_fld(), TY_is_union(), TY_kind(), and TY_mtype().
Definition at line 311 of file targ_sim.cxx.
References FALSE, FLD_last_field(), FLD_next(), FLD_type(), KIND_SCALAR, MTYPE_float, MTYPE_V, no_overlap(), TRUE, TY_fld(), TY_is_union(), TY_kind(), and TY_mtype().
static BOOL Struct_Is_HFA | ( | const TY_IDX | ty, |
Mtype_Return_Level | level, | ||
TYPE_ID & | hfa_mtype | ||
) | [static] |
Definition at line 199 of file targ_sim.cxx.
References Array_Is_HFA(), FALSE, FLD_next(), FLD_ofst(), FLD_type(), FLD_HANDLE::Is_Null(), KIND_ARRAY, KIND_SCALAR, KIND_STRUCT, MTYPE_C10, MTYPE_C16, MTYPE_C4, MTYPE_C8, MTYPE_CQ, MTYPE_F10, MTYPE_F16, MTYPE_F4, MTYPE_F8, MTYPE_FQ, MTYPE_V, TRUE, TY_fld(), TY_is_union(), TY_kind(), TY_mtype(), and TY_size().
Referenced by Array_Is_HFA(), Get_Return_Info(), and Setup_Struct_Parameter_Locations().
INT Current_Float_Param_Num = -1 [static] |
Definition at line 605 of file targ_sim.cxx.
Referenced by Get_Current_Float_Preg_Num(), Get_Parameter_Location(), and Setup_Parameter_Locations().
BOOL First_Param_In_Return_Reg = FALSE [static] |
Definition at line 606 of file targ_sim.cxx.
Referenced by Get_Parameter_Location(), and Setup_Parameter_Locations().
INT Formal_Save_Area_Size = 64 |
Definition at line 959 of file targ_sim.cxx.
Referenced by Add_Object_To_Frame_Segment(), Calc_Actual_Area(), Calc_Formal_Area(), and Get_Altentry_UpFormal_Symbol().
mDED_PREG_NUM Input_Base_Preg = 32 [static] |
Definition at line 61 of file targ_sim.cxx.
Referenced by Get_Parameter_Location().
Definition at line 957 of file targ_sim.cxx.
Referenced by Init_Targ_Sim().
mDED_PREG_NUM Output_Base_Preg = 127 [static] |
Definition at line 62 of file targ_sim.cxx.
Referenced by Get_Parameter_Location(), and Is_Int_Output_Preg().
Definition at line 834 of file targ_sim.cxx.
Definition at line 68 of file targ_sim.cxx.
Definition at line 960 of file targ_sim.cxx.
Referenced by Allocate_Space(), Finalize_Stack_Frame(), Merge_Fixed_Stack_Frame(), and Stack_Offset_Adjustment_For_PU().