mirror of
git://gcc.gnu.org/git/gcc.git
synced 2025-03-28 22:11:21 +08:00
builtins.c (gimplify_va_arg_expr): Reword comments to avoid 'abort'.
* builtins.c (gimplify_va_arg_expr): Reword comments to avoid 'abort'. Use gcc_assert and gcc_unreachable as appropriate. * c-format.c (get_constant, decode_format_attr, get_flag_spec, find_char_info_specifier_index, find_length_info_modifier_index): Likewise. * c-typeck.c (composite_type, pop_init_level): Likewise. * combine.c (cant_combine_insn_p, try_combine): Likewise. * cse.c (cse_insn): Likewise * dominance.c (calc_dfs_tree): Likewise dwarf2out.c (loc_descriptor_from_tree_1, add_abstract_origin_attribute, force_decl_die, force_type_die): Likewise emit-rtl.c (operand_subword_force): Likewise explow.c (hard_function_value): Likewise expmed.c (store_bit_field, expand_divmod, emit_store_flag_force): Likewise expr.c (emit_move_multi_word, store_expr, expand_expr_real_1): Likewise final.c (this_is_asm_operands, shorten_branches, final_scan_insn, output_operand): Likewise flow.c (recompute_reg_usage): Likewise * function.c (assign_stack_temp_for_type, assign_temp, handle_epilogue_set): Likewise * genextract.c (main): Likewise * gimplify.c (mostly_copy_tree_r, gimplify_return_expr, gimplify_modify_expr_rhs, gimplify_expr): Likewise * haifa-sched.c (ready_lastpos, ready_remove_first, ready_element, ready_remove, rm_line_notes, rm_other_notes, schedule_block): Likewise mips-tfile.c (copy_object, out_of_bounds): Likewise From-SVN: r98567
This commit is contained in:
parent
98c41d988c
commit
535a42b116
@ -1,3 +1,36 @@
|
||||
2005-04-22 Nathan Sidwell <nathan@codesourcery.com>
|
||||
|
||||
* builtins.c (gimplify_va_arg_expr): Reword comments to avoid
|
||||
'abort'. Use gcc_assert and gcc_unreachable as appropriate.
|
||||
* c-format.c (get_constant, decode_format_attr, get_flag_spec,
|
||||
find_char_info_specifier_index,
|
||||
find_length_info_modifier_index): Likewise.
|
||||
* c-typeck.c (composite_type, pop_init_level): Likewise.
|
||||
* combine.c (cant_combine_insn_p, try_combine): Likewise.
|
||||
* cse.c (cse_insn): Likewise
|
||||
* dominance.c (calc_dfs_tree): Likewise
|
||||
dwarf2out.c (loc_descriptor_from_tree_1,
|
||||
add_abstract_origin_attribute, force_decl_die,
|
||||
force_type_die): Likewise
|
||||
emit-rtl.c (operand_subword_force): Likewise
|
||||
explow.c (hard_function_value): Likewise
|
||||
expmed.c (store_bit_field, expand_divmod,
|
||||
emit_store_flag_force): Likewise
|
||||
expr.c (emit_move_multi_word, store_expr,
|
||||
expand_expr_real_1): Likewise
|
||||
final.c (this_is_asm_operands, shorten_branches, final_scan_insn,
|
||||
output_operand): Likewise
|
||||
flow.c (recompute_reg_usage): Likewise
|
||||
* function.c (assign_stack_temp_for_type, assign_temp,
|
||||
handle_epilogue_set): Likewise
|
||||
* genextract.c (main): Likewise
|
||||
* gimplify.c (mostly_copy_tree_r, gimplify_return_expr,
|
||||
gimplify_modify_expr_rhs, gimplify_expr): Likewise
|
||||
* haifa-sched.c (ready_lastpos, ready_remove_first, ready_element,
|
||||
ready_remove, rm_line_notes, rm_other_notes,
|
||||
schedule_block): Likewise
|
||||
mips-tfile.c (copy_object, out_of_bounds): Likewise
|
||||
|
||||
2005-04-22 David Edelsohn <edelsohn@gnu.org>
|
||||
|
||||
PR target/20813
|
||||
|
@ -4262,7 +4262,8 @@ gimplify_va_arg_expr (tree *expr_p, tree *pre_p, tree *post_p)
|
||||
gimplify_expr (&valist, pre_p, post_p, is_gimple_min_lval, fb_lvalue);
|
||||
|
||||
if (!targetm.gimplify_va_arg_expr)
|
||||
/* Once most targets are converted this should abort. */
|
||||
/* FIXME:Once most targets are converted we should merely
|
||||
assert this is non-null. */
|
||||
return GS_ALL_DONE;
|
||||
|
||||
*expr_p = targetm.gimplify_va_arg_expr (valist, type, pre_p, post_p);
|
||||
|
@ -148,7 +148,7 @@ check_format_string (tree argument, unsigned HOST_WIDE_INT format_num,
|
||||
}
|
||||
|
||||
/* Verify EXPR is a constant, and store its value.
|
||||
If validated_p is true, abort on errors.
|
||||
If validated_p is true there should be no errors.
|
||||
Returns true on success, false otherwise. */
|
||||
static bool
|
||||
get_constant (tree expr, unsigned HOST_WIDE_INT *value, int validated_p)
|
||||
@ -164,12 +164,12 @@ get_constant (tree expr, unsigned HOST_WIDE_INT *value, int validated_p)
|
||||
return true;
|
||||
}
|
||||
|
||||
/* Decode the arguments to a "format" attribute into a function_format_info
|
||||
structure. It is already known that the list is of the right length.
|
||||
If VALIDATED_P is true, then these attributes have already been validated
|
||||
and this function will abort if they are erroneous; if false, it
|
||||
will give an error message. Returns true if the attributes are
|
||||
successfully decoded, false otherwise. */
|
||||
/* Decode the arguments to a "format" attribute into a
|
||||
function_format_info structure. It is already known that the list
|
||||
is of the right length. If VALIDATED_P is true, then these
|
||||
attributes have already been validated and must not be erroneous;
|
||||
if false, it will give an error message. Returns true if the
|
||||
attributes are successfully decoded, false otherwise. */
|
||||
|
||||
static bool
|
||||
decode_format_attr (tree args, function_format_info *info, int validated_p)
|
||||
@ -1063,10 +1063,10 @@ finish_dollar_format_checking (format_check_results *res, int pointer_gap_ok)
|
||||
/* Retrieve the specification for a format flag. SPEC contains the
|
||||
specifications for format flags for the applicable kind of format.
|
||||
FLAG is the flag in question. If PREDICATES is NULL, the basic
|
||||
spec for that flag must be retrieved and this function aborts if
|
||||
it cannot be found. If PREDICATES is not NULL, it is a string listing
|
||||
possible predicates for the spec entry; if an entry predicated on any
|
||||
of these is found, it is returned, otherwise NULL is returned. */
|
||||
spec for that flag must be retrieved and must exist. If
|
||||
PREDICATES is not NULL, it is a string listing possible predicates
|
||||
for the spec entry; if an entry predicated on any of these is
|
||||
found, it is returned, otherwise NULL is returned. */
|
||||
|
||||
static const format_flag_spec *
|
||||
get_flag_spec (const format_flag_spec *spec, int flag, const char *predicates)
|
||||
@ -2236,7 +2236,7 @@ format_type_warning (const char *descr, const char *format_start,
|
||||
|
||||
/* Given a format_char_info array FCI, and a character C, this function
|
||||
returns the index into the conversion_specs where that specifier's
|
||||
data is located. If the character isn't found it aborts. */
|
||||
data is located. The character must exist. */
|
||||
static unsigned int
|
||||
find_char_info_specifier_index (const format_char_info *fci, int c)
|
||||
{
|
||||
@ -2252,8 +2252,7 @@ find_char_info_specifier_index (const format_char_info *fci, int c)
|
||||
|
||||
/* Given a format_length_info array FLI, and a character C, this
|
||||
function returns the index into the conversion_specs where that
|
||||
modifier's data is located. If the character isn't found it
|
||||
aborts. */
|
||||
modifier's data is located. The character must exist. */
|
||||
static unsigned int
|
||||
find_length_info_modifier_index (const format_length_info *fli, int c)
|
||||
{
|
||||
|
@ -344,7 +344,7 @@ composite_type (tree t1, tree t2)
|
||||
/* If both args specify argument types, we must merge the two
|
||||
lists, argument by argument. */
|
||||
/* Tell global_bindings_p to return false so that variable_size
|
||||
doesn't abort on VLAs in parameter types. */
|
||||
doesn't die on VLAs in parameter types. */
|
||||
c_override_global_bindings_to_false = true;
|
||||
|
||||
len = list_length (p1);
|
||||
@ -5018,7 +5018,7 @@ pop_init_level (int implicit)
|
||||
|
||||
/* We have already issued an error message for the existence
|
||||
of a flexible array member not at the end of the structure.
|
||||
Discard the initializer so that we do not abort later. */
|
||||
Discard the initializer so that we do not die later. */
|
||||
if (TREE_CHAIN (constructor_fields) != NULL_TREE)
|
||||
constructor_type = NULL_TREE;
|
||||
}
|
||||
|
@ -1527,7 +1527,7 @@ cant_combine_insn_p (rtx insn)
|
||||
/* Never combine loads and stores involving hard regs that are likely
|
||||
to be spilled. The register allocator can usually handle such
|
||||
reg-reg moves by tying. If we allow the combiner to make
|
||||
substitutions of likely-spilled regs, we may abort in reload.
|
||||
substitutions of likely-spilled regs, reload might die.
|
||||
As an exception, we allow combinations involving fixed regs; these are
|
||||
not available to the register allocator so there's no risk involved. */
|
||||
|
||||
@ -2096,8 +2096,7 @@ try_combine (rtx i3, rtx i2, rtx i1, int *new_direct_jump_p)
|
||||
|| (i1 != 0 && FIND_REG_INC_NOTE (i1, NULL_RTX) != 0
|
||||
&& (n_occurrences + added_sets_1 + (added_sets_2 && ! i1_feeds_i3)
|
||||
> 1))
|
||||
/* Fail if we tried to make a new register (we used to abort, but there's
|
||||
really no reason to). */
|
||||
/* Fail if we tried to make a new register. */
|
||||
|| max_reg_num () != maxreg
|
||||
/* Fail if we couldn't do something and have a CLOBBER. */
|
||||
|| GET_CODE (newpat) == CLOBBER
|
||||
|
@ -5534,9 +5534,10 @@ cse_insn (rtx insn, rtx libcall_insn)
|
||||
|
||||
else if (constant_pool_entries_cost
|
||||
&& CONSTANT_P (trial)
|
||||
/* Reject cases that will abort in decode_rtx_const.
|
||||
On the alpha when simplifying a switch, we get
|
||||
(const (truncate (minus (label_ref) (label_ref)))). */
|
||||
/* Reject cases that will cause decode_rtx_const to
|
||||
die. On the alpha when simplifying a switch, we
|
||||
get (const (truncate (minus (label_ref)
|
||||
(label_ref)))). */
|
||||
&& ! (GET_CODE (trial) == CONST
|
||||
&& GET_CODE (XEXP (trial, 0)) == TRUNCATE)
|
||||
/* Likewise on IA-64, except without the truncate. */
|
||||
|
@ -372,7 +372,7 @@ calc_dfs_tree (struct dom_info *di, enum cdi_direction reverse)
|
||||
|
||||
di->nodes = di->dfsnum - 1;
|
||||
|
||||
/* This aborts e.g. when there is _no_ path from ENTRY to EXIT at all. */
|
||||
/* Make sure there is a path from ENTRY to EXIT at all. */
|
||||
gcc_assert (di->nodes == (unsigned int) n_basic_blocks + 1);
|
||||
}
|
||||
|
||||
|
@ -9283,7 +9283,7 @@ loc_descriptor_from_tree_1 (tree loc, int want_address)
|
||||
|
||||
#ifdef ENABLE_CHECKING
|
||||
/* Otherwise this is a generic code; we should just lists all of
|
||||
these explicitly. Aborting means we forgot one. */
|
||||
these explicitly. We forgot one. */
|
||||
gcc_unreachable ();
|
||||
#else
|
||||
/* In a release build, we want to degrade gracefully: better to
|
||||
@ -10583,7 +10583,7 @@ add_abstract_origin_attribute (dw_die_ref die, tree origin)
|
||||
trees (in the case of java, they simply have no block tree, in some other
|
||||
languages). For these functions, there is nothing we can really do to
|
||||
output correct debug info for inlined functions in all cases. Rather
|
||||
than abort, we'll just produce deficient debug info now, in that we will
|
||||
than die, we'll just produce deficient debug info now, in that we will
|
||||
have variables without a proper abstract origin. In the future, when all
|
||||
functions are lowered, we should re-add a gcc_assert (origin_die)
|
||||
here. */
|
||||
@ -12540,7 +12540,7 @@ is_redundant_typedef (tree decl)
|
||||
return 0;
|
||||
}
|
||||
|
||||
/* Returns the DIE for decl or aborts. */
|
||||
/* Returns the DIE for decl. A DIE will always be returned. */
|
||||
|
||||
static dw_die_ref
|
||||
force_decl_die (tree decl)
|
||||
@ -12593,8 +12593,7 @@ force_decl_die (tree decl)
|
||||
gcc_unreachable ();
|
||||
}
|
||||
|
||||
/* See if we can find the die for this deci now.
|
||||
If not then abort. */
|
||||
/* We should be able to find the DIE now. */
|
||||
if (!decl_die)
|
||||
decl_die = lookup_decl_die (decl);
|
||||
gcc_assert (decl_die);
|
||||
@ -12603,7 +12602,7 @@ force_decl_die (tree decl)
|
||||
return decl_die;
|
||||
}
|
||||
|
||||
/* Returns the DIE for decl or aborts. */
|
||||
/* Returns the DIE for TYPE. A DIE is always returned. */
|
||||
|
||||
static dw_die_ref
|
||||
force_type_die (tree type)
|
||||
|
@ -1330,9 +1330,10 @@ operand_subword (rtx op, unsigned int offset, int validate_address, enum machine
|
||||
return simplify_gen_subreg (word_mode, op, mode, (offset * UNITS_PER_WORD));
|
||||
}
|
||||
|
||||
/* Similar to `operand_subword', but never return 0. If we can't extract
|
||||
the required subword, put OP into a register and try again. If that fails,
|
||||
abort. We always validate the address in this case.
|
||||
/* Similar to `operand_subword', but never return 0. If we can't
|
||||
extract the required subword, put OP into a register and try again.
|
||||
The second attempt must succeed. We always validate the address in
|
||||
this case.
|
||||
|
||||
MODE is the mode of OP, in case it is CONST_INT. */
|
||||
|
||||
|
@ -1525,8 +1525,8 @@ hard_function_value (tree valtype, tree func ATTRIBUTE_UNUSED,
|
||||
enum machine_mode tmpmode;
|
||||
|
||||
/* int_size_in_bytes can return -1. We don't need a check here
|
||||
since the value of bytes will be large enough that no mode
|
||||
will match and we will abort later in this function. */
|
||||
since the value of bytes will then be large enough that no
|
||||
mode will match anyway. */
|
||||
|
||||
for (tmpmode = GET_CLASS_NARROWEST_MODE (MODE_INT);
|
||||
tmpmode != VOIDmode;
|
||||
|
22
gcc/expmed.c
22
gcc/expmed.c
@ -544,8 +544,8 @@ store_bit_field (rtx str_rtx, unsigned HOST_WIDE_INT bitsize,
|
||||
/* This is the mode we must force value to, so that there will be enough
|
||||
subwords to extract. Note that fieldmode will often (always?) be
|
||||
VOIDmode, because that is what store_field uses to indicate that this
|
||||
is a bit field, but passing VOIDmode to operand_subword_force will
|
||||
result in an abort. */
|
||||
is a bit field, but passing VOIDmode to operand_subword_force
|
||||
is not allowed. */
|
||||
fieldmode = GET_MODE (value);
|
||||
if (fieldmode == VOIDmode)
|
||||
fieldmode = smallest_mode_for_size (nwords * BITS_PER_WORD, MODE_INT);
|
||||
@ -582,10 +582,10 @@ store_bit_field (rtx str_rtx, unsigned HOST_WIDE_INT bitsize,
|
||||
{
|
||||
if (!REG_P (op0))
|
||||
{
|
||||
/* Since this is a destination (lvalue), we can't copy it to a
|
||||
pseudo. We can trivially remove a SUBREG that does not
|
||||
change the size of the operand. Such a SUBREG may have been
|
||||
added above. Otherwise, abort. */
|
||||
/* Since this is a destination (lvalue), we can't copy
|
||||
it to a pseudo. We can remove a SUBREG that does not
|
||||
change the size of the operand. Such a SUBREG may
|
||||
have been added above. */
|
||||
gcc_assert (GET_CODE (op0) == SUBREG
|
||||
&& (GET_MODE_SIZE (GET_MODE (op0))
|
||||
== GET_MODE_SIZE (GET_MODE (SUBREG_REG (op0)))));
|
||||
@ -3835,8 +3835,8 @@ expand_divmod (int rem_flag, enum tree_code code, enum machine_mode mode,
|
||||
|| optab2->handlers[compute_mode].libfunc)
|
||||
break;
|
||||
|
||||
/* If we still couldn't find a mode, use MODE, but we'll probably abort
|
||||
in expand_binop. */
|
||||
/* If we still couldn't find a mode, use MODE, but expand_binop will
|
||||
probably die. */
|
||||
if (compute_mode == VOIDmode)
|
||||
compute_mode = mode;
|
||||
|
||||
@ -5538,9 +5538,9 @@ emit_store_flag_force (rtx target, enum rtx_code code, rtx op0, rtx op1,
|
||||
|
||||
The algorithm is based on the code in expr.c:do_jump.
|
||||
|
||||
Note that this does not perform a general comparison. Only variants
|
||||
generated within expmed.c are correctly handled, others abort (but could
|
||||
be handled if needed). */
|
||||
Note that this does not perform a general comparison. Only
|
||||
variants generated within expmed.c are correctly handled, others
|
||||
could be handled if needed. */
|
||||
|
||||
static void
|
||||
do_cmp_and_jump (rtx arg1, rtx arg2, enum rtx_code op, enum machine_mode mode,
|
||||
|
15
gcc/expr.c
15
gcc/expr.c
@ -3020,8 +3020,8 @@ emit_move_multi_word (enum machine_mode mode, rtx x, rtx y)
|
||||
rtx ypart = operand_subword (y, i, 1, mode);
|
||||
|
||||
/* If we can't get a part of Y, put Y into memory if it is a
|
||||
constant. Otherwise, force it into a register. If we still
|
||||
can't get a part of Y, abort. */
|
||||
constant. Otherwise, force it into a register. Then we must
|
||||
be able to get a part of Y. */
|
||||
if (ypart == 0 && CONSTANT_P (y))
|
||||
{
|
||||
y = force_const_mem (mode, y);
|
||||
@ -4222,10 +4222,10 @@ store_expr (tree exp, rtx target, int call_param_p)
|
||||
but TARGET is not valid memory reference, TEMP will differ
|
||||
from TARGET although it is really the same location. */
|
||||
&& !(alt_rtl && rtx_equal_p (alt_rtl, target))
|
||||
/* If there's nothing to copy, don't bother. Don't call expr_size
|
||||
unless necessary, because some front-ends (C++) expr_size-hook
|
||||
aborts on objects that are not supposed to be bit-copied or
|
||||
bit-initialized. */
|
||||
/* If there's nothing to copy, don't bother. Don't call
|
||||
expr_size unless necessary, because some front-ends (C++)
|
||||
expr_size-hook must not be given objects that are not
|
||||
supposed to be bit-copied or bit-initialized. */
|
||||
&& expr_size (exp) != const0_rtx)
|
||||
{
|
||||
if (GET_MODE (temp) != GET_MODE (target)
|
||||
@ -8341,8 +8341,7 @@ expand_expr_real_1 (tree exp, rtx target, enum machine_mode tmode,
|
||||
op2 = expand_expr (oprnd2, NULL_RTX, VOIDmode, 0);
|
||||
temp = expand_ternary_op (mode, this_optab, op0, op1, op2,
|
||||
target, unsignedp);
|
||||
if (temp == 0)
|
||||
abort ();
|
||||
gcc_assert (temp);
|
||||
return temp;
|
||||
}
|
||||
|
||||
|
@ -136,7 +136,7 @@ static const char *last_filename;
|
||||
extern int length_unit_log; /* This is defined in insn-attrtab.c. */
|
||||
|
||||
/* Nonzero while outputting an `asm' with operands.
|
||||
This means that inconsistencies are the user's fault, so don't abort.
|
||||
This means that inconsistencies are the user's fault, so don't die.
|
||||
The precise value is the insn being output, to pass to error_for_asm. */
|
||||
rtx this_is_asm_operands;
|
||||
|
||||
@ -788,7 +788,7 @@ shorten_branches (rtx first ATTRIBUTE_UNUSED)
|
||||
label_align = xrealloc (label_align,
|
||||
n_labels * sizeof (struct label_alignment));
|
||||
|
||||
/* Range of labels grows monotonically in the function. Abort here
|
||||
/* Range of labels grows monotonically in the function. Failing here
|
||||
means that the initialization of array got lost. */
|
||||
gcc_assert (n_old_labels <= n_labels);
|
||||
|
||||
@ -2060,7 +2060,7 @@ final_scan_insn (rtx insn, FILE *file, int optimize ATTRIBUTE_UNUSED,
|
||||
|
||||
/* Get out the operand values. */
|
||||
string = decode_asm_operands (body, ops, NULL, NULL, NULL);
|
||||
/* Inhibit aborts on what would otherwise be compiler bugs. */
|
||||
/* Inhibit dieing on what would otherwise be compiler bugs. */
|
||||
insn_noperands = noperands;
|
||||
this_is_asm_operands = insn;
|
||||
|
||||
@ -3135,8 +3135,7 @@ output_operand (rtx x, int code ATTRIBUTE_UNUSED)
|
||||
if (x && GET_CODE (x) == SUBREG)
|
||||
x = alter_subreg (&x);
|
||||
|
||||
/* If X is a pseudo-register, abort now rather than writing trash to the
|
||||
assembler file. */
|
||||
/* X must not be a psuedo reg. */
|
||||
gcc_assert (!x || !REG_P (x) || REGNO (x) < FIRST_PSEUDO_REGISTER);
|
||||
|
||||
PRINT_OPERAND (asm_out_file, x, code);
|
||||
|
@ -4334,9 +4334,10 @@ void
|
||||
recompute_reg_usage (void)
|
||||
{
|
||||
allocate_reg_life_data ();
|
||||
/* distribute_notes in combiner fails to convert some of the REG_UNUSED notes
|
||||
to REG_DEAD notes. This causes CHECK_DEAD_NOTES in sched1 to abort. To
|
||||
solve this update the DEATH_NOTES here. */
|
||||
/* distribute_notes in combiner fails to convert some of the
|
||||
REG_UNUSED notes to REG_DEAD notes. This causes CHECK_DEAD_NOTES
|
||||
in sched1 to die. To solve this update the DEATH_NOTES
|
||||
here. */
|
||||
update_life_info (NULL, UPDATE_LIFE_LOCAL, PROP_REG_INFO | PROP_DEATH_NOTES);
|
||||
}
|
||||
|
||||
|
@ -578,13 +578,13 @@ make_slot_available (struct temp_slot *temp)
|
||||
free_temp_slots. Automatic variables for a block are allocated
|
||||
with this flag. KEEP values of 2 or 3 were needed respectively
|
||||
for variables whose lifetime is controlled by CLEANUP_POINT_EXPRs
|
||||
or for SAVE_EXPRs, but they are now unused and will abort.
|
||||
or for SAVE_EXPRs, but they are now unused.
|
||||
|
||||
TYPE is the type that will be used for the stack slot. */
|
||||
|
||||
rtx
|
||||
assign_stack_temp_for_type (enum machine_mode mode, HOST_WIDE_INT size, int keep,
|
||||
tree type)
|
||||
assign_stack_temp_for_type (enum machine_mode mode, HOST_WIDE_INT size,
|
||||
int keep, tree type)
|
||||
{
|
||||
unsigned int align;
|
||||
struct temp_slot *p, *best_p = 0, *selected = NULL, **pp;
|
||||
@ -815,7 +815,7 @@ assign_temp (tree type_or_decl, int keep, int memory_required,
|
||||
/* The size of the temporary may be too large to fit into an integer. */
|
||||
/* ??? Not sure this should happen except for user silliness, so limit
|
||||
this to things that aren't compiler-generated temporaries. The
|
||||
rest of the time we'll abort in assign_stack_temp_for_type. */
|
||||
rest of the time we'll die in assign_stack_temp_for_type. */
|
||||
if (decl && size == -1
|
||||
&& TREE_CODE (TYPE_SIZE_UNIT (type)) == INTEGER_CST)
|
||||
{
|
||||
@ -4715,34 +4715,35 @@ emit_return_into_block (basic_block bb, rtx line_note)
|
||||
|
||||
#if defined(HAVE_epilogue) && defined(INCOMING_RETURN_ADDR_RTX)
|
||||
|
||||
/* These functions convert the epilogue into a variant that does not modify the
|
||||
stack pointer. This is used in cases where a function returns an object
|
||||
whose size is not known until it is computed. The called function leaves the
|
||||
object on the stack, leaves the stack depressed, and returns a pointer to
|
||||
the object.
|
||||
/* These functions convert the epilogue into a variant that does not
|
||||
modify the stack pointer. This is used in cases where a function
|
||||
returns an object whose size is not known until it is computed.
|
||||
The called function leaves the object on the stack, leaves the
|
||||
stack depressed, and returns a pointer to the object.
|
||||
|
||||
What we need to do is track all modifications and references to the stack
|
||||
pointer, deleting the modifications and changing the references to point to
|
||||
the location the stack pointer would have pointed to had the modifications
|
||||
taken place.
|
||||
What we need to do is track all modifications and references to the
|
||||
stack pointer, deleting the modifications and changing the
|
||||
references to point to the location the stack pointer would have
|
||||
pointed to had the modifications taken place.
|
||||
|
||||
These functions need to be portable so we need to make as few assumptions
|
||||
about the epilogue as we can. However, the epilogue basically contains
|
||||
three things: instructions to reset the stack pointer, instructions to
|
||||
reload registers, possibly including the frame pointer, and an
|
||||
instruction to return to the caller.
|
||||
These functions need to be portable so we need to make as few
|
||||
assumptions about the epilogue as we can. However, the epilogue
|
||||
basically contains three things: instructions to reset the stack
|
||||
pointer, instructions to reload registers, possibly including the
|
||||
frame pointer, and an instruction to return to the caller.
|
||||
|
||||
If we can't be sure of what a relevant epilogue insn is doing, we abort.
|
||||
We also make no attempt to validate the insns we make since if they are
|
||||
invalid, we probably can't do anything valid. The intent is that these
|
||||
routines get "smarter" as more and more machines start to use them and
|
||||
they try operating on different epilogues.
|
||||
We must be sure of what a relevant epilogue insn is doing. We also
|
||||
make no attempt to validate the insns we make since if they are
|
||||
invalid, we probably can't do anything valid. The intent is that
|
||||
these routines get "smarter" as more and more machines start to use
|
||||
them and they try operating on different epilogues.
|
||||
|
||||
We use the following structure to track what the part of the epilogue that
|
||||
we've already processed has done. We keep two copies of the SP equivalence,
|
||||
one for use during the insn we are processing and one for use in the next
|
||||
insn. The difference is because one part of a PARALLEL may adjust SP
|
||||
and the other may use it. */
|
||||
We use the following structure to track what the part of the
|
||||
epilogue that we've already processed has done. We keep two copies
|
||||
of the SP equivalence, one for use during the insn we are
|
||||
processing and one for use in the next insn. The difference is
|
||||
because one part of a PARALLEL may adjust SP and the other may use
|
||||
it. */
|
||||
|
||||
struct epi_info
|
||||
{
|
||||
@ -4960,7 +4961,7 @@ static void
|
||||
handle_epilogue_set (rtx set, struct epi_info *p)
|
||||
{
|
||||
/* First handle the case where we are setting SP. Record what it is being
|
||||
set from. If unknown, abort. */
|
||||
set from, which we must be able to determine */
|
||||
if (reg_set_p (stack_pointer_rtx, set))
|
||||
{
|
||||
gcc_assert (SET_DEST (set) == stack_pointer_rtx);
|
||||
@ -4995,14 +4996,14 @@ handle_epilogue_set (rtx set, struct epi_info *p)
|
||||
return;
|
||||
}
|
||||
|
||||
/* Next handle the case where we are setting SP's equivalent register.
|
||||
If we already have a value to set it to, abort. We could update, but
|
||||
there seems little point in handling that case. Note that we have
|
||||
to allow for the case where we are setting the register set in
|
||||
the previous part of a PARALLEL inside a single insn. But use the
|
||||
old offset for any updates within this insn. We must allow for the case
|
||||
where the register is being set in a different (usually wider) mode than
|
||||
Pmode). */
|
||||
/* Next handle the case where we are setting SP's equivalent
|
||||
register. We must not already have a value to set it to. We
|
||||
could update, but there seems little point in handling that case.
|
||||
Note that we have to allow for the case where we are setting the
|
||||
register set in the previous part of a PARALLEL inside a single
|
||||
insn. But use the old offset for any updates within this insn.
|
||||
We must allow for the case where the register is being set in a
|
||||
different (usually wider) mode than Pmode). */
|
||||
else if (p->new_sp_equiv_reg != 0 && reg_set_p (p->new_sp_equiv_reg, set))
|
||||
{
|
||||
gcc_assert (!p->equiv_reg_src
|
||||
|
@ -475,9 +475,9 @@ from the machine description file `md'. */\n\n");
|
||||
printf (" break;\n\n");
|
||||
}
|
||||
|
||||
/* This should never be reached. Note that we would also reach this abort
|
||||
if we tried to extract something whose INSN_CODE was a DEFINE_EXPAND or
|
||||
DEFINE_SPLIT, but that is correct. */
|
||||
/* This should never be reached. Note that we would also reach here
|
||||
if we tried to extract something whose INSN_CODE was a
|
||||
DEFINE_EXPAND or DEFINE_SPLIT, but that is correct. */
|
||||
printf (" default:\n gcc_unreachable ();\n");
|
||||
|
||||
printf (" }\n}\n");
|
||||
|
@ -606,7 +606,7 @@ mostly_copy_tree_r (tree *tp, int *walk_subtrees, void *data)
|
||||
|| TREE_CODE_CLASS (code) == tcc_constant
|
||||
|| code == SAVE_EXPR || code == TARGET_EXPR
|
||||
/* We can't do anything sensible with a BLOCK used as an expression,
|
||||
but we also can't abort when we see it because of non-expression
|
||||
but we also can't just die when we see it because of non-expression
|
||||
uses. So just avert our eyes and cross our fingers. Silly Java. */
|
||||
|| code == BLOCK)
|
||||
*walk_subtrees = 0;
|
||||
@ -930,7 +930,7 @@ gimplify_return_expr (tree stmt, tree *pre_p)
|
||||
returned in registers. If we're returning values in registers, then
|
||||
we don't want to extend the lifetime of the RESULT_DECL, particularly
|
||||
across another call. In addition, for those aggregates for which
|
||||
hard_function_value generates a PARALLEL, we'll abort during normal
|
||||
hard_function_value generates a PARALLEL, we'll die during normal
|
||||
expansion of structure assignments; there's special code in expand_return
|
||||
to handle this case that does not exist in expand_expr. */
|
||||
if (!result_decl
|
||||
@ -2893,7 +2893,7 @@ gimplify_modify_expr_rhs (tree *expr_p, tree *from_p, tree *to_p, tree *pre_p,
|
||||
|
||||
??? What about code that pulls out the temp and uses it
|
||||
elsewhere? I think that such code never uses the TARGET_EXPR as
|
||||
an initializer. If I'm wrong, we'll abort because the temp won't
|
||||
an initializer. If I'm wrong, we'll die because the temp won't
|
||||
have any RTL. In that case, I guess we'll need to replace
|
||||
references somehow. */
|
||||
tree init = TARGET_EXPR_INITIAL (*from_p);
|
||||
@ -4329,7 +4329,7 @@ gimplify_expr (tree *expr_p, tree *pre_p, tree *post_p,
|
||||
#endif
|
||||
gcc_assert (fallback & fb_mayfail);
|
||||
/* If this is an asm statement, and the user asked for the
|
||||
impossible, don't abort. Fail and let gimplify_asm_expr
|
||||
impossible, don't die. Fail and let gimplify_asm_expr
|
||||
issue an error. */
|
||||
ret = GS_ERROR;
|
||||
goto out;
|
||||
|
@ -753,8 +753,7 @@ queue_insn (rtx insn, int n_cycles)
|
||||
HAIFA_INLINE static rtx *
|
||||
ready_lastpos (struct ready_list *ready)
|
||||
{
|
||||
if (ready->n_ready == 0)
|
||||
abort ();
|
||||
gcc_assert (ready->n_ready);
|
||||
return ready->vec + ready->first - ready->n_ready + 1;
|
||||
}
|
||||
|
||||
@ -782,8 +781,8 @@ HAIFA_INLINE static rtx
|
||||
ready_remove_first (struct ready_list *ready)
|
||||
{
|
||||
rtx t;
|
||||
if (ready->n_ready == 0)
|
||||
abort ();
|
||||
|
||||
gcc_assert (ready->n_ready);
|
||||
t = ready->vec[ready->first--];
|
||||
ready->n_ready--;
|
||||
/* If the queue becomes empty, reset it. */
|
||||
@ -803,10 +802,8 @@ ready_remove_first (struct ready_list *ready)
|
||||
HAIFA_INLINE static rtx
|
||||
ready_element (struct ready_list *ready, int index)
|
||||
{
|
||||
#ifdef ENABLE_CHECKING
|
||||
if (ready->n_ready == 0 || index >= ready->n_ready)
|
||||
abort ();
|
||||
#endif
|
||||
gcc_assert (ready->n_ready && index < ready->n_ready);
|
||||
|
||||
return ready->vec[ready->first - index];
|
||||
}
|
||||
|
||||
@ -822,8 +819,7 @@ ready_remove (struct ready_list *ready, int index)
|
||||
|
||||
if (index == 0)
|
||||
return ready_remove_first (ready);
|
||||
if (ready->n_ready == 0 || index >= ready->n_ready)
|
||||
abort ();
|
||||
gcc_assert (ready->n_ready && index < ready->n_ready);
|
||||
t = ready->vec[ready->first - index];
|
||||
ready->n_ready--;
|
||||
for (i = index; i < ready->n_ready; i++)
|
||||
@ -1105,12 +1101,7 @@ rm_line_notes (rtx head, rtx tail)
|
||||
prev = insn;
|
||||
insn = unlink_line_notes (insn, next_tail);
|
||||
|
||||
if (prev == tail)
|
||||
abort ();
|
||||
if (prev == head)
|
||||
abort ();
|
||||
if (insn == next_tail)
|
||||
abort ();
|
||||
gcc_assert (prev != tail && prev != head && insn != next_tail);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1289,12 +1280,7 @@ rm_other_notes (rtx head, rtx tail)
|
||||
|
||||
insn = unlink_other_notes (insn, next_tail);
|
||||
|
||||
if (prev == tail)
|
||||
abort ();
|
||||
if (prev == head)
|
||||
abort ();
|
||||
if (insn == next_tail)
|
||||
abort ();
|
||||
gcc_assert (prev != tail && prev != head && insn != next_tail);
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1868,18 +1854,19 @@ schedule_block (int b, int rgn_n_insns)
|
||||
and caused problems because schedule_block and compute_forward_dependences
|
||||
had different notions of what the "head" insn was. */
|
||||
|
||||
if (head == tail && (! INSN_P (head)))
|
||||
abort ();
|
||||
gcc_assert (head != tail || INSN_P (head));
|
||||
|
||||
/* Debug info. */
|
||||
if (sched_verbose)
|
||||
{
|
||||
fprintf (sched_dump, ";; ======================================================\n");
|
||||
fprintf (sched_dump,
|
||||
";; ======================================================\n");
|
||||
fprintf (sched_dump,
|
||||
";; -- basic block %d from %d to %d -- %s reload\n",
|
||||
b, INSN_UID (head), INSN_UID (tail),
|
||||
(reload_completed ? "after" : "before"));
|
||||
fprintf (sched_dump, ";; ======================================================\n");
|
||||
fprintf (sched_dump,
|
||||
";; ======================================================\n");
|
||||
fprintf (sched_dump, "\n");
|
||||
}
|
||||
|
||||
@ -1938,8 +1925,7 @@ schedule_block (int b, int rgn_n_insns)
|
||||
list. */
|
||||
queue_to_ready (&ready);
|
||||
|
||||
if (ready.n_ready == 0)
|
||||
abort ();
|
||||
gcc_assert (ready.n_ready);
|
||||
|
||||
if (sched_verbose >= 2)
|
||||
{
|
||||
@ -2122,8 +2108,7 @@ schedule_block (int b, int rgn_n_insns)
|
||||
|
||||
/* Sanity check -- queue must be empty now. Meaningless if region has
|
||||
multiple bbs. */
|
||||
if (current_sched_info->queue_must_finish_empty && q_size != 0)
|
||||
abort ();
|
||||
gcc_assert (!current_sched_info->queue_must_finish_empty || q_size);
|
||||
|
||||
/* Update head/tail boundaries. */
|
||||
head = NEXT_INSN (prev_head);
|
||||
|
@ -4438,7 +4438,7 @@ copy_object (void)
|
||||
|
||||
|
||||
|
||||
/* Abort if the symbol table is not last. */
|
||||
/* The symbol table should be last. */
|
||||
if (max_file_offset != (unsigned long) stat_buf.st_size)
|
||||
fatal ("symbol table is not last (symbol table ends at %ld, .o ends at %ld",
|
||||
max_file_offset,
|
||||
@ -4940,7 +4940,7 @@ pfatal_with_name (const char *msg)
|
||||
}
|
||||
|
||||
|
||||
/* Procedure to abort with an out of bounds error message. It has
|
||||
/* Procedure to die with an out of bounds error message. It has
|
||||
type int, so it can be used with an ?: expression within the
|
||||
ORIG_xxx macros, but the function never returns. */
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user