flags |= ECF_NOTHROW;
if (TREE_READONLY (exp) && ! TREE_THIS_VOLATILE (exp))
- flags |= ECF_LIBCALL_BLOCK;
+ flags |= ECF_LIBCALL_BLOCK | ECF_CONST;
}
-
- if (TREE_READONLY (exp) && ! TREE_THIS_VOLATILE (exp))
+ else if (TYPE_P (exp) && TYPE_READONLY (exp) && ! TREE_THIS_VOLATILE (exp))
flags |= ECF_CONST;
if (TREE_THIS_VOLATILE (exp))
}
mode = TYPE_MODE (type);
- unsignedp = TREE_UNSIGNED (type);
+ unsignedp = TYPE_UNSIGNED (type);
if (targetm.calls.promote_function_args (fndecl ? TREE_TYPE (fndecl) : 0))
mode = promote_mode (type, mode, &unsignedp, 1);
args_size->constant = MAX (args_size->constant,
reg_parm_stack_space);
-#ifdef MAYBE_REG_PARM_STACK_SPACE
- if (reg_parm_stack_space == 0)
- args_size->constant = 0;
-#endif
-
#ifndef OUTGOING_REG_PARM_STACK_SPACE
args_size->constant -= reg_parm_stack_space;
#endif
{
rtx mem = validize_mem (args[i].value);
-#ifdef BLOCK_REG_PADDING
/* Handle a BLKmode that needs shifting. */
if (nregs == 1 && size < UNITS_PER_WORD
- && args[i].locate.where_pad == downward)
+#ifdef BLOCK_REG_PADDING
+ && args[i].locate.where_pad == downward
+#else
+ && BYTES_BIG_ENDIAN
+#endif
+ )
{
rtx tem = operand_subword_force (mem, 0, args[i].mode);
rtx ri = gen_rtx_REG (word_mode, REGNO (reg));
emit_move_insn (ri, x);
}
else
-#endif
move_block_to_reg (REGNO (reg), mem, nregs, args[i].mode);
}
int reg_parm_stack_space = 0;
#ifdef REG_PARM_STACK_SPACE
-#ifdef MAYBE_REG_PARM_STACK_SPACE
- reg_parm_stack_space = MAYBE_REG_PARM_STACK_SPACE;
-#else
reg_parm_stack_space = REG_PARM_STACK_SPACE (fndecl);
#endif
-#endif
before_call = get_last_insn ();
warning ("%Jinlining failed in call to '%F'", fndecl, fndecl);
warning ("called from here");
}
- (*lang_hooks.mark_addressable) (fndecl);
+ lang_hooks.mark_addressable (fndecl);
return (rtx) (size_t) - 1;
}
warning ("%Jcan't inline call to '%F'", fndecl, fndecl);
warning ("called from here");
}
- (*lang_hooks.mark_addressable) (fndecl);
+ lang_hooks.mark_addressable (fndecl);
}
if (ignore
}
#ifdef REG_PARM_STACK_SPACE
-#ifdef MAYBE_REG_PARM_STACK_SPACE
- reg_parm_stack_space = MAYBE_REG_PARM_STACK_SPACE;
-#else
reg_parm_stack_space = REG_PARM_STACK_SPACE (fndecl);
#endif
-#endif
#ifndef OUTGOING_REG_PARM_STACK_SPACE
if (reg_parm_stack_space > 0 && PUSH_ARGS)
/* In case this is a static function, note that it has been
used. */
if (! TREE_ADDRESSABLE (fndecl))
- (*lang_hooks.mark_addressable) (fndecl);
+ lang_hooks.mark_addressable (fndecl);
is_integrable = 0;
}
}
/* Munge the tree to split complex arguments into their imaginary
and real parts. */
- if (SPLIT_COMPLEX_ARGS)
+ if (targetm.calls.split_complex_arg)
{
type_arg_types = split_complex_types (TYPE_ARG_TYPES (funtype));
actparms = split_complex_values (actparms);
|| structure_value_addr != NULL_RTX
/* Check whether the target is able to optimize the call
into a sibcall. */
- || !(*targetm.function_ok_for_sibcall) (fndecl, exp)
+ || !targetm.function_ok_for_sibcall (fndecl, exp)
/* Functions that do not return exactly once may not be sibcall
optimized. */
|| (flags & (ECF_RETURNS_TWICE | ECF_LONGJMP | ECF_NORETURN))
!= RETURN_POPS_ARGS (current_function_decl,
TREE_TYPE (current_function_decl),
current_function_args_size))
- || !(*lang_hooks.decls.ok_for_sibcall) (fndecl))
+ || !lang_hooks.decls.ok_for_sibcall (fndecl))
try_tail_call = 0;
if (try_tail_call || try_tail_recursion)
if (pass && (flags & ECF_LIBCALL_BLOCK))
NO_DEFER_POP;
-#ifdef FINAL_REG_PARM_STACK_SPACE
- reg_parm_stack_space = FINAL_REG_PARM_STACK_SPACE (args_size.constant,
- args_size.var);
-#endif
/* Precompute any arguments as needed. */
if (pass)
precompute_arguments (flags, num_actuals, args);
&& GET_MODE (target) != TYPE_MODE (TREE_TYPE (exp)))
{
tree type = TREE_TYPE (exp);
- int unsignedp = TREE_UNSIGNED (type);
+ int unsignedp = TYPE_UNSIGNED (type);
int offset = 0;
/* If we don't promote as expected, something is wrong. */
{
tree p;
+ /* Before allocating memory, check for the common case of no complex. */
+ for (p = values; p; p = TREE_CHAIN (p))
+ {
+ tree type = TREE_TYPE (TREE_VALUE (p));
+ if (type && TREE_CODE (type) == COMPLEX_TYPE
+ && targetm.calls.split_complex_arg (type))
+ goto found;
+ }
+ return values;
+
+ found:
values = copy_list (values);
for (p = values; p; p = TREE_CHAIN (p))
if (!complex_type)
continue;
- if (TREE_CODE (complex_type) == COMPLEX_TYPE)
+ if (TREE_CODE (complex_type) == COMPLEX_TYPE
+ && targetm.calls.split_complex_arg (complex_type))
{
tree subtype;
tree real, imag, next;
{
tree p;
+ /* Before allocating memory, check for the common case of no complex. */
+ for (p = types; p; p = TREE_CHAIN (p))
+ {
+ tree type = TREE_VALUE (p);
+ if (TREE_CODE (type) == COMPLEX_TYPE
+ && targetm.calls.split_complex_arg (type))
+ goto found;
+ }
+ return types;
+
+ found:
types = copy_list (types);
for (p = types; p; p = TREE_CHAIN (p))
{
tree complex_type = TREE_VALUE (p);
- if (TREE_CODE (complex_type) == COMPLEX_TYPE)
+ if (TREE_CODE (complex_type) == COMPLEX_TYPE
+ && targetm.calls.split_complex_arg (complex_type))
{
tree next, imag;
rtx struct_value = targetm.calls.struct_value_rtx (0, 0);
#ifdef REG_PARM_STACK_SPACE
-#ifdef MAYBE_REG_PARM_STACK_SPACE
- reg_parm_stack_space = MAYBE_REG_PARM_STACK_SPACE;
-#else
reg_parm_stack_space = REG_PARM_STACK_SPACE ((tree) 0);
#endif
-#endif
/* By default, library functions can not throw. */
flags = ECF_NOTHROW;
decide where in memory it should come back. */
if (outmode != VOIDmode)
{
- tfom = (*lang_hooks.types.type_for_mode) (outmode, 0);
+ tfom = lang_hooks.types.type_for_mode (outmode, 0);
if (aggregate_value_p (tfom, 0))
{
#ifdef PCC_STATIC_STRUCT_RETURN
slot = val;
else if (must_copy)
{
- slot = assign_temp ((*lang_hooks.types.type_for_mode) (mode, 0),
+ slot = assign_temp (lang_hooks.types.type_for_mode (mode, 0),
0, 1, 1);
emit_move_insn (slot, val);
}
else
{
- tree type = (*lang_hooks.types.type_for_mode) (mode, 0);
+ tree type = lang_hooks.types.type_for_mode (mode, 0);
slot
= gen_rtx_MEM (mode,
FUNCTION_ARG_ADVANCE (args_so_far, mode, (tree) 0, 1);
}
-#ifdef FINAL_REG_PARM_STACK_SPACE
- reg_parm_stack_space = FINAL_REG_PARM_STACK_SPACE (args_size.constant,
- args_size.var);
-#endif
/* If this machine requires an external definition for library
functions, write one out. */
assemble_external_libcall (fun);