From: Richard Henderson Date: Wed, 18 Jul 2001 03:24:53 +0000 (-0700) Subject: calls.c (prepare_call_address): New parameter SIBCALLP. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=3affaf29346bfaea9af3b75fcb0e8acaa26a6eb8;p=gcc.git calls.c (prepare_call_address): New parameter SIBCALLP. * calls.c (prepare_call_address): New parameter SIBCALLP. If true, don't force the function address into a register. (expand_call, emit_library_call_value_1): Update callers. * builtins.c (expand_builtin_apply): Likewise. * expr.h (prepare_call_address): Update decl. From-SVN: r44095 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index b4eaf6d8451..b0525f874a0 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,11 +1,19 @@ +2001-07-17 Richard Henderson + + * calls.c (prepare_call_address): New parameter SIBCALLP. If true, + don't force the function address into a register. + (expand_call, emit_library_call_value_1): Update callers. + * builtins.c (expand_builtin_apply): Likewise. + * expr.h (prepare_call_address): Update decl. + 2001-07-17 Chandrakala Chavva - * config.gcc: For *-*-chorusos triplet, get chorus.h file from - config directory. - * config/i386/chorus.h: Move up. - * config/sparc/chorus.h: Likewise. - * config/rs6000/chorus.h: Likewise. - * config/chorus.h: Moved here. + * config.gcc: For *-*-chorusos triplet, get chorus.h file from + config directory. + * config/i386/chorus.h: Move up. + * config/sparc/chorus.h: Likewise. + * config/rs6000/chorus.h: Likewise. + * config/chorus.h: Moved here. 2001-07-17 Andreas Schwab diff --git a/gcc/builtins.c b/gcc/builtins.c index 219714dd7d1..8a44a7c6798 100644 --- a/gcc/builtins.c +++ b/gcc/builtins.c @@ -1138,7 +1138,7 @@ expand_builtin_apply (function, arguments, argsize) } /* All arguments and registers used for the call are set up by now! */ - function = prepare_call_address (function, NULL_TREE, &call_fusage, 0); + function = prepare_call_address (function, NULL_TREE, &call_fusage, 0, 0); /* Ensure address is valid. SYMBOL_REF is already valid, so no need, and we don't want to load it into a register as an optimization, diff --git a/gcc/calls.c b/gcc/calls.c index 7421d340cd1..045c9f9e1a2 100644 --- a/gcc/calls.c +++ b/gcc/calls.c @@ -355,11 +355,12 @@ calls_function_1 (exp, which) CALL_INSN_FUNCTION_USAGE information. */ rtx -prepare_call_address (funexp, fndecl, call_fusage, reg_parm_seen) +prepare_call_address (funexp, fndecl, call_fusage, reg_parm_seen, sibcallp) rtx funexp; tree fndecl; rtx *call_fusage; int reg_parm_seen; + int sibcallp; { rtx static_chain_value = 0; @@ -377,7 +378,7 @@ prepare_call_address (funexp, fndecl, call_fusage, reg_parm_seen) funexp = ((SMALL_REGISTER_CLASSES && reg_parm_seen) ? force_not_mem (memory_address (FUNCTION_MODE, funexp)) : memory_address (FUNCTION_MODE, funexp)); - else + else if (! sibcallp) { #ifndef NO_FUNCTION_CSE if (optimize && ! flag_no_function_cse) @@ -3038,7 +3039,7 @@ expand_call (exp, target, ignore) } funexp = prepare_call_address (funexp, fndecl, &call_fusage, - reg_parm_seen); + reg_parm_seen, pass == 0); load_register_parameters (args, num_actuals, &call_fusage, flags); @@ -4005,7 +4006,7 @@ emit_library_call_value_1 (retval, orgfun, value, fn_type, outmode, nargs, p) else argnum = 0; - fun = prepare_call_address (fun, NULL_TREE, &call_fusage, 0); + fun = prepare_call_address (fun, NULL_TREE, &call_fusage, 0, 0); /* Now load any reg parms into their regs. */ diff --git a/gcc/expr.h b/gcc/expr.h index f43b08ca291..ed79d99d05b 100644 --- a/gcc/expr.h +++ b/gcc/expr.h @@ -1112,7 +1112,7 @@ extern rtx trampoline_address PARAMS ((tree)); in its original home. This becomes invalid if any more code is emitted. */ extern rtx hard_function_value PARAMS ((tree, tree, int)); -extern rtx prepare_call_address PARAMS ((rtx, tree, rtx *, int)); +extern rtx prepare_call_address PARAMS ((rtx, tree, rtx *, int, int)); extern rtx expand_call PARAMS ((tree, rtx, int));