/* Procedure integration for GCC.
Copyright (C) 1988, 1991, 1993, 1994, 1995, 1996, 1997, 1998, 1999,
- 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
+ 2000, 2001, 2002, 2003, 2004 Free Software Foundation, Inc.
Contributed by Michael Tiemann (tiemann@cygnus.com)
This file is part of GCC.
if (current_function_calls_alloca)
return N_("function using alloca cannot be inline");
+ if (current_function_calls_longjmp)
+ return N_("function using longjmp cannot be inline");
+
if (current_function_calls_setjmp)
return N_("function using setjmp cannot be inline");
if (current_function_cannot_inline)
return current_function_cannot_inline;
- /* If its not even close, don't even look. */
+ /* If it's not even close, don't even look. */
if (get_max_uid () > 3 * max_insns)
return N_("function too large to be inline");
}
/* Make the insns and PARM_DECLs of the current function permanent
- and record other information in DECL_SAVED_INSNS to allow inlining
- of this function in subsequent calls.
+ and record other information in DECL_STRUCT_FUNCTION to allow
+ inlining of this function in subsequent calls.
This routine need not copy any insns because we are not going
to immediately compile the insns in the insn chain. There
tree type, rtx structure_value_addr)
{
struct function *inlining_previous;
- struct function *inl_f = DECL_SAVED_INSNS (fndecl);
+ struct function *inl_f = DECL_STRUCT_FUNCTION (fndecl);
tree formal, actual, block;
rtx parm_insns = inl_f->emit->x_first_insn;
rtx insns = (inl_f->inl_last_parm_insn
abort ();
/* The mode if LOC and ARG can differ if LOC was a variable
- that had its mode promoted via PROMOTED_MODE. */
+ that had its mode promoted. */
arg_vals[i] = convert_modes (pmode,
TYPE_MODE (TREE_TYPE (arg)),
expand_expr (arg, NULL_RTX, mode,
incoming arg rtx values are expanded now so that we can be
sure we have enough slots in the const equiv map since the
store_expr call can easily blow the size estimate. */
- if (DECL_SAVED_INSNS (fndecl)->args_size != 0)
+ if (DECL_STRUCT_FUNCTION (fndecl)->args_size != 0)
copy_rtx_and_substitute (virtual_incoming_args_rtx, map, 0);
}
else if (GET_CODE (loc) == REG)
gen_rtx_MEM (GET_MODE (static_chain_incoming_rtx),
SET_DEST (set));
- /* emit the instruction in case it is used for something
+ /* Emit the instruction in case it is used for something
other than setting the static chain; if it's not used,
it can always be removed as dead code */
copy = emit_insn (copy_rtx_and_substitute (pattern, map, 0));
regno = REGNO (orig);
if (regno <= LAST_VIRTUAL_REGISTER
|| (map->integrating
- && DECL_SAVED_INSNS (map->fndecl)->internal_arg_pointer == orig))
+ && DECL_STRUCT_FUNCTION (map->fndecl)->internal_arg_pointer
+ == orig))
{
/* Some hard registers are also mapped,
but others are not translated. */
else if (regno == VIRTUAL_STACK_VARS_REGNUM)
{
rtx loc, seq;
- int size = get_func_frame_size (DECL_SAVED_INSNS (map->fndecl));
+ int size
+ = get_func_frame_size (DECL_STRUCT_FUNCTION (map->fndecl));
#ifdef FRAME_GROWS_DOWNWARD
int alignment
- = (DECL_SAVED_INSNS (map->fndecl)->stack_alignment_needed
+ = (DECL_STRUCT_FUNCTION (map->fndecl)->stack_alignment_needed
/ BITS_PER_UNIT);
/* In this case, virtual_stack_vars_rtx points to one byte
}
else if (regno == VIRTUAL_INCOMING_ARGS_REGNUM
|| (map->integrating
- && (DECL_SAVED_INSNS (map->fndecl)->internal_arg_pointer
+ && (DECL_STRUCT_FUNCTION (map->fndecl)->internal_arg_pointer
== orig)))
{
/* Do the same for a block to contain any arguments referenced
in memory. */
rtx loc, seq;
- int size = DECL_SAVED_INSNS (map->fndecl)->args_size;
+ int size = DECL_STRUCT_FUNCTION (map->fndecl)->args_size;
start_sequence ();
loc = assign_stack_temp (BLKmode, size, 1);
if (NOTE_LINE_NUMBER (orig) != NOTE_INSN_DELETED_LABEL)
break;
- /* ... FALLTHRU ... */
+ /* Fall through. */
case CODE_LABEL:
LABEL_PRESERVE_P (get_label_from_map (map, CODE_LABEL_NUMBER (orig)))
= LABEL_PRESERVE_P (orig);
switch (*format_ptr++)
{
case '0':
- /* Copy this through the wide int field; that's safest. */
- X0WINT (copy, i) = X0WINT (orig, i);
+ X0ANY (copy, i) = X0ANY (orig, i);
break;
case 'e':
/* If this is a commutative operation, move a constant to the second
operand unless the second operand is already a CONST_INT. */
if (! memonly
- && (GET_RTX_CLASS (code) == 'c' || code == NE || code == EQ)
+ && (GET_RTX_CLASS (code) == RTX_COMM_ARITH
+ || GET_RTX_CLASS (code) == RTX_COMM_COMPARE)
&& CONSTANT_P (XEXP (x, 0)) && GET_CODE (XEXP (x, 1)) != CONST_INT)
{
rtx tem = XEXP (x, 0);
if (! memonly)
switch (GET_RTX_CLASS (code))
{
- case '1':
+ case RTX_UNARY:
if (op0_mode == MAX_MACHINE_MODE)
abort ();
new = simplify_unary_operation (code, GET_MODE (x),
XEXP (x, 0), op0_mode);
break;
- case '<':
+ case RTX_COMPARE:
+ case RTX_COMM_COMPARE:
{
enum machine_mode op_mode = GET_MODE (XEXP (x, 0));
break;
}
- case '2':
- case 'c':
+ case RTX_BIN_ARITH:
+ case RTX_COMM_ARITH:
new = simplify_binary_operation (code, GET_MODE (x),
XEXP (x, 0), XEXP (x, 1));
break;
- case 'b':
- case '3':
+ case RTX_BITFIELD_OPS:
+ case RTX_TERNARY:
if (op0_mode == MAX_MACHINE_MODE)
abort ();
{
rtx op0 = XEXP (x, 0);
- if (GET_RTX_CLASS (GET_CODE (op0)) == '<'
+ if (COMPARISON_P (op0)
&& GET_MODE (op0) == VOIDmode
&& ! side_effects_p (op0)
&& XEXP (op0, 0) == map->compare_src
XEXP (x, 0), XEXP (x, 1),
XEXP (x, 2));
break;
+
+ default:
+ break;
}
if (new)
{
unsigned int uregno = regno;
unsigned int last_reg = (uregno >= FIRST_PSEUDO_REGISTER ? uregno
- : uregno + HARD_REGNO_NREGS (uregno, mode) - 1);
+ : uregno + hard_regno_nregs[uregno][mode] - 1);
unsigned int i;
/* Ignore virtual stack var or virtual arg register since those
}
}
\f
-/* Output the assembly language code for the function FNDECL
- from its DECL_SAVED_INSNS. Used for inline functions that are output
+/* Output the assembly language code for the function FNDECL from
+ its DECL_STRUCT_FUNCTION. Used for inline functions that are output
at end of compilation instead of where they came in the source. */
static GTY(()) struct function *old_cfun;
{
enum debug_info_type old_write_symbols = write_symbols;
const struct gcc_debug_hooks *const old_debug_hooks = debug_hooks;
- struct function *f = DECL_SAVED_INSNS (fndecl);
+ struct function *f = DECL_STRUCT_FUNCTION (fndecl);
old_cfun = cfun;
cfun = f;