Open64 (mfef90, whirl2f, and IR tools)  TAG: version-openad; SVN changeset: 916
targ_sim_body.h File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  Preg_Range
struct  subprogram_interface

Defines

#define PR_first_reg(x)   x.first_reg
#define PR_last_reg(x)   x.last_reg
#define PR_skip_value(x)   x.skip_value
#define SIM_EXTRA_FLT_IN_INT   0x0001 /* Use int regs for extra flts? */
#define SIM_FLT_AFTER_INT   0x0002 /* Use flt regs after int args? */
#define SIM_FIXED_REG_BYTES   0x0008 /* Max bytes in registers? */
#define SIM_COORD_INT_FLT   0x0010 /* Coordinate int/flt regs? */
#define SIM_COORD_MEM_REG   0x0020 /* Coordinate mem and regs? */
#define SIM_REG_STRUCTS   0x0040 /* Pass structs in regs? */
#define SIM_FLT_RTN_COMPLEX   0x0080 /* Return complex in flt regs? */
#define SIM_CALLER_SAVE_GP   0x0100 /* GP is caller-save? */
#define SIM_FLT_REG_FIELDS   0x0200 /* Float fields in float regs? */
#define SIM_DBL_REG_FIELDS   0x0400 /* Double fields in float regs? */
#define SIM_VARARGS_FLOATS   0x0800 /* Variable float args in fregs? */
#define SIM_RET_ADDR_VIA_ARGS
#define SIM_RET_ADDR_VIA_INT_RET
#define SIM_INFO   SIM_Info[Target_ABI]
#define SIM_varargs_floats   ((SIM_INFO.flags & SIM_VARARGS_FLOATS) != 0)
#define SIM_flt_after_int   ((SIM_INFO.flags & SIM_FLT_AFTER_INT) != 0)
#define SIM_caller_save_gp   ((SIM_INFO.flags & SIM_CALLER_SAVE_GP) != 0)
#define SIM_dbl_fields_in_reg   ((SIM_INFO.flags & SIM_DBL_REG_FIELDS) != 0)
#define SIM_return_addr_via_int_return_reg   ((SIM_INFO.flags & SIM_RET_ADDR_VIA_INT_RET) != 0)
#define IS_INT_PREG(p)
#define IS_FLT_PREG(p)
#define GET_PREG_POSITION(p, range)   ((p - PR_first_reg(range)) / PR_skip_value(range))

Typedefs

typedef mUINT8 mDED_PREG_NUM
typedef struct subprogram_interface SIM

Functions

TYPE_ID Fix_TY_mtype (TY_IDX ty)
static PREG_NUM Get_Current_Preg_Num (Preg_Range pr)
static PLOC Setup_Parameter_Locations (TY_IDX pu_type)
static PLOC Get_Parameter_Location (TY_IDX ty, BOOL is_output)
PLOC Setup_Input_Parameter_Locations (TY_IDX pu_type)
PLOC Setup_Output_Parameter_Locations (TY_IDX pu_type)
PLOC Get_Input_Parameter_Location (TY_IDX ty)
PLOC Get_Output_Parameter_Location (TY_IDX ty)
static PLOC Get_Vararg_Parameter_Location (PLOC prev)
PLOC Get_Vararg_Input_Parameter_Location (PLOC prev)
PLOC Get_Vararg_Output_Parameter_Location (PLOC prev)
INT32 Get_Preg_Size (PREG_NUM p)
static void Setup_Struct_Parameter_Locations (TY_IDX struct_ty)
static PLOC Get_Struct_Parameter_Location (PLOC prev)
void Setup_Struct_Input_Parameter_Locations (TY_IDX struct_ty)
void Setup_Struct_Output_Parameter_Locations (TY_IDX struct_ty)
PLOC Get_Struct_Input_Parameter_Location (PLOC prev)
PLOC Get_Struct_Output_Parameter_Location (PLOC prev)
static PLOC First_PLOC_Reg (PLOC ploc, TY_IDX parm_ty)
PLOC First_Input_PLOC_Reg (PLOC ploc, TY_IDX parm_ty)
PLOC First_Output_PLOC_Reg (PLOC ploc, TY_IDX parm_ty)
static PLOC Next_PLOC_Reg (PLOC prev)
PLOC Next_Input_PLOC_Reg (PLOC prev)
PLOC Next_Output_PLOC_Reg (PLOC prev)

Variables

SIM SIM_Info []
static INT Current_Param_Num = -1
static INT Last_Param_Offset = 0
static INT Last_Fixed_Param = INT_MAX
static TYPE_ID ploc_parm_mtype
static INT32 ploc_last_offset

Define Documentation

#define GET_PREG_POSITION (   p,
  range 
)    ((p - PR_first_reg(range)) / PR_skip_value(range))

Definition at line 221 of file targ_sim_body.h.

#define IS_FLT_PREG (   p)
Value:
((PR_first_reg(SIM_INFO.flt_args) <= p) \
        && (p <= PR_last_reg(SIM_INFO.flt_args)))

Definition at line 216 of file targ_sim_body.h.

Referenced by Get_Preg_Size(), and Get_Struct_Parameter_Location().

#define IS_INT_PREG (   p)
Value:
((PR_first_reg(SIM_INFO.int_args) <= p) \
        && (p <= PR_last_reg(SIM_INFO.int_args)))

Definition at line 212 of file targ_sim_body.h.

Referenced by Get_Parameter_Location(), and Get_Struct_Parameter_Location().

#define PR_first_reg (   x)    x.first_reg
#define PR_skip_value (   x)    x.skip_value
#define SIM_CALLER_SAVE_GP   0x0100 /* GP is caller-save? */

Definition at line 123 of file targ_sim_body.h.

#define SIM_caller_save_gp   ((SIM_INFO.flags & SIM_CALLER_SAVE_GP) != 0)

Definition at line 135 of file targ_sim_body.h.

Referenced by Init_Targ_Sim().

#define SIM_COORD_INT_FLT   0x0010 /* Coordinate int/flt regs? */

Definition at line 112 of file targ_sim_body.h.

#define SIM_COORD_MEM_REG   0x0020 /* Coordinate mem and regs? */

Definition at line 117 of file targ_sim_body.h.

#define SIM_dbl_fields_in_reg   ((SIM_INFO.flags & SIM_DBL_REG_FIELDS) != 0)

Definition at line 136 of file targ_sim_body.h.

#define SIM_DBL_REG_FIELDS   0x0400 /* Double fields in float regs? */

Definition at line 125 of file targ_sim_body.h.

#define SIM_EXTRA_FLT_IN_INT   0x0001 /* Use int regs for extra flts? */

Definition at line 97 of file targ_sim_body.h.

#define SIM_FIXED_REG_BYTES   0x0008 /* Max bytes in registers? */

Definition at line 105 of file targ_sim_body.h.

#define SIM_FLT_AFTER_INT   0x0002 /* Use flt regs after int args? */

Definition at line 101 of file targ_sim_body.h.

#define SIM_flt_after_int   ((SIM_INFO.flags & SIM_FLT_AFTER_INT) != 0)

Definition at line 134 of file targ_sim_body.h.

#define SIM_FLT_REG_FIELDS   0x0200 /* Float fields in float regs? */

Definition at line 124 of file targ_sim_body.h.

#define SIM_FLT_RTN_COMPLEX   0x0080 /* Return complex in flt regs? */

Definition at line 122 of file targ_sim_body.h.

#define SIM_REG_STRUCTS   0x0040 /* Pass structs in regs? */

Definition at line 121 of file targ_sim_body.h.

Value:
0x1000  /* if return large structs via addr
                                         * in implicit arg, do we use normal 
                                         * parameter passing conventions for 
                                         * that implicit arg. */

Definition at line 127 of file targ_sim_body.h.

Value:
0x2000  /* if return large structs via addr
                                         * in implicit arg, do we use integer 
                                         * return register rather than normal
                                         * parameter passing for that 
                                         * implicit arg. */

Definition at line 128 of file targ_sim_body.h.

#define SIM_return_addr_via_int_return_reg   ((SIM_INFO.flags & SIM_RET_ADDR_VIA_INT_RET) != 0)

Definition at line 137 of file targ_sim_body.h.

Referenced by Setup_Parameter_Locations().

#define SIM_VARARGS_FLOATS   0x0800 /* Variable float args in fregs? */

Definition at line 126 of file targ_sim_body.h.

#define SIM_varargs_floats   ((SIM_INFO.flags & SIM_VARARGS_FLOATS) != 0)

Definition at line 133 of file targ_sim_body.h.

Referenced by Get_Parameter_Location(), and Get_Struct_Parameter_Location().


Typedef Documentation

Definition at line 49 of file targ_sim_body.h.

typedef struct subprogram_interface SIM

Function Documentation

PLOC First_Input_PLOC_Reg ( PLOC  ploc,
TY_IDX  parm_ty 
)

Definition at line 290 of file targ_sim_body.h.

PLOC First_Output_PLOC_Reg ( PLOC  ploc,
TY_IDX  parm_ty 
)

Definition at line 296 of file targ_sim_body.h.

References First_PLOC_Reg().

Here is the call graph for this function:

static PLOC First_PLOC_Reg ( PLOC  ploc,
TY_IDX  parm_ty 
) [static]

Definition at line 143 of file targ_sim_body.h.

References KIND_ARRAY, MTYPE_UNKNOWN, TY_kind(), and TY_mtype().

Referenced by First_PLOC_Reg(), and Get_Parameter_Location().

Here is the call graph for this function:

Definition at line 187 of file targ_sim_body.h.

References Setup_Parameter_Locations().

Referenced by Allocate_All_Formals(), and Calc_Formal_Area().

Here is the call graph for this function:

Definition at line 193 of file targ_sim_body.h.

References FALSE, and Get_Parameter_Location().

Referenced by Calc_Actual_Area().

Here is the call graph for this function:

Definition at line 226 of file targ_sim_body.h.

References IS_FLT_PREG, MTYPE_RegisterSize, and SIM_INFO.

Definition at line 250 of file targ_sim_body.h.

References Setup_Struct_Parameter_Locations().

Here is the call graph for this function:

Definition at line 256 of file targ_sim_body.h.

References Get_Struct_Parameter_Location().

Here is the call graph for this function:

Definition at line 201 of file targ_sim_body.h.

References Get_Parameter_Location(), and TRUE.

Referenced by Allocate_All_Formals().

Here is the call graph for this function:

Definition at line 207 of file targ_sim_body.h.

References Get_Vararg_Parameter_Location().

Here is the call graph for this function:

Definition at line 334 of file targ_sim_body.h.

Definition at line 340 of file targ_sim_body.h.

References Next_PLOC_Reg().

Here is the call graph for this function:

static PLOC Next_PLOC_Reg ( PLOC  prev) [static]

Definition at line 302 of file targ_sim_body.h.

References First_PLOC_Reg().

Referenced by Next_Output_PLOC_Reg().

Here is the call graph for this function:

Definition at line 175 of file targ_sim_body.h.

Referenced by Allocate_All_Formals(), and Calc_Formal_Area().

Definition at line 181 of file targ_sim_body.h.

References Setup_Parameter_Locations().

Referenced by Calc_Actual_Area().

Here is the call graph for this function:

Definition at line 238 of file targ_sim_body.h.

Definition at line 244 of file targ_sim_body.h.

References Setup_Struct_Parameter_Locations().

Here is the call graph for this function:


Variable Documentation

Definition at line 263 of file targ_sim_body.h.

Definition at line 262 of file targ_sim_body.h.

Definition at line 68 of file targ_sim.cxx.

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines