osprey/kg++fe/gnu/calls.c File Reference

#include "config.h"
#include "system.h"
#include "rtl.h"
#include "tree.h"
#include "flags.h"
#include "expr.h"
#include "libfuncs.h"
#include "function.h"
#include "regs.h"
#include "toplev.h"
#include "output.h"
#include "tm_p.h"
#include "timevar.h"
#include "sbitmap.h"
#include "langhooks.h"
#include "target.h"
#include "except.h"

Include dependency graph for calls.c:

Go to the source code of this file.

Data Types

type  arg_data

Defines

#define FUNCTION_OK_FOR_SIBCALL(DECL)   1
#define PUSH_ARGS_REVERSED   0
#define STACK_POINTER_OFFSET   0
#define STACK_BYTES   (PREFERRED_STACK_BOUNDARY / BITS_PER_UNIT)
#define ECF_CONST   1
#define ECF_NORETURN   2
#define ECF_MALLOC   4
#define ECF_MAY_BE_ALLOCA   8
#define ECF_NOTHROW   16
#define ECF_RETURNS_TWICE   32
#define ECF_LONGJMP   64
#define ECF_FORK_OR_EXEC   128
#define ECF_SIBCALL   256
#define ECF_PURE   512
#define ECF_SP_DEPRESSED   1024
#define ECF_ALWAYS_RETURN   2048
#define ECF_LIBCALL_BLOCK   4096

Functions/Subroutines

static int calls_function PARAMS ((tree, int))
static void emit_call_1 PARAMS ((rtx, tree, tree, HOST_WIDE_INT, HOST_WIDE_INT, HOST_WIDE_INT, rtx, rtx, int, rtx, int, CUMULATIVE_ARGS *))
static void
precompute_register_parameters 
PARAMS ((int, struct arg_data *, int *))
static int store_one_arg PARAMS ((struct arg_data *, rtx, int, int, int))
static void
store_unaligned_arguments_into_pseudos 
PARAMS ((struct arg_data *, int))
static int
finalize_must_preallocate 
PARAMS ((int, int, struct arg_data *, struct args_size *))
static void precompute_arguments PARAMS ((int, int, struct arg_data *))
static int
compute_argument_block_size 
PARAMS ((int, struct args_size *, int))
static void
initialize_argument_information 
PARAMS ((int, struct arg_data *, struct args_size *, int, tree, tree, CUMULATIVE_ARGS *, int, rtx *, int *, int *, int *))
static void
compute_argument_addresses 
PARAMS ((struct arg_data *, rtx, int))
static rtx rtx_for_function_call PARAMS ((tree, tree))
static void
load_register_parameters 
PARAMS ((struct arg_data *, int, rtx *, int))
static rtx
emit_library_call_value_1 
PARAMS ((int, rtx, rtx, enum libcall_type, enum machine_mode, int, va_list))
static int flags_from_decl_or_type PARAMS ((tree))
static rtx try_to_integrate PARAMS ((tree, tree, rtx, int, tree, rtx))
static int
check_sibcall_argument_overlap_1 
PARAMS ((rtx))
static int
check_sibcall_argument_overlap 
PARAMS ((rtx, struct arg_data *))
static int calls_function (tree exp, int which)
static int calls_function_1 (tree exp, int which)
rtx prepare_call_address (rtx funexp, tree fndecl, rtx *call_fusage, int reg_parm_seen, int sibcallp)
static void emit_call_1 (rtx funexp, fndecl, funtype, stack_size, HOST_WIDE_INT rounded_stack_size, struct_value_size, next_arg_reg, rtx valreg, int old_inhibit_defer_pop, rtx call_fusage, int ecf_flags, args_so_far)
static int special_function_p (tree fndecl, int flags)
int setjmp_call_p (tree fndecl)
bool alloca_call_p (tree exp)
static int flags_from_decl_or_type (tree exp)
static void precompute_register_parameters (int num_actuals, struct arg_data *args, int *reg_parm_seen)
static void store_unaligned_arguments_into_pseudos (struct arg_data *args, int num_actuals)
static void initialize_argument_information (num_actuals, struct arg_data *args, struct args_size *args_size, n_named_args, tree actparms, tree fndecl, CUMULATIVE_ARGS *args_so_far, int reg_parm_stack_space, rtx *old_stack_level, int *old_pending_adj, int *must_preallocate, int *ecf_flags)
static int compute_argument_block_size (int reg_parm_stack_space, struct args_size *args_size, preferred_stack_boundary)
static void precompute_arguments (int flags, int num_actuals, struct arg_data *args)
static int finalize_must_preallocate (int must_preallocate, int num_actuals, struct arg_data *args, struct args_size *args_size)
static void compute_argument_addresses (struct arg_data *args, rtx argblock, int num_actuals)
static rtx rtx_for_function_call (tree fndecl, tree addr)
static void load_register_parameters (struct arg_data *args, int num_actuals, rtx *call_fusage, int flags)
static rtx try_to_integrate (tree fndecl, tree actparms, rtx target, int ignore, tree type, rtx structure_value_addr)
static int combine_pending_stack_adjustment_and_call (int unadjusted_args_size, struct args_size *args_size, int preferred_unit_stack_boundary)
static int check_sibcall_argument_overlap_1 (rtx x)
static int check_sibcall_argument_overlap (rtx insn, struct arg_data *arg)
static tree fix_unsafe_tree (tree t)
rtx expand_call (tree exp, rtx target, int ignore)
static rtx emit_library_call_value_1 (int retval, rtx orgfun, rtx value, enum libcall_type fn_type, enum machine_mode outmode, int nargs, va_list p)
void emit_library_call VPARAMS ((rtx orgfun, enum libcall_type fn_type, enum machine_mode outmode, int nargs,...))
rtx emit_library_call_value VPARAMS ((rtx orgfun, rtx value, enum libcall_type fn_type, enum machine_mode outmode, int nargs,...))
static int store_one_arg (struct arg_data *arg, rtx argblock, int flags, variable_size, int reg_parm_stack_space)

Variables

static char * stack_usage_map
static int highest_outgoing_arg_in_use
static sbitmap stored_args_map
int stack_arg_under_construction
static tree calls_function_save_exprs


Define Documentation

#define ECF_ALWAYS_RETURN   2048

Definition at line 195 of file calls.c.

Referenced by emit_call_1(), emit_library_call_value_1(), and need_fake_edge_p().

#define ECF_CONST   1

#define ECF_FORK_OR_EXEC   128

Definition at line 186 of file calls.c.

Referenced by expand_call(), and special_function_p().

#define ECF_LIBCALL_BLOCK   4096

#define ECF_LONGJMP   64

Definition at line 183 of file calls.c.

Referenced by emit_call_1(), emit_library_call_value_1(), expand_call(), and special_function_p().

#define ECF_MALLOC   4

#define ECF_MAY_BE_ALLOCA   8

#define ECF_NORETURN   2

#define ECF_NOTHROW   16

#define ECF_PURE   512

#define ECF_RETURNS_TWICE   32

#define ECF_SIBCALL   256

Definition at line 187 of file calls.c.

Referenced by emit_call_1(), expand_call(), load_register_parameters(), and store_one_arg().

#define ECF_SP_DEPRESSED   1024

Definition at line 193 of file calls.c.

Referenced by emit_call_1(), expand_call(), and flags_from_decl_or_type().

#define FUNCTION_OK_FOR_SIBCALL ( DECL   )     1

Definition at line 53 of file calls.c.

Referenced by expand_call().

#define PUSH_ARGS_REVERSED   0

#define STACK_BYTES   (PREFERRED_STACK_BOUNDARY / BITS_PER_UNIT)

#define STACK_POINTER_OFFSET   0


Function Documentation

bool alloca_call_p ( tree  exp  ) 

static int calls_function ( tree  exp,
int  which 
) [static]

Definition at line 261 of file calls.c.

References calls_function_1(), and val.

Referenced by precompute_arguments().

static int calls_function_1 ( tree  exp,
int  which 
) [static]

static int check_sibcall_argument_overlap ( rtx  insn,
struct arg_data arg 
) [static]

static int check_sibcall_argument_overlap_1 ( rtx  x  )  [static]

static int combine_pending_stack_adjustment_and_call ( int  unadjusted_args_size,
struct args_size args_size,
int  preferred_unit_stack_boundary 
) [static]

Definition at line 1967 of file calls.c.

References args_size::constant, HOST_WIDE_INT, pending_stack_adjust, and stack_pointer_delta.

Referenced by expand_call().

static void compute_argument_addresses ( struct arg_data args,
rtx  argblock,
int  num_actuals 
) [static]

static int compute_argument_block_size ( int  reg_parm_stack_space,
struct args_size args_size,
preferred_stack_boundary   
) [static]

static void emit_call_1 ( rtx  funexp,
fndecl  ,
funtype  ,
stack_size  ,
HOST_WIDE_INT  rounded_stack_size,
struct_value_size  ,
next_arg_reg  ,
rtx  valreg,
int  old_inhibit_defer_pop,
rtx  call_fusage,
int  ecf_flags,
args_so_far   
) [static]

static rtx emit_library_call_value_1 ( int  retval,
rtx  orgfun,
rtx  value,
enum libcall_type  fn_type,
enum machine_mode  outmode,
int  nargs,
va_list  p 
) [static]

Definition at line 3508 of file calls.c.

References abort, ACCUMULATE_OUTGOING_ARGS, addr(), aggregate_value_p(), alloca, anti_adjust_stack(), ARGS_SIZE_RTX, assemble_external_libcall(), assign_stack_temp(), assign_temp(), BIGGEST_ALIGNMENT, BITS_PER_UNIT, BLOCK_OP_CALL_PARM, build1, build_function_type(), build_pointer_type(), cfun, args_size::constant, CONSTANT_P, convert_modes(), count, current_function_outgoing_args_size, ECF_ALWAYS_RETURN, ECF_CONST, ECF_LIBCALL_BLOCK, ECF_LONGJMP, ECF_NORETURN, ECF_NOTHROW, ECF_PURE, ECF_RETURNS_TWICE, emit_barrier_after(), emit_block_move(), emit_call_1(), emit_group_load(), emit_group_store(), emit_insn(), emit_libcall_block(), emit_move_insn(), emit_push_insn(), end_sequence(), expand_expr(), FINAL_REG_PARM_STACK_SPACE, flags, force_operand(), force_reg(), FUNCTION_ARG, FUNCTION_ARG_ADVANCE, FUNCTION_ARG_CALLEE_COPIES, FUNCTION_ARG_PARTIAL_NREGS, FUNCTION_ARG_PASS_BY_REFERENCE, GEN_INT, gen_reg_rtx(), gen_rtx_CLOBBER, gen_rtx_EXPR_LIST, gen_rtx_MEM(), gen_rtx_SCRATCH, gen_rtx_USE, GET_CODE, get_identifier(), get_insns(), get_last_insn(), GET_MODE, GET_MODE_SIZE, hard_function_value(), hard_libcall_value(), highest_outgoing_arg_in_use, inhibit_defer_pop, INIT_CUMULATIVE_ARGS, INIT_CUMULATIVE_LIBCALL_ARGS, insns, last, LCT_ALWAYS_RETURN, LCT_CONST, LCT_CONST_MAKE_BLOCK, LCT_NORETURN, LCT_NORMAL, LCT_PURE, LCT_PURE_MAKE_BLOCK, LCT_RETURNS_TWICE, LCT_THROW, LEGITIMATE_CONSTANT_P, LIBGCC_NEEDS_DOUBLE, locate_and_pad_parm(), make_tree(), MAX, MAYBE_REG_PARM_STACK_SPACE, MEM, memcpy, memory_address(), memset, MIN, mode, mode_for_size(), MODE_INT, NO_DEFER_POP, NULL_RTX, NULL_TREE, offset, OK_DEFER_POP, PARM_BOUNDARY, plus_constant, Pmode, pop_temp_slots(), PREFERRED_STACK_BOUNDARY, prepare_call_address(), PREV_INSN, PUSH_ARGS, PUSH_ARGS_REVERSED, push_block(), push_temp_slots(), REG, REG_PARM_STACK_SPACE, set_mem_align(), size, STACK_BYTES, STACK_PARMS_IN_REG_PARM_AREA, stack_pointer_delta, STACK_POINTER_OFFSET, stack_pointer_rtx, stack_usage_map, start_sequence(), UNITS_PER_WORD, use_group_regs(), use_reg(), va_arg, val, validize_mem(), args_size::var, virtual_outgoing_args_rtx, virtuals_instantiated, void_type_node, XEXP, and XSTR.

Referenced by emit_library_call(), emit_library_call_value(), and VPARAMS().

rtx expand_call ( tree  exp,
rtx  target,
int  ignore 
)

static int finalize_must_preallocate ( int  must_preallocate,
int  num_actuals,
struct arg_data args,
struct args_size args_size 
) [static]

Definition at line 1595 of file calls.c.

References args_size::constant, int_size_in_bytes(), TREE_ADDRESSABLE, TREE_CODE, TREE_TYPE, and TYPE_MODE.

Referenced by expand_call().

static tree fix_unsafe_tree ( tree  t  )  [static]

static int flags_from_decl_or_type ( tree  exp  )  [static]

static void initialize_argument_information ( num_actuals  ,
struct arg_data args,
struct args_size args_size,
n_named_args  ,
tree  actparms,
tree  fndecl,
CUMULATIVE_ARGS args_so_far,
int  reg_parm_stack_space,
rtx old_stack_level,
int *  old_pending_adj,
int *  must_preallocate,
int *  ecf_flags 
) [static]

static void load_register_parameters ( struct arg_data args,
int  num_actuals,
rtx call_fusage,
int  flags 
) [static]

static int check_sibcall_argument_overlap PARAMS ( (rtx, struct arg_data *)   )  [static]

static int check_sibcall_argument_overlap_1 PARAMS ( (rtx  )  [static]

static rtx try_to_integrate PARAMS ( (tree, tree, rtx, int, tree, rtx  )  [static]

static int flags_from_decl_or_type PARAMS ( (tree  )  [static]

static rtx emit_library_call_value_1 PARAMS ( (int, rtx, rtx, enum libcall_type, enum machine_mode, int, va_list  )  [static]

static void load_register_parameters PARAMS ( (struct arg_data *, int, rtx *, int)   )  [static]

static rtx rtx_for_function_call PARAMS ( (tree, tree  )  [static]

static void compute_argument_addresses PARAMS ( (struct arg_data *, rtx, int)   )  [static]

static void initialize_argument_information PARAMS ( (int, struct arg_data *, struct args_size *, int, tree, tree, CUMULATIVE_ARGS *, int, rtx *, int *, int *, int *)   )  [static]

static int compute_argument_block_size PARAMS ( (int, struct args_size *, int)   )  [static]

static void precompute_arguments PARAMS ( (int, int, struct arg_data *)   )  [static]

static int finalize_must_preallocate PARAMS ( (int, int, struct arg_data *, struct args_size *)   )  [static]

static void store_unaligned_arguments_into_pseudos PARAMS ( (struct arg_data *, int)   )  [static]

static int store_one_arg PARAMS ( (struct arg_data *, rtx, int, int, int)   )  [static]

static void precompute_register_parameters PARAMS ( (int, struct arg_data *, int *)   )  [static]

static void emit_call_1 PARAMS ( (rtx, tree, tree, HOST_WIDE_INT, HOST_WIDE_INT, HOST_WIDE_INT, rtx, rtx, int, rtx, int, CUMULATIVE_ARGS *)   )  [static]

static int calls_function PARAMS ( (tree, int)   )  [static]

static void precompute_arguments ( int  flags,
int  num_actuals,
struct arg_data args 
) [static]

static void precompute_register_parameters ( int  num_actuals,
struct arg_data args,
int *  reg_parm_seen 
) [static]

rtx prepare_call_address ( rtx  funexp,
tree  fndecl,
rtx call_fusage,
int  reg_parm_seen,
int  sibcallp 
)

static rtx rtx_for_function_call ( tree  fndecl,
tree  addr 
) [static]

int setjmp_call_p ( tree  fndecl  ) 

Definition at line 818 of file calls.c.

Referenced by calls_setjmp_r(), check_call(), inline_forbidden_p(), and inline_forbidden_p_1().

static int special_function_p ( tree  fndecl,
int  flags 
) [static]

static int store_one_arg ( struct arg_data arg,
rtx  argblock,
int  flags,
variable_size  ,
int  reg_parm_stack_space 
) [static]

static void store_unaligned_arguments_into_pseudos ( struct arg_data args,
int  num_actuals 
) [static]

static rtx try_to_integrate ( tree  fndecl,
tree  actparms,
rtx  target,
int  ignore,
tree  type,
rtx  structure_value_addr 
) [static]

rtx emit_library_call_value VPARAMS ( (rtx orgfun, rtx value,enum libcall_type fn_type,enum machine_mode outmode, int nargs,...)   ) 

Definition at line 4366 of file calls.c.

References emit_library_call_value_1(), p, result, VA_CLOSE, va_end, VA_FIXEDARG, VA_OPEN, and VA_START.

void emit_library_call VPARAMS ( (rtx orgfun, enum libcall_type fn_type,enum machine_mode outmode, int nargs,...)   ) 

Definition at line 4333 of file calls.c.

References emit_library_call_value_1(), NULL_RTX, p, VA_CLOSE, va_end, VA_FIXEDARG, VA_OPEN, and VA_START.


Variable Documentation

Definition at line 258 of file calls.c.

Definition at line 151 of file calls.c.

Referenced by emit_library_call_value_1(), expand_call(), and try_to_integrate().

Definition at line 165 of file calls.c.

Referenced by expand_call(), store_one_arg(), and try_to_integrate().

char* stack_usage_map [static]

Definition at line 148 of file calls.c.

Referenced by emit_library_call_value_1(), expand_call(), store_one_arg(), and try_to_integrate().

Definition at line 158 of file calls.c.


Generated on Wed Apr 8 15:13:23 2009 for Open64 by  doxygen 1.5.6