Classes | Defines | Typedefs | Functions | Variables

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
#define SIM_FLT_AFTER_INT   0x0002
#define SIM_FIXED_REG_BYTES   0x0008
#define SIM_COORD_INT_FLT   0x0010
#define SIM_COORD_MEM_REG   0x0020
#define SIM_REG_STRUCTS   0x0040
#define SIM_FLT_RTN_COMPLEX   0x0080
#define SIM_CALLER_SAVE_GP   0x0100
#define SIM_FLT_REG_FIELDS   0x0200
#define SIM_DBL_REG_FIELDS   0x0400
#define SIM_VARARGS_FLOATS   0x0800
#define SIM_RET_ADDR_VIA_ARGS   0x1000
#define SIM_RET_ADDR_VIA_INT_RET   0x2000
#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 228 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 223 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 219 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_last_reg (   x  )     x.last_reg
#define PR_skip_value (   x  )     x.skip_value
#define SIM_caller_save_gp   ((SIM_INFO.flags & SIM_CALLER_SAVE_GP) != 0)

Definition at line 142 of file targ_sim_body.h.

#define SIM_CALLER_SAVE_GP   0x0100

Definition at line 123 of file targ_sim_body.h.

#define SIM_COORD_INT_FLT   0x0010

Definition at line 112 of file targ_sim_body.h.

#define SIM_COORD_MEM_REG   0x0020

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 143 of file targ_sim_body.h.

#define SIM_DBL_REG_FIELDS   0x0400

Definition at line 125 of file targ_sim_body.h.

#define SIM_EXTRA_FLT_IN_INT   0x0001

Definition at line 97 of file targ_sim_body.h.

#define SIM_FIXED_REG_BYTES   0x0008

Definition at line 105 of file targ_sim_body.h.

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

Definition at line 141 of file targ_sim_body.h.

#define SIM_FLT_AFTER_INT   0x0002

Definition at line 101 of file targ_sim_body.h.

#define SIM_FLT_REG_FIELDS   0x0200

Definition at line 124 of file targ_sim_body.h.

#define SIM_FLT_RTN_COMPLEX   0x0080

Definition at line 122 of file targ_sim_body.h.

#define SIM_INFO   SIM_Info[Target_ABI]
#define SIM_REG_STRUCTS   0x0040

Definition at line 121 of file targ_sim_body.h.

#define SIM_RET_ADDR_VIA_ARGS   0x1000

Definition at line 127 of file targ_sim_body.h.

#define SIM_RET_ADDR_VIA_INT_RET   0x2000

Definition at line 131 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 144 of file targ_sim_body.h.

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

Definition at line 140 of file targ_sim_body.h.

Referenced by Get_Parameter_Location(), and Get_Struct_Parameter_Location().

#define SIM_VARARGS_FLOATS   0x0800

Definition at line 126 of file targ_sim_body.h.


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 297 of file targ_sim_body.h.

References First_PLOC_Reg().

Here is the call graph for this function:

PLOC First_Output_PLOC_Reg ( PLOC  ploc,
TY_IDX  parm_ty 
)

Definition at line 303 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]
TYPE_ID Fix_TY_mtype ( TY_IDX  ty  ) 

Definition at line 150 of file targ_sim_body.h.

References KIND_ARRAY, KIND_STRUCT, MTYPE_is_complex, MTYPE_UNKNOWN, Pointer_Mtype, TY_kind(), and TY_mtype().

Referenced by First_PLOC_Reg(), and Get_Parameter_Location().

Here is the call graph for this function:

static PREG_NUM Get_Current_Preg_Num ( Preg_Range  pr  )  [inline, static]
PLOC Get_Input_Parameter_Location ( TY_IDX  ty  ) 

Definition at line 194 of file targ_sim_body.h.

References FALSE, and Get_Parameter_Location().

Referenced by Allocate_All_Formals(), and Calc_Formal_Area().

Here is the call graph for this function:

PLOC Get_Output_Parameter_Location ( TY_IDX  ty  ) 

Definition at line 200 of file targ_sim_body.h.

References Get_Parameter_Location(), and TRUE.

Referenced by Calc_Actual_Area().

Here is the call graph for this function:

static PLOC Get_Parameter_Location ( TY_IDX  ty,
BOOL  is_output 
) [static]
INT32 Get_Preg_Size ( PREG_NUM  p  ) 

Definition at line 233 of file targ_sim_body.h.

References IS_FLT_PREG, MTYPE_RegisterSize, and SIM_INFO.

PLOC Get_Struct_Input_Parameter_Location ( PLOC  prev  ) 

Definition at line 257 of file targ_sim_body.h.

References Get_Struct_Parameter_Location().

Here is the call graph for this function:

PLOC Get_Struct_Output_Parameter_Location ( PLOC  prev  ) 

Definition at line 263 of file targ_sim_body.h.

References Get_Struct_Parameter_Location().

Here is the call graph for this function:

static PLOC Get_Struct_Parameter_Location ( PLOC  prev  )  [static]
PLOC Get_Vararg_Input_Parameter_Location ( PLOC  prev  ) 

Definition at line 208 of file targ_sim_body.h.

References Get_Vararg_Parameter_Location().

Referenced by Allocate_All_Formals().

Here is the call graph for this function:

PLOC Get_Vararg_Output_Parameter_Location ( PLOC  prev  ) 

Definition at line 214 of file targ_sim_body.h.

References Get_Vararg_Parameter_Location().

Here is the call graph for this function:

static PLOC Get_Vararg_Parameter_Location ( PLOC  prev  )  [static]
PLOC Next_Input_PLOC_Reg ( PLOC  prev  ) 

Definition at line 341 of file targ_sim_body.h.

References Next_PLOC_Reg().

Here is the call graph for this function:

PLOC Next_Output_PLOC_Reg ( PLOC  prev  ) 

Definition at line 347 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]
PLOC Setup_Input_Parameter_Locations ( TY_IDX  pu_type  ) 

Definition at line 182 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:

PLOC Setup_Output_Parameter_Locations ( TY_IDX  pu_type  ) 

Definition at line 188 of file targ_sim_body.h.

References Setup_Parameter_Locations().

Referenced by Calc_Actual_Area().

Here is the call graph for this function:

static PLOC Setup_Parameter_Locations ( TY_IDX  pu_type  )  [static]
void Setup_Struct_Input_Parameter_Locations ( TY_IDX  struct_ty  ) 

Definition at line 245 of file targ_sim_body.h.

References Setup_Struct_Parameter_Locations().

Here is the call graph for this function:

void Setup_Struct_Output_Parameter_Locations ( TY_IDX  struct_ty  ) 

Definition at line 251 of file targ_sim_body.h.

References Setup_Struct_Parameter_Locations().

Here is the call graph for this function:

static void Setup_Struct_Parameter_Locations ( TY_IDX  struct_ty  )  [static]

Variable Documentation

INT Current_Param_Num = -1 [static]
INT Last_Fixed_Param = INT_MAX [static]
INT Last_Param_Offset = 0 [static]

Definition at line 270 of file targ_sim_body.h.

Referenced by First_PLOC_Reg(), and Next_PLOC_Reg().

Definition at line 269 of file targ_sim_body.h.

Referenced by First_PLOC_Reg(), and Next_PLOC_Reg().

Definition at line 68 of file targ_sim.cxx.