/* Convert RTL to assembler code and output it, for GNU compiler.
Copyright (C) 1987, 1988, 1989, 1992, 1993, 1994, 1995, 1996, 1997,
- 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005
+ 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006
Free Software Foundation, Inc.
This file is part of GCC.
/* Whether to force emission of a line note before the next insn. */
static bool force_source_line = false;
-
+
extern const int length_unit_log; /* This is defined in insn-attrtab.c. */
/* Nonzero while outputting an `asm' with operands.
}
/* Obtain the current length of an insn. If branch shortening has been done,
- get its actual length. Otherwise, use FALLBACK_FN to calcualte the
+ get its actual length. Otherwise, use FALLBACK_FN to calculate the
length. */
static inline int
get_attr_length_1 (rtx insn ATTRIBUTE_UNUSED,
/* Free uid_shuid before reallocating it. */
free (uid_shuid);
-
+
uid_shuid = XNEWVEC (int, max_uid);
if (max_labelno != max_label_num ())
INSN_SHUID (insn) = i++;
if (INSN_P (insn))
continue;
-
+
if (LABEL_P (insn))
{
rtx next;
CC_STATUS_INIT;
/* Output the insns. */
- for (insn = NEXT_INSN (first); insn;)
+ for (insn = first; insn;)
{
#ifdef HAVE_ATTR_length
if ((unsigned) INSN_UID (insn) >= INSN_ADDRESSES_SIZE ())
{
case NOTE_INSN_DELETED:
case NOTE_INSN_FUNCTION_END:
- case NOTE_INSN_REPEATED_LINE_NUMBER:
- case NOTE_INSN_EXPECTED_VALUE:
break;
case NOTE_INSN_SWITCH_TEXT_SECTIONS:
(*debug_hooks->switch_text_section) ();
switch_to_section (current_function_section ());
break;
-
+
case NOTE_INSN_BASIC_BLOCK:
-
#ifdef TARGET_UNWIND_INFO
targetm.asm_out.unwind_emit (asm_out_file, insn);
#endif
int insn_code_number;
const char *template;
+#ifdef HAVE_conditional_execution
+ /* Reset this early so it is correct for ASM statements. */
+ current_insn_predicate = NULL_RTX;
+#endif
/* An INSN, JUMP_INSN or CALL_INSN.
First check for special kinds that recog doesn't recognize. */
#ifdef HAVE_conditional_execution
if (GET_CODE (PATTERN (insn)) == COND_EXEC)
current_insn_predicate = COND_EXEC_TEST (PATTERN (insn));
- else
- current_insn_predicate = NULL_RTX;
#endif
#ifdef HAVE_cc0
int letter = *p++;
unsigned long opnum;
char *endptr;
-
+
opnum = strtoul (p, &endptr, 10);
if (endptr == p)
{
unsigned long opnum;
char *endptr;
-
+
opnum = strtoul (p, &endptr, 10);
if (this_is_asm_operands && opnum >= insn_noperands)
output_operand_lossage ("operand number out of range");
final_forward_branch_p (rtx insn)
{
int insn_id, label_id;
-
+
gcc_assert (uid_shuid);
insn_id = INSN_SHUID (insn);
label_id = INSN_SHUID (JUMP_LABEL (insn));
for (i = 0; i < symbol_queue_index; ++i)
{
- /* If we pushed queued symbols then such symbols are must be
+ /* If we pushed queued symbols then such symbols must be
output no matter what anyone else says. Specifically,
we need to make sure dbxout_symbol() thinks the symbol was
used and also we need to override TYPE_DECL_SUPPRESS_DEBUG
#ifdef TARGET_UNWIND_INFO
/* ??? The IA-64 ".handlerdata" directive must be issued before
the ".endp" directive that closes the procedure descriptor. */
- output_function_exception_table ();
+ output_function_exception_table (fnname);
#endif
assemble_end_function (current_function_decl, fnname);
#ifndef TARGET_UNWIND_INFO
/* Otherwise, it feels unclean to switch sections in the middle. */
- output_function_exception_table ();
+ output_function_exception_table (fnname);
#endif
user_defined_section_attribute = false;
shorten_branches (get_insns ());
return 0;
}
-
+
struct tree_opt_pass pass_shorten_branches =
{
"shorten", /* name */
epilogue_completed = 0;
flow2_completed = 0;
no_new_pseudos = 0;
+#ifdef STACK_REGS
+ regstack_completed = 0;
+#endif
/* Clear out the insn_length contents now that they are no
longer valid. */