From 2a9323a9f4d5464785897d47a242c0133f771821 Mon Sep 17 00:00:00 2001 From: David Malcolm Date: Sun, 5 Jan 2014 00:17:10 -0500 Subject: [PATCH 064/159] FIXME: calls.c --- gcc/calls.c | 41 ++++++++++++++++++++++------------------- 1 file changed, 22 insertions(+), 19 deletions(-) diff --git a/gcc/calls.c b/gcc/calls.c index f889944..941c727 100644 --- a/gcc/calls.c +++ b/gcc/calls.c @@ -153,7 +153,8 @@ static rtx emit_library_call_value_1 (int, rtx, rtx, enum libcall_type, enum machine_mode, int, va_list); static int special_function_p (const_tree, int); static int check_sibcall_argument_overlap_1 (rtx); -static int check_sibcall_argument_overlap (rtx, struct arg_data *, int); +static int check_sibcall_argument_overlap (rtx_base_insn, struct arg_data *, + int); static int combine_pending_stack_adjustment_and_call (int, struct args_size *, unsigned int); @@ -261,7 +262,8 @@ emit_call_1 (rtx funexp, tree fntree ATTRIBUTE_UNUSED, tree fndecl ATTRIBUTE_UNU cumulative_args_t args_so_far ATTRIBUTE_UNUSED) { rtx rounded_stack_size_rtx = GEN_INT (rounded_stack_size); - rtx call_insn, call, funmem; + rtx_base_insn call_insn; + rtx call, funmem; int already_popped = 0; HOST_WIDE_INT n_popped = targetm.calls.return_pops_args (fndecl, funtype, stack_size); @@ -1697,8 +1699,8 @@ rtx_for_function_call (tree fndecl, tree addr) static struct { /* Last insn that has been scanned by internal_arg_pointer_based_exp_scan, - or NULL_RTX if none has been scanned yet. */ - rtx scan_start; + or NULL_RTX_BASE_INSN if none has been scanned yet. */ + rtx_base_insn scan_start; /* Vector indexed by REGNO - FIRST_PSEUDO_REGISTER, recording if a pseudo is based on crtl->args.internal_arg_pointer. The element is NULL_RTX if the pseudo isn't based on it, a CONST_INT offset if the pseudo is based on it @@ -1717,7 +1719,7 @@ static rtx internal_arg_pointer_based_exp (rtx, bool); static void internal_arg_pointer_based_exp_scan (void) { - rtx insn, scan_start = internal_arg_pointer_exp_state.scan_start; + rtx_base_insn insn, scan_start = internal_arg_pointer_exp_state.scan_start; if (scan_start == NULL_RTX) insn = get_insns (); @@ -1883,7 +1885,7 @@ load_register_parameters (struct arg_data *args, int num_actuals, int partial = args[i].partial; int nregs; int size = 0; - rtx before_arg = get_last_insn (); + rtx_base_insn before_arg = get_last_insn (); /* Set non-negative if we must move a word at a time, even if just one word (e.g, partial == 4 && mode == DFmode). Set to -1 if we just use a normal move insn. This value can be @@ -2114,7 +2116,8 @@ check_sibcall_argument_overlap_1 (rtx x) slots, zero otherwise. */ static int -check_sibcall_argument_overlap (rtx insn, struct arg_data *arg, int mark_stored_args_map) +check_sibcall_argument_overlap (rtx_base_insn insn, struct arg_data *arg, + int mark_stored_args_map) { int low, high; @@ -2205,9 +2208,9 @@ expand_call (tree exp, rtx target, int ignore) /* RTX for the function to be called. */ rtx funexp; /* Sequence of insns to perform a normal "call". */ - rtx normal_call_insns = NULL_RTX; + rtx_base_insn normal_call_insns = NULL_RTX_BASE_INSN; /* Sequence of insns to perform a tail "call". */ - rtx tail_call_insns = NULL_RTX; + rtx_base_insn tail_call_insns = NULL_RTX_BASE_INSN; /* Data type of the function. */ tree funtype; tree type_arg_types; @@ -2673,8 +2676,8 @@ expand_call (tree exp, rtx target, int ignore) recursion call can be ignored if we indeed use the tail call expansion. */ saved_pending_stack_adjust save; - rtx insns; - rtx before_call, next_arg_reg, after_args; + rtx_base_insn insns, before_call, after_args; + rtx next_arg_reg; if (pass == 0) { @@ -3043,7 +3046,7 @@ expand_call (tree exp, rtx target, int ignore) { if (args[i].reg == 0 || args[i].pass_on_stack) { - rtx before_arg = get_last_insn (); + rtx_base_insn before_arg = get_last_insn (); /* We don't allow passing huge (> 2^30 B) arguments by value. It would cause an overflow later on. */ @@ -3083,7 +3086,7 @@ expand_call (tree exp, rtx target, int ignore) for (i = 0; i < num_actuals; i++) if (args[i].partial != 0 && ! args[i].pass_on_stack) { - rtx before_arg = get_last_insn (); + rtx_base_insn before_arg = get_last_insn (); if (store_one_arg (&args[i], argblock, flags, adjusted_args_size.var != 0, @@ -3201,7 +3204,7 @@ expand_call (tree exp, rtx target, int ignore) if (pass && (flags & ECF_MALLOC)) { rtx temp = gen_reg_rtx (GET_MODE (valreg)); - rtx last, insns; + rtx_base_insn last, insns; /* The return value from a malloc-like function is a pointer. */ if (TREE_CODE (rettype) == POINTER_TYPE) @@ -3380,7 +3383,7 @@ expand_call (tree exp, rtx target, int ignore) if (old_stack_level) { - rtx prev = get_last_insn (); + rtx_base_insn prev = get_last_insn (); emit_stack_restore (SAVE_BLOCK, old_stack_level); stack_pointer_delta = old_stack_pointer_delta; @@ -3456,7 +3459,7 @@ expand_call (tree exp, rtx target, int ignore) } sbitmap_free (stored_args_map); - internal_arg_pointer_exp_state.scan_start = NULL_RTX; + internal_arg_pointer_exp_state.scan_start = NULL_RTX_BASE_INSN; internal_arg_pointer_exp_state.cache.release (); } else @@ -3472,7 +3475,7 @@ expand_call (tree exp, rtx target, int ignore) /* If something prevents making this a sibling call, zero out the sequence. */ if (sibcall_failure) - tail_call_insns = NULL_RTX; + tail_call_insns = NULL_RTX_BASE_INSN; else break; } @@ -3618,7 +3621,7 @@ emit_library_call_value_1 (int retval, rtx orgfun, rtx value, int flags; int reg_parm_stack_space = 0; int needed; - rtx before_call; + rtx_base_insn before_call; tree tfom; /* type_for_mode (outmode, 0) */ #ifdef REG_PARM_STACK_SPACE @@ -4235,7 +4238,7 @@ emit_library_call_value_1 (int retval, rtx orgfun, rtx value, and LCT_RETURNS_TWICE, cannot perform non-local gotos. */ if (flags & ECF_NOTHROW) { - rtx last = get_last_insn (); + rtx_base_insn last = get_last_insn (); while (!CALL_P (last)) { last = PREV_INSN (last); -- 1.7.11.7