1991-12-24 04:31:09 +00:00
|
|
|
/* Print RTL for GNU C Compiler.
|
2000-01-17 17:16:21 +00:00
|
|
|
Copyright (C) 1987, 1988, 1992, 1997, 1998, 1999, 2000
|
1999-09-06 23:49:18 -06:00
|
|
|
Free Software Foundation, Inc.
|
1991-12-24 04:31:09 +00:00
|
|
|
|
|
|
|
This file is part of GNU CC.
|
|
|
|
|
|
|
|
GNU CC is free software; you can redistribute it and/or modify
|
|
|
|
it under the terms of the GNU General Public License as published by
|
|
|
|
the Free Software Foundation; either version 2, or (at your option)
|
|
|
|
any later version.
|
|
|
|
|
|
|
|
GNU CC is distributed in the hope that it will be useful,
|
|
|
|
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
GNU General Public License for more details.
|
|
|
|
|
|
|
|
You should have received a copy of the GNU General Public License
|
|
|
|
along with GNU CC; see the file COPYING. If not, write to
|
1995-06-15 08:04:37 -04:00
|
|
|
the Free Software Foundation, 59 Temple Place - Suite 330,
|
|
|
|
Boston, MA 02111-1307, USA. */
|
1991-12-24 04:31:09 +00:00
|
|
|
|
|
|
|
|
|
|
|
#include "config.h"
|
Major cutover to using system.h:
* Makefile.in (alias.o, bitmap.o, c-aux-info.o, c-common.o,
c-decl.o, c-iterate.o, c-lang.o, c-lex.o, c-pragma.o, c-typeck.o,
caller-save.o, calls.o, collect2.o, combine.o, cse.o, dbxout.o,
dwarf2out.o, dwarfout.o, emit-rtl.o, except.o, explow.o, expmed.o,
expr.o, final.o, flow.o, function.o, getpwd.o, global.o,
integrate.o, jump.o, local-alloc.o, loop.o, optabs.o, pexecute.o,
prefix.o, print-rtl.o, print-tree.o, profile.o, real.o, recog.o,
reg-stack.o, regclass.o, regmove.o, reload.o, reload1.o, reorg.o,
rtl.o, rtlanal.o, sdbout.o, stmt.o, stor-layout.o, stupid.o,
tlink.o, toplev.o, tree.o, unroll.o, varasm.o, xcoffout.o): Depend
on system.h.
* alias.c, bitmap.c, c-aux-info.c, c-common.c, c-decl.c,
c-iterate.c, c-lang.c, c-lex.c, c-pragma.c, c-typeck.c,
caller-save.c, calls.c, collect2.c, combine.c, cse.c, dbxout.c,
dwarf2out.c, dwarfout.c, emit-rtl.c, except.c, explow.c, expmed.c,
expr.c, final.c, flow.c, function.c, gcc.c, getpwd.c, global.c,
integrate.c, jump.c, local-alloc.c, loop.c, optabs.c, pexecute.c,
prefix.c, print-rtl.c, print-tree.c, profile.c, real.c, recog.c,
reg-stack.c, regclass.c, regmove.c, reload.c, reload1.c, reorg.c,
rtl.c, rtlanal.c, sched.c, sdbout.c, stmt.c, stor-layout.c,
stupid.c, tlink.c, toplev.c, tree.c, unroll.c, varasm.c,
xcoffout.c: Include system.h. Organize include ordering so
that stdarg/varargs comes before other system headers. Remove
spurious casts of functions assured of a prototype in system.h.
From-SVN: r18726
1998-03-20 14:58:42 +00:00
|
|
|
#include "system.h"
|
1991-12-24 04:31:09 +00:00
|
|
|
#include "rtl.h"
|
1998-07-06 15:40:02 -07:00
|
|
|
#include "real.h"
|
1998-10-06 09:03:38 +00:00
|
|
|
#include "flags.h"
|
2000-05-19 22:27:28 +00:00
|
|
|
#include "hard-reg-set.h"
|
1999-02-25 15:45:42 -08:00
|
|
|
#include "basic-block.h"
|
1991-12-24 04:31:09 +00:00
|
|
|
|
1992-10-14 04:23:52 +00:00
|
|
|
/* How to print out a register name.
|
|
|
|
We don't use PRINT_REG because some definitions of PRINT_REG
|
|
|
|
don't work here. */
|
|
|
|
#ifndef DEBUG_PRINT_REG
|
|
|
|
#define DEBUG_PRINT_REG(RTX, CODE, FILE) \
|
|
|
|
fprintf ((FILE), "%d %s", REGNO (RTX), reg_names[REGNO (RTX)])
|
|
|
|
#endif
|
|
|
|
|
|
|
|
/* Array containing all of the register names */
|
|
|
|
|
|
|
|
#ifdef DEBUG_REGISTER_NAMES
|
2000-05-20 19:45:36 +00:00
|
|
|
static const char * const debug_reg_names[] = DEBUG_REGISTER_NAMES;
|
|
|
|
#define reg_names debug_reg_names
|
1992-10-14 04:23:52 +00:00
|
|
|
#else
|
2000-05-27 20:24:57 -07:00
|
|
|
const char * reg_names[] = REGISTER_NAMES;
|
1992-10-14 04:23:52 +00:00
|
|
|
#endif
|
|
|
|
|
1991-12-24 04:31:09 +00:00
|
|
|
static FILE *outfile;
|
|
|
|
|
1998-11-27 10:09:17 +00:00
|
|
|
static const char xspaces[] = " ";
|
1991-12-24 04:31:09 +00:00
|
|
|
|
|
|
|
static int sawclose = 0;
|
|
|
|
|
1997-08-02 17:29:08 -04:00
|
|
|
static int indent;
|
|
|
|
|
2000-01-17 16:01:04 +00:00
|
|
|
static void print_rtx PARAMS ((rtx));
|
1998-12-05 16:23:52 -07:00
|
|
|
|
2000-09-13 21:34:05 +02:00
|
|
|
/* String printed at beginning of each RTL when it is dumped.
|
|
|
|
This string is set to ASM_COMMENT_START when the RTL is dumped in
|
|
|
|
the assembly output file. */
|
2000-10-16 16:24:54 +00:00
|
|
|
const char *print_rtx_head = "";
|
2000-09-13 21:34:05 +02:00
|
|
|
|
1998-10-06 09:03:38 +00:00
|
|
|
/* Nonzero means suppress output of instruction numbers and line number
|
|
|
|
notes in debugging dumps.
|
|
|
|
This must be defined here so that programs like gencodes can be linked. */
|
1998-06-29 15:40:49 -06:00
|
|
|
int flag_dump_unnumbered = 0;
|
1998-10-06 09:03:38 +00:00
|
|
|
|
2001-01-05 23:30:02 +00:00
|
|
|
/* Nonzero means use simplified format without flags, modes, etc. */
|
|
|
|
int flag_simple = 0;
|
|
|
|
|
1998-11-23 16:41:12 +00:00
|
|
|
/* Nonzero if we are dumping graphical description. */
|
|
|
|
int dump_for_graph;
|
|
|
|
|
2000-09-11 21:03:26 +00:00
|
|
|
/* Nonzero to dump all call_placeholder alternatives. */
|
|
|
|
static int debug_call_placeholder_verbose;
|
|
|
|
|
1991-12-24 04:31:09 +00:00
|
|
|
/* Print IN_RTX onto OUTFILE. This is the recursive part of printing. */
|
|
|
|
|
|
|
|
static void
|
|
|
|
print_rtx (in_rtx)
|
|
|
|
register rtx in_rtx;
|
|
|
|
{
|
1998-11-23 16:41:12 +00:00
|
|
|
register int i = 0;
|
|
|
|
register int j;
|
rtl.h (rtx_format): Constify a char*.
* rtl.h (rtx_format): Constify a char*.
* rtl.c (rtx_format): Likewise.
(copy_rtx, copy_most_rtx, read_rtx): Likewise.
(init_rtl): Use accessor macro, not `rtx_format'.
* alias.c (rtx_equal_for_memref_p, find_symbolic_term): Constify a
char*.
* caller-save.c (mark_referenced_regs): Likewise.
* combine.c (subst, make_compound_operation, known_cond,
gen_rtx_combine, update_table_tick, get_last_value_validate,
use_crosses_set_p, mark_used_regs_combine, move_deaths): Likewise.
* cse.c (rtx_cost, mention_regs, canon_hash, exp_equiv_p,
refers_to_p, canon_reg, fold_rtx, cse_process_notes,
count_reg_usage): Likewise.
* emit-rtl.c (gen_rtx, copy_rtx_if_shared, reset_used_flags):
Likewise.
* final.c (leaf_renumber_regs_insn): Likewise.
* flow.c (mark_used_regs, find_use_as_address, dump_flow_info,
dump_edge_info, count_reg_references): Likewise.
* function.c (fixup_var_refs_1, walk_fixup_memory_subreg,
fixup_stack_1, purge_addressof_1, instantiate_virtual_regs_1):
Likewise.
* gcse.c (oprs_unchanged_p, hash_expr_1, expr_equiv_p,
oprs_not_set_p, expr_killed_p, compute_transp, find_used_regs,
add_label_notes): Likewise.
* genattrtab.c (attr_rtx, attr_copy_rtx, encode_units_mask,
clear_struct_flag, count_sub_rtxs, count_alternatives,
compares_alternatives_p, contained_in_p, walk_attr_value,
write_expr_attr_cache): Likewise.
* genconfig.c (walk_insn_part): Likewise.
* genemit.c (max_operand_1, gen_exp): Likewise.
* genextract.c (walk_rtx): Likewise.
* genflags.c (num_operands): Likewise.
* genoutput.c (scan_operands): Likewise.
* genpeep.c (match_rtx): Likewise.
* genrecog.c (add_to_sequence): Likewise.
* haifa-sched.c (may_trap_exp, sched_analyze_2, attach_deaths):
Likewise.
* integrate.c (save_constants, copy_for_inline,
copy_rtx_and_substitute, subst_constants, restore_constants):
Likewise.
* jump.c (mark_jump_label, invert_exp, redirect_exp,
rtx_renumbered_equal_p, rtx_equal_for_thread_p): Likewise.
* local-alloc.c (contains_replace_regs, memref_referenced_p):
Likewise.
* loop.c (record_excess_regs, rtx_equal_for_loop_p,
add_label_notes, replace_call_address, count_nonfixed_reads,
invariant_p, find_single_use_in_loop, find_mem_givs,
find_life_end, maybe_eliminate_biv_1, update_reg_last_use):
Likewise.
* print-rtl.c (reg_names, print_rtx): Likewise.
* recog.c (validate_replace_rtx_1, find_single_use_1): Likewise.
* reg-stack.c (stack_regs_mentioned_p, record_label_references,
record_reg_life_pat, swap_rtx_condition, goto_block_pat,
print_blocks): Likewise.
* regclass.c (fix_register, record_address_regs,
reg_scan_mark_refs): Likewise.
* regmove.c (stable_but_for_p): Likewise.
* reload.c (loc_mentioned_in_p, operands_match_p,
find_reloads_toplevsubst_reg_equivs, find_reloads_address_1,
copy_replacements, refers_to_regno_for_reload_p,
refers_to_mem_for_reload_p, find_inc_amount, regno_clobbered_p,
reload_when_needed_name, reg_class_names, debug_reload_to_stream):
Likewise.
* reload1.c (eliminate_regs, scan_paradoxical_subregs,
delete_address_reloads_1, count_occurrences,
reload_cse_mem_conflict_p, reload_combine_note_use,
add_auto_inc_notes): Likewise.
* resource.c (mark_referenced_resources, mark_set_resources):
Likewise.
* rtlanal.c (rtx_unstable_p, rtx_varies_p, rtx_addr_varies_p,
reg_mentioned_p, regs_set_between_p, modified_between_p,
modified_in_p, refers_to_regno_p, reg_overlap_mentioned_p,
rtx_equal_p, volatile_insn_p, volatile_refs_p, side_effects_p,
may_trap_p, inequality_comparisons_p, replace_rtx, replace_regs,
jmp_uses_reg_or_mem, for_each_rtx, regno_use_in): Likewise.
* sched.c (sched_analyze_2, attach_deaths): Likewise.
* stupid.c (stupid_mark_refs): Likewise.
* unroll.c (remap_split_bivs): Likewise.
* varasm.c (mark_constants): Likewise.
* a29k/a29k.c (uses_local_reg_p): Likewise.
* alpha/alpha.c (summarize_insn): Likewise.
* arm/arm.c (symbol_mentioned_p, label_mentioned_p,
eliminate_lr2ip): Likewise.
* arm/thumb.c (symbol_mentioned_p, label_mentioned_p): Likewise.
* i386/i386.c (symbolic_reference_mentioned_p, copy_all_rtx,
reg_mentioned_in_mem): Likewise.
* ns32k/ns32k.c (global_symbolic_reference_mentioned_p,
symbolic_reference_mentioned_p): Likewise.
* romp/romp.c (unsigned_comparisons_p, hash_rtx): Likewise.
* sh/sh.c (regs_used, mark_use): Likewise.
* vax/vax.c (vax_rtx_cost): Likewise.
From-SVN: r28784
1999-08-20 23:05:25 +00:00
|
|
|
register const char *format_ptr;
|
1991-12-24 04:31:09 +00:00
|
|
|
register int is_insn;
|
2000-04-12 12:59:56 +00:00
|
|
|
rtx tem;
|
1991-12-24 04:31:09 +00:00
|
|
|
|
|
|
|
if (sawclose)
|
|
|
|
{
|
2001-01-05 23:30:02 +00:00
|
|
|
if (flag_simple)
|
|
|
|
fputc (' ', outfile);
|
|
|
|
else
|
|
|
|
fprintf (outfile, "\n%s%s",
|
|
|
|
print_rtx_head,
|
|
|
|
(xspaces + (sizeof xspaces - 1 - indent * 2)));
|
1991-12-24 04:31:09 +00:00
|
|
|
sawclose = 0;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (in_rtx == 0)
|
|
|
|
{
|
1998-11-23 16:41:12 +00:00
|
|
|
fputs ("(nil)", outfile);
|
1991-12-24 04:31:09 +00:00
|
|
|
sawclose = 1;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
2000-08-04 20:28:08 +00:00
|
|
|
is_insn = (INSN_P (in_rtx));
|
1998-11-23 16:41:12 +00:00
|
|
|
|
|
|
|
/* When printing in VCG format we write INSNs, NOTE, LABEL, and BARRIER
|
|
|
|
in separate nodes and therefore have to handle them special here. */
|
|
|
|
if (dump_for_graph &&
|
|
|
|
(is_insn || GET_CODE (in_rtx) == NOTE || GET_CODE (in_rtx) == CODE_LABEL
|
|
|
|
|| GET_CODE (in_rtx) == BARRIER))
|
|
|
|
{
|
|
|
|
i = 3;
|
|
|
|
indent = 0;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
/* print name of expression code */
|
2001-01-05 23:30:02 +00:00
|
|
|
if (flag_simple && GET_CODE (in_rtx) == CONST_INT)
|
|
|
|
fputc ('(', outfile);
|
|
|
|
else
|
|
|
|
fprintf (outfile, "(%s", GET_RTX_NAME (GET_CODE (in_rtx)));
|
|
|
|
|
|
|
|
if (! flag_simple)
|
1998-11-23 16:41:12 +00:00
|
|
|
{
|
2001-01-05 23:30:02 +00:00
|
|
|
if (in_rtx->in_struct)
|
|
|
|
fputs ("/s", outfile);
|
|
|
|
|
|
|
|
if (in_rtx->volatil)
|
|
|
|
fputs ("/v", outfile);
|
|
|
|
|
|
|
|
if (in_rtx->unchanging)
|
|
|
|
fputs ("/u", outfile);
|
|
|
|
|
|
|
|
if (in_rtx->integrated)
|
|
|
|
fputs ("/i", outfile);
|
|
|
|
|
|
|
|
if (in_rtx->frame_related)
|
|
|
|
fputs ("/f", outfile);
|
|
|
|
|
|
|
|
if (in_rtx->jump)
|
|
|
|
fputs ("/j", outfile);
|
|
|
|
|
|
|
|
if (in_rtx->call)
|
|
|
|
fputs ("/c", outfile);
|
|
|
|
|
|
|
|
if (GET_MODE (in_rtx) != VOIDmode)
|
|
|
|
{
|
|
|
|
/* Print REG_NOTE names for EXPR_LIST and INSN_LIST. */
|
|
|
|
if (GET_CODE (in_rtx) == EXPR_LIST
|
|
|
|
|| GET_CODE (in_rtx) == INSN_LIST)
|
|
|
|
fprintf (outfile, ":%s",
|
|
|
|
GET_REG_NOTE_NAME (GET_MODE (in_rtx)));
|
|
|
|
else
|
|
|
|
fprintf (outfile, ":%s", GET_MODE_NAME (GET_MODE (in_rtx)));
|
|
|
|
}
|
1998-11-23 16:41:12 +00:00
|
|
|
}
|
1991-12-24 04:31:09 +00:00
|
|
|
}
|
|
|
|
|
1998-11-23 16:41:12 +00:00
|
|
|
/* Get the format string and skip the first elements if we have handled
|
|
|
|
them already. */
|
|
|
|
format_ptr = GET_RTX_FORMAT (GET_CODE (in_rtx)) + i;
|
1991-12-24 04:31:09 +00:00
|
|
|
|
1998-11-23 16:41:12 +00:00
|
|
|
for (; i < GET_RTX_LENGTH (GET_CODE (in_rtx)); i++)
|
1991-12-24 04:31:09 +00:00
|
|
|
switch (*format_ptr++)
|
|
|
|
{
|
|
|
|
case 'S':
|
|
|
|
case 's':
|
|
|
|
if (XSTR (in_rtx, i) == 0)
|
1998-11-23 16:41:12 +00:00
|
|
|
fputs (dump_for_graph ? " \\\"\\\"" : " \"\"", outfile);
|
1991-12-24 04:31:09 +00:00
|
|
|
else
|
c-common.c (check_format_info): Don't call a variadic function with a non-literal format string.
* c-common.c (check_format_info): Don't call a variadic function
with a non-literal format string.
* c-decl.c (grokdeclarator, start_struct, finish_struct): Likewise.
* c-typeck.c (build_component_ref, build_unary_op, lvalue_or_else,
pedantic_lvalue_warning, error_init, pedwarn_init, warning_init):
Likewise.
* cccp.c (check_macro_name, do_xifdef, vwarning_with_line):
Likewise.
* collect2.c (collect_wait): Likewise.
* dbxout.c (dbxout_type): Likewise.
* gcc.c (do_spec_1): Likewise.
* genemit.c (gen_insn, gen_expand): Likewise.
* genrecog.c (write_switch, write_subroutine): Likewise.
* mips-tfile.c (catch_signal, botch): Likewise.
* print-rtl.c (print_rtx): Likewise.
* toplev.c (default_print_error_function, report_error_function,
_fatal_insn): Likewise.
From-SVN: r30666
1999-11-25 16:58:32 +00:00
|
|
|
{
|
|
|
|
if (dump_for_graph)
|
|
|
|
fprintf (outfile, " (\\\"%s\\\")", XSTR (in_rtx, i));
|
|
|
|
else
|
|
|
|
fprintf (outfile, " (\"%s\")", XSTR (in_rtx, i));
|
|
|
|
}
|
1991-12-24 04:31:09 +00:00
|
|
|
sawclose = 1;
|
|
|
|
break;
|
|
|
|
|
rtl.def (NOTE): Change format to "iuu0n".
1999-08-19 14:44 -0700 Zack Weinberg <zack@bitmover.com>
* rtl.def (NOTE): Change format to "iuu0n".
(ADDR_DIFF_VEC): Change format to "eEee0".
(ADDRESSOF): Change format to "eit".
* rtl.h (rtvec): Make "elem" an array of rtx, not rtunion.
(RTVEC_ELT): Change to match.
(XVECEXP): Use XVEC and RTVEC_ELT.
(INSN_UID, INSN_CODE, CODE_LABEL_NUMBER, NOTE_LINE_NUMBER,
ADDRESSOF_REGNO, REGNO, SUBREG_WORD): Use XINT.
(PREV_INSN, NEXT_INSN, PATTERN, REG_NOTES,
CALL_INSN_FUNCTION_USAGE, SUBREG_REG, SET_SRC, SET_DEST,
TRAP_CONDITION, TRAP_CODE): Use XEXP.
(INTVAL): Use XWINT.
(ADDRESSOF_DECL): Use XTREE.
(SET_ADDRESSOF_DECL): Delete.
(NOTE_DECL_NAME, NOTE_DECL_CODE, NOTE_DECL_RTL,
NOTE_DECL_IDENTIFIER, NOTE_DECL_TYPE): Kill. These have been
ifdefed out since 2.6 at least.
(gen_rtvec_vv): Delete prototype.
* rtl.h (rtvec_alloc): rt->elem is now an array of rtx,
not rtunion.
(copy_most_rtx): Handle 't' format letter.
* emit-rtl.c (gen_rtvec_v): rt_val->elem is an array of rtx.
(gen_rtvec_vv): Delete function. All callers changed to use
gen_rtvec_v instead.
* print-rtl.c (print_rtx): Move special casing of NOTEs to
the '0' format letter.
* function.c (gen_mem_addressof): Don't use
SET_ADDRESSOF_DECL; provide `decl' to gen_rtx_ADDRESSOF
instead.
* integrate.c (copy_rtx_and_substitute): Likewise.
Copy 't' slots with XTREE.
(subst_constants): Treat 't' slots like '[swi]' slots.
* cse.c (canon_hash, exp_equiv_p): Treat 't' slots like '0' slots.
* jump.c (rtx_equal_for_thread_p): Likewise.
* rtlanal.c (rtx_equal_p): Likewise.
* stmt.c (expand_end_case): gen_rtx_ADDR_DIFF_VEC now takes
only four arguments.
* gengenrtl.c (type_from_format): Provide correct types for
'b' and 't' slots.
* tree.h [ENABLE_CHECKING] (TREE_CHECK, TREE_CLASS_CHECK):
If a recent gcc is in use (always in stage2 and beyond), use
statement expressions, so we don't make a function call unless
the check fails. Evaluate arguments exactly once.
(CHAIN_CHECK, DO_CHECK, DO_CHECK1, TREE_CHECK1,
TREE_CLASS_CHECK1, TYPE_CHECK1, DECL_CHECK1, CST_CHECK1):
Delete.
(CST_OR_CONSTRUCTOR_CHECK, EXPR_CHECK): Redefine such that
they evaluate their arguments exactly once, irrespective of
the compiler in use.
* tree.c [ENABLE_CHECKING]: Define whichever set of functions
is used by the currently-enabled check macros. This is:
(tree_check_failed, tree_class_check_failed): For gcc.
(tree_check, tree_class_check, cst_or_constructor_check,
expr_check): For other compilers.
* gencheck.c: Do not define any *_CHECK1 macros.
From-SVN: r28769
1999-08-19 22:33:38 +00:00
|
|
|
/* 0 indicates a field for internal use that should not be printed.
|
|
|
|
An exception is the third field of a NOTE, where it indicates
|
|
|
|
that the field has several different valid contents. */
|
1991-12-24 04:31:09 +00:00
|
|
|
case '0':
|
2000-12-29 17:35:57 +00:00
|
|
|
if (i == 1 && GET_CODE (in_rtx) == REG)
|
|
|
|
{
|
|
|
|
if (REGNO (in_rtx) != ORIGINAL_REGNO (in_rtx))
|
|
|
|
fprintf (outfile, " [%d]", ORIGINAL_REGNO (in_rtx));
|
|
|
|
break;
|
|
|
|
}
|
rtl.def (NOTE): Change format to "iuu0n".
1999-08-19 14:44 -0700 Zack Weinberg <zack@bitmover.com>
* rtl.def (NOTE): Change format to "iuu0n".
(ADDR_DIFF_VEC): Change format to "eEee0".
(ADDRESSOF): Change format to "eit".
* rtl.h (rtvec): Make "elem" an array of rtx, not rtunion.
(RTVEC_ELT): Change to match.
(XVECEXP): Use XVEC and RTVEC_ELT.
(INSN_UID, INSN_CODE, CODE_LABEL_NUMBER, NOTE_LINE_NUMBER,
ADDRESSOF_REGNO, REGNO, SUBREG_WORD): Use XINT.
(PREV_INSN, NEXT_INSN, PATTERN, REG_NOTES,
CALL_INSN_FUNCTION_USAGE, SUBREG_REG, SET_SRC, SET_DEST,
TRAP_CONDITION, TRAP_CODE): Use XEXP.
(INTVAL): Use XWINT.
(ADDRESSOF_DECL): Use XTREE.
(SET_ADDRESSOF_DECL): Delete.
(NOTE_DECL_NAME, NOTE_DECL_CODE, NOTE_DECL_RTL,
NOTE_DECL_IDENTIFIER, NOTE_DECL_TYPE): Kill. These have been
ifdefed out since 2.6 at least.
(gen_rtvec_vv): Delete prototype.
* rtl.h (rtvec_alloc): rt->elem is now an array of rtx,
not rtunion.
(copy_most_rtx): Handle 't' format letter.
* emit-rtl.c (gen_rtvec_v): rt_val->elem is an array of rtx.
(gen_rtvec_vv): Delete function. All callers changed to use
gen_rtvec_v instead.
* print-rtl.c (print_rtx): Move special casing of NOTEs to
the '0' format letter.
* function.c (gen_mem_addressof): Don't use
SET_ADDRESSOF_DECL; provide `decl' to gen_rtx_ADDRESSOF
instead.
* integrate.c (copy_rtx_and_substitute): Likewise.
Copy 't' slots with XTREE.
(subst_constants): Treat 't' slots like '[swi]' slots.
* cse.c (canon_hash, exp_equiv_p): Treat 't' slots like '0' slots.
* jump.c (rtx_equal_for_thread_p): Likewise.
* rtlanal.c (rtx_equal_p): Likewise.
* stmt.c (expand_end_case): gen_rtx_ADDR_DIFF_VEC now takes
only four arguments.
* gengenrtl.c (type_from_format): Provide correct types for
'b' and 't' slots.
* tree.h [ENABLE_CHECKING] (TREE_CHECK, TREE_CLASS_CHECK):
If a recent gcc is in use (always in stage2 and beyond), use
statement expressions, so we don't make a function call unless
the check fails. Evaluate arguments exactly once.
(CHAIN_CHECK, DO_CHECK, DO_CHECK1, TREE_CHECK1,
TREE_CLASS_CHECK1, TYPE_CHECK1, DECL_CHECK1, CST_CHECK1):
Delete.
(CST_OR_CONSTRUCTOR_CHECK, EXPR_CHECK): Redefine such that
they evaluate their arguments exactly once, irrespective of
the compiler in use.
* tree.c [ENABLE_CHECKING]: Define whichever set of functions
is used by the currently-enabled check macros. This is:
(tree_check_failed, tree_class_check_failed): For gcc.
(tree_check, tree_class_check, cst_or_constructor_check,
expr_check): For other compilers.
* gencheck.c: Do not define any *_CHECK1 macros.
From-SVN: r28769
1999-08-19 22:33:38 +00:00
|
|
|
if (i == 3 && GET_CODE (in_rtx) == NOTE)
|
|
|
|
{
|
2000-04-17 09:49:00 -07:00
|
|
|
switch (NOTE_LINE_NUMBER (in_rtx))
|
1999-09-14 23:51:34 +00:00
|
|
|
{
|
2000-04-17 09:49:00 -07:00
|
|
|
case NOTE_INSN_EH_REGION_BEG:
|
|
|
|
case NOTE_INSN_EH_REGION_END:
|
2000-02-20 21:26:53 +00:00
|
|
|
if (flag_dump_unnumbered)
|
|
|
|
fprintf (outfile, " #");
|
|
|
|
else
|
|
|
|
fprintf (outfile, " %d", NOTE_EH_HANDLER (in_rtx));
|
1999-09-14 23:51:34 +00:00
|
|
|
sawclose = 1;
|
2000-04-17 09:49:00 -07:00
|
|
|
break;
|
|
|
|
|
|
|
|
case NOTE_INSN_BLOCK_BEG:
|
|
|
|
case NOTE_INSN_BLOCK_END:
|
1999-09-15 23:05:05 +00:00
|
|
|
fprintf (outfile, " ");
|
2000-02-20 21:26:53 +00:00
|
|
|
if (flag_dump_unnumbered)
|
|
|
|
fprintf (outfile, "#");
|
|
|
|
else
|
|
|
|
fprintf (outfile, HOST_PTR_PRINTF,
|
|
|
|
(char *) NOTE_BLOCK (in_rtx));
|
rtl.def (NOTE): Change format to "iuu0n".
1999-08-19 14:44 -0700 Zack Weinberg <zack@bitmover.com>
* rtl.def (NOTE): Change format to "iuu0n".
(ADDR_DIFF_VEC): Change format to "eEee0".
(ADDRESSOF): Change format to "eit".
* rtl.h (rtvec): Make "elem" an array of rtx, not rtunion.
(RTVEC_ELT): Change to match.
(XVECEXP): Use XVEC and RTVEC_ELT.
(INSN_UID, INSN_CODE, CODE_LABEL_NUMBER, NOTE_LINE_NUMBER,
ADDRESSOF_REGNO, REGNO, SUBREG_WORD): Use XINT.
(PREV_INSN, NEXT_INSN, PATTERN, REG_NOTES,
CALL_INSN_FUNCTION_USAGE, SUBREG_REG, SET_SRC, SET_DEST,
TRAP_CONDITION, TRAP_CODE): Use XEXP.
(INTVAL): Use XWINT.
(ADDRESSOF_DECL): Use XTREE.
(SET_ADDRESSOF_DECL): Delete.
(NOTE_DECL_NAME, NOTE_DECL_CODE, NOTE_DECL_RTL,
NOTE_DECL_IDENTIFIER, NOTE_DECL_TYPE): Kill. These have been
ifdefed out since 2.6 at least.
(gen_rtvec_vv): Delete prototype.
* rtl.h (rtvec_alloc): rt->elem is now an array of rtx,
not rtunion.
(copy_most_rtx): Handle 't' format letter.
* emit-rtl.c (gen_rtvec_v): rt_val->elem is an array of rtx.
(gen_rtvec_vv): Delete function. All callers changed to use
gen_rtvec_v instead.
* print-rtl.c (print_rtx): Move special casing of NOTEs to
the '0' format letter.
* function.c (gen_mem_addressof): Don't use
SET_ADDRESSOF_DECL; provide `decl' to gen_rtx_ADDRESSOF
instead.
* integrate.c (copy_rtx_and_substitute): Likewise.
Copy 't' slots with XTREE.
(subst_constants): Treat 't' slots like '[swi]' slots.
* cse.c (canon_hash, exp_equiv_p): Treat 't' slots like '0' slots.
* jump.c (rtx_equal_for_thread_p): Likewise.
* rtlanal.c (rtx_equal_p): Likewise.
* stmt.c (expand_end_case): gen_rtx_ADDR_DIFF_VEC now takes
only four arguments.
* gengenrtl.c (type_from_format): Provide correct types for
'b' and 't' slots.
* tree.h [ENABLE_CHECKING] (TREE_CHECK, TREE_CLASS_CHECK):
If a recent gcc is in use (always in stage2 and beyond), use
statement expressions, so we don't make a function call unless
the check fails. Evaluate arguments exactly once.
(CHAIN_CHECK, DO_CHECK, DO_CHECK1, TREE_CHECK1,
TREE_CLASS_CHECK1, TYPE_CHECK1, DECL_CHECK1, CST_CHECK1):
Delete.
(CST_OR_CONSTRUCTOR_CHECK, EXPR_CHECK): Redefine such that
they evaluate their arguments exactly once, irrespective of
the compiler in use.
* tree.c [ENABLE_CHECKING]: Define whichever set of functions
is used by the currently-enabled check macros. This is:
(tree_check_failed, tree_class_check_failed): For gcc.
(tree_check, tree_class_check, cst_or_constructor_check,
expr_check): For other compilers.
* gencheck.c: Do not define any *_CHECK1 macros.
From-SVN: r28769
1999-08-19 22:33:38 +00:00
|
|
|
sawclose = 1;
|
2000-04-17 09:49:00 -07:00
|
|
|
break;
|
|
|
|
|
2000-04-21 19:32:10 +00:00
|
|
|
case NOTE_INSN_RANGE_BEG:
|
2000-04-17 09:49:00 -07:00
|
|
|
case NOTE_INSN_RANGE_END:
|
|
|
|
case NOTE_INSN_LIVE:
|
rtl.def (NOTE): Change format to "iuu0n".
1999-08-19 14:44 -0700 Zack Weinberg <zack@bitmover.com>
* rtl.def (NOTE): Change format to "iuu0n".
(ADDR_DIFF_VEC): Change format to "eEee0".
(ADDRESSOF): Change format to "eit".
* rtl.h (rtvec): Make "elem" an array of rtx, not rtunion.
(RTVEC_ELT): Change to match.
(XVECEXP): Use XVEC and RTVEC_ELT.
(INSN_UID, INSN_CODE, CODE_LABEL_NUMBER, NOTE_LINE_NUMBER,
ADDRESSOF_REGNO, REGNO, SUBREG_WORD): Use XINT.
(PREV_INSN, NEXT_INSN, PATTERN, REG_NOTES,
CALL_INSN_FUNCTION_USAGE, SUBREG_REG, SET_SRC, SET_DEST,
TRAP_CONDITION, TRAP_CODE): Use XEXP.
(INTVAL): Use XWINT.
(ADDRESSOF_DECL): Use XTREE.
(SET_ADDRESSOF_DECL): Delete.
(NOTE_DECL_NAME, NOTE_DECL_CODE, NOTE_DECL_RTL,
NOTE_DECL_IDENTIFIER, NOTE_DECL_TYPE): Kill. These have been
ifdefed out since 2.6 at least.
(gen_rtvec_vv): Delete prototype.
* rtl.h (rtvec_alloc): rt->elem is now an array of rtx,
not rtunion.
(copy_most_rtx): Handle 't' format letter.
* emit-rtl.c (gen_rtvec_v): rt_val->elem is an array of rtx.
(gen_rtvec_vv): Delete function. All callers changed to use
gen_rtvec_v instead.
* print-rtl.c (print_rtx): Move special casing of NOTEs to
the '0' format letter.
* function.c (gen_mem_addressof): Don't use
SET_ADDRESSOF_DECL; provide `decl' to gen_rtx_ADDRESSOF
instead.
* integrate.c (copy_rtx_and_substitute): Likewise.
Copy 't' slots with XTREE.
(subst_constants): Treat 't' slots like '[swi]' slots.
* cse.c (canon_hash, exp_equiv_p): Treat 't' slots like '0' slots.
* jump.c (rtx_equal_for_thread_p): Likewise.
* rtlanal.c (rtx_equal_p): Likewise.
* stmt.c (expand_end_case): gen_rtx_ADDR_DIFF_VEC now takes
only four arguments.
* gengenrtl.c (type_from_format): Provide correct types for
'b' and 't' slots.
* tree.h [ENABLE_CHECKING] (TREE_CHECK, TREE_CLASS_CHECK):
If a recent gcc is in use (always in stage2 and beyond), use
statement expressions, so we don't make a function call unless
the check fails. Evaluate arguments exactly once.
(CHAIN_CHECK, DO_CHECK, DO_CHECK1, TREE_CHECK1,
TREE_CLASS_CHECK1, TYPE_CHECK1, DECL_CHECK1, CST_CHECK1):
Delete.
(CST_OR_CONSTRUCTOR_CHECK, EXPR_CHECK): Redefine such that
they evaluate their arguments exactly once, irrespective of
the compiler in use.
* tree.c [ENABLE_CHECKING]: Define whichever set of functions
is used by the currently-enabled check macros. This is:
(tree_check_failed, tree_class_check_failed): For gcc.
(tree_check, tree_class_check, cst_or_constructor_check,
expr_check): For other compilers.
* gencheck.c: Do not define any *_CHECK1 macros.
From-SVN: r28769
1999-08-19 22:33:38 +00:00
|
|
|
indent += 2;
|
|
|
|
if (!sawclose)
|
|
|
|
fprintf (outfile, " ");
|
|
|
|
print_rtx (NOTE_RANGE_INFO (in_rtx));
|
|
|
|
indent -= 2;
|
2000-04-17 09:49:00 -07:00
|
|
|
break;
|
2000-04-14 22:20:38 +00:00
|
|
|
|
2000-04-17 09:49:00 -07:00
|
|
|
case NOTE_INSN_BASIC_BLOCK:
|
|
|
|
{
|
|
|
|
basic_block bb = NOTE_BASIC_BLOCK (in_rtx);
|
|
|
|
if (bb != 0)
|
|
|
|
fprintf (outfile, " [bb %d]", bb->index);
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
case NOTE_INSN_EXPECTED_VALUE:
|
|
|
|
indent += 2;
|
|
|
|
if (!sawclose)
|
|
|
|
fprintf (outfile, " ");
|
|
|
|
print_rtx (NOTE_EXPECTED_VALUE (in_rtx));
|
|
|
|
indent -= 2;
|
|
|
|
break;
|
|
|
|
|
2000-05-12 09:26:15 -07:00
|
|
|
case NOTE_INSN_DELETED_LABEL:
|
|
|
|
if (NOTE_SOURCE_FILE (in_rtx))
|
|
|
|
fprintf (outfile, " (\"%s\")", NOTE_SOURCE_FILE (in_rtx));
|
|
|
|
else
|
|
|
|
fprintf (outfile, " \"\"");
|
|
|
|
break;
|
|
|
|
|
2000-04-17 09:49:00 -07:00
|
|
|
default:
|
|
|
|
{
|
|
|
|
const char * const str = X0STR (in_rtx, i);
|
|
|
|
|
|
|
|
if (NOTE_LINE_NUMBER (in_rtx) < 0)
|
|
|
|
;
|
|
|
|
else if (str == 0)
|
|
|
|
fputs (dump_for_graph ? " \\\"\\\"" : " \"\"", outfile);
|
|
|
|
else
|
|
|
|
{
|
|
|
|
if (dump_for_graph)
|
|
|
|
fprintf (outfile, " (\\\"%s\\\")", str);
|
|
|
|
else
|
|
|
|
fprintf (outfile, " (\"%s\")", str);
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
}
|
rtl.def (NOTE): Change format to "iuu0n".
1999-08-19 14:44 -0700 Zack Weinberg <zack@bitmover.com>
* rtl.def (NOTE): Change format to "iuu0n".
(ADDR_DIFF_VEC): Change format to "eEee0".
(ADDRESSOF): Change format to "eit".
* rtl.h (rtvec): Make "elem" an array of rtx, not rtunion.
(RTVEC_ELT): Change to match.
(XVECEXP): Use XVEC and RTVEC_ELT.
(INSN_UID, INSN_CODE, CODE_LABEL_NUMBER, NOTE_LINE_NUMBER,
ADDRESSOF_REGNO, REGNO, SUBREG_WORD): Use XINT.
(PREV_INSN, NEXT_INSN, PATTERN, REG_NOTES,
CALL_INSN_FUNCTION_USAGE, SUBREG_REG, SET_SRC, SET_DEST,
TRAP_CONDITION, TRAP_CODE): Use XEXP.
(INTVAL): Use XWINT.
(ADDRESSOF_DECL): Use XTREE.
(SET_ADDRESSOF_DECL): Delete.
(NOTE_DECL_NAME, NOTE_DECL_CODE, NOTE_DECL_RTL,
NOTE_DECL_IDENTIFIER, NOTE_DECL_TYPE): Kill. These have been
ifdefed out since 2.6 at least.
(gen_rtvec_vv): Delete prototype.
* rtl.h (rtvec_alloc): rt->elem is now an array of rtx,
not rtunion.
(copy_most_rtx): Handle 't' format letter.
* emit-rtl.c (gen_rtvec_v): rt_val->elem is an array of rtx.
(gen_rtvec_vv): Delete function. All callers changed to use
gen_rtvec_v instead.
* print-rtl.c (print_rtx): Move special casing of NOTEs to
the '0' format letter.
* function.c (gen_mem_addressof): Don't use
SET_ADDRESSOF_DECL; provide `decl' to gen_rtx_ADDRESSOF
instead.
* integrate.c (copy_rtx_and_substitute): Likewise.
Copy 't' slots with XTREE.
(subst_constants): Treat 't' slots like '[swi]' slots.
* cse.c (canon_hash, exp_equiv_p): Treat 't' slots like '0' slots.
* jump.c (rtx_equal_for_thread_p): Likewise.
* rtlanal.c (rtx_equal_p): Likewise.
* stmt.c (expand_end_case): gen_rtx_ADDR_DIFF_VEC now takes
only four arguments.
* gengenrtl.c (type_from_format): Provide correct types for
'b' and 't' slots.
* tree.h [ENABLE_CHECKING] (TREE_CHECK, TREE_CLASS_CHECK):
If a recent gcc is in use (always in stage2 and beyond), use
statement expressions, so we don't make a function call unless
the check fails. Evaluate arguments exactly once.
(CHAIN_CHECK, DO_CHECK, DO_CHECK1, TREE_CHECK1,
TREE_CLASS_CHECK1, TYPE_CHECK1, DECL_CHECK1, CST_CHECK1):
Delete.
(CST_OR_CONSTRUCTOR_CHECK, EXPR_CHECK): Redefine such that
they evaluate their arguments exactly once, irrespective of
the compiler in use.
* tree.c [ENABLE_CHECKING]: Define whichever set of functions
is used by the currently-enabled check macros. This is:
(tree_check_failed, tree_class_check_failed): For gcc.
(tree_check, tree_class_check, cst_or_constructor_check,
expr_check): For other compilers.
* gencheck.c: Do not define any *_CHECK1 macros.
From-SVN: r28769
1999-08-19 22:33:38 +00:00
|
|
|
}
|
|
|
|
}
|
1991-12-24 04:31:09 +00:00
|
|
|
break;
|
|
|
|
|
|
|
|
case 'e':
|
1999-10-13 20:43:49 -07:00
|
|
|
do_e:
|
1991-12-24 04:31:09 +00:00
|
|
|
indent += 2;
|
|
|
|
if (!sawclose)
|
|
|
|
fprintf (outfile, " ");
|
|
|
|
print_rtx (XEXP (in_rtx, i));
|
|
|
|
indent -= 2;
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 'E':
|
|
|
|
case 'V':
|
|
|
|
indent += 2;
|
|
|
|
if (sawclose)
|
|
|
|
{
|
2000-09-13 21:34:05 +02:00
|
|
|
fprintf (outfile, "\n%s%s",
|
|
|
|
print_rtx_head,
|
1998-11-27 10:09:17 +00:00
|
|
|
(xspaces + (sizeof xspaces - 1 - indent * 2)));
|
1991-12-24 04:31:09 +00:00
|
|
|
sawclose = 0;
|
|
|
|
}
|
1998-11-23 16:41:12 +00:00
|
|
|
fputs ("[ ", outfile);
|
1991-12-24 04:31:09 +00:00
|
|
|
if (NULL != XVEC (in_rtx, i))
|
|
|
|
{
|
|
|
|
indent += 2;
|
|
|
|
if (XVECLEN (in_rtx, i))
|
|
|
|
sawclose = 1;
|
|
|
|
|
|
|
|
for (j = 0; j < XVECLEN (in_rtx, i); j++)
|
|
|
|
print_rtx (XVECEXP (in_rtx, i, j));
|
|
|
|
|
|
|
|
indent -= 2;
|
|
|
|
}
|
|
|
|
if (sawclose)
|
2000-09-13 21:34:05 +02:00
|
|
|
fprintf (outfile, "\n%s%s",
|
|
|
|
print_rtx_head,
|
1998-11-27 10:09:17 +00:00
|
|
|
(xspaces + (sizeof xspaces - 1 - indent * 2)));
|
1991-12-24 04:31:09 +00:00
|
|
|
|
1998-11-23 16:41:12 +00:00
|
|
|
fputs ("] ", outfile);
|
1991-12-24 04:31:09 +00:00
|
|
|
sawclose = 1;
|
|
|
|
indent -= 2;
|
|
|
|
break;
|
|
|
|
|
1992-07-09 11:28:15 -04:00
|
|
|
case 'w':
|
2001-01-05 23:30:02 +00:00
|
|
|
if (! flag_simple)
|
|
|
|
fprintf (outfile, " ");
|
1996-11-15 14:14:15 -05:00
|
|
|
fprintf (outfile, HOST_WIDE_INT_PRINT_DEC, XWINT (in_rtx, i));
|
2001-01-05 23:30:02 +00:00
|
|
|
if (! flag_simple)
|
|
|
|
{
|
|
|
|
fprintf (outfile, " [");
|
|
|
|
fprintf (outfile, HOST_WIDE_INT_PRINT_HEX, XWINT (in_rtx, i));
|
|
|
|
fprintf (outfile, "]");
|
|
|
|
}
|
1992-07-09 11:28:15 -04:00
|
|
|
break;
|
|
|
|
|
1991-12-24 04:31:09 +00:00
|
|
|
case 'i':
|
1992-10-14 04:23:52 +00:00
|
|
|
{
|
|
|
|
register int value = XINT (in_rtx, i);
|
1999-09-12 05:46:08 -07:00
|
|
|
const char *name;
|
1992-10-14 04:23:52 +00:00
|
|
|
|
|
|
|
if (GET_CODE (in_rtx) == REG && value < FIRST_PSEUDO_REGISTER)
|
|
|
|
{
|
|
|
|
fputc (' ', outfile);
|
|
|
|
DEBUG_PRINT_REG (in_rtx, 0, outfile);
|
|
|
|
}
|
1999-07-21 23:53:09 +00:00
|
|
|
else if (GET_CODE (in_rtx) == REG && value <= LAST_VIRTUAL_REGISTER)
|
|
|
|
{
|
|
|
|
if (value == VIRTUAL_INCOMING_ARGS_REGNUM)
|
|
|
|
fprintf (outfile, " %d virtual-incoming-args", value);
|
|
|
|
else if (value == VIRTUAL_STACK_VARS_REGNUM)
|
|
|
|
fprintf (outfile, " %d virtual-stack-vars", value);
|
|
|
|
else if (value == VIRTUAL_STACK_DYNAMIC_REGNUM)
|
|
|
|
fprintf (outfile, " %d virtual-stack-dynamic", value);
|
|
|
|
else if (value == VIRTUAL_OUTGOING_ARGS_REGNUM)
|
|
|
|
fprintf (outfile, " %d virtual-outgoing-args", value);
|
|
|
|
else if (value == VIRTUAL_CFA_REGNUM)
|
|
|
|
fprintf (outfile, " %d virtual-cfa", value);
|
|
|
|
else
|
|
|
|
fprintf (outfile, " %d virtual-reg-%d", value,
|
|
|
|
value-FIRST_VIRTUAL_REGISTER);
|
|
|
|
}
|
1998-06-29 15:40:49 -06:00
|
|
|
else if (flag_dump_unnumbered
|
|
|
|
&& (is_insn || GET_CODE (in_rtx) == NOTE))
|
1998-11-23 16:41:12 +00:00
|
|
|
fputc ('#', outfile);
|
1992-10-14 04:23:52 +00:00
|
|
|
else
|
|
|
|
fprintf (outfile, " %d", value);
|
1999-09-12 05:46:08 -07:00
|
|
|
|
|
|
|
if (is_insn && &INSN_CODE (in_rtx) == &XINT (in_rtx, i)
|
|
|
|
&& XINT (in_rtx, i) >= 0
|
|
|
|
&& (name = get_insn_name (XINT (in_rtx, i))) != NULL)
|
|
|
|
fprintf (outfile, " {%s}", name);
|
|
|
|
sawclose = 0;
|
1992-10-14 04:23:52 +00:00
|
|
|
}
|
1991-12-24 04:31:09 +00:00
|
|
|
break;
|
|
|
|
|
|
|
|
/* Print NOTE_INSN names rather than integer codes. */
|
|
|
|
|
|
|
|
case 'n':
|
2000-05-18 21:26:57 +02:00
|
|
|
if (XINT (in_rtx, i) >= NOTE_INSN_BIAS
|
|
|
|
&& XINT (in_rtx, i) < NOTE_INSN_MAX)
|
1991-12-24 04:31:09 +00:00
|
|
|
fprintf (outfile, " %s", GET_NOTE_INSN_NAME (XINT (in_rtx, i)));
|
|
|
|
else
|
|
|
|
fprintf (outfile, " %d", XINT (in_rtx, i));
|
|
|
|
sawclose = 0;
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 'u':
|
|
|
|
if (XEXP (in_rtx, i) != NULL)
|
1998-06-29 15:40:49 -06:00
|
|
|
{
|
1999-10-14 18:52:29 -07:00
|
|
|
rtx sub = XEXP (in_rtx, i);
|
|
|
|
enum rtx_code subc = GET_CODE (sub);
|
|
|
|
|
2000-05-12 09:26:15 -07:00
|
|
|
if (GET_CODE (in_rtx) == LABEL_REF)
|
|
|
|
{
|
|
|
|
if (subc == NOTE
|
|
|
|
&& NOTE_LINE_NUMBER (sub) == NOTE_INSN_DELETED_LABEL)
|
|
|
|
{
|
|
|
|
if (flag_dump_unnumbered)
|
|
|
|
fprintf (outfile, " [# deleted]");
|
|
|
|
else
|
|
|
|
fprintf (outfile, " [%d deleted]", INSN_UID (sub));
|
|
|
|
sawclose = 0;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (subc != CODE_LABEL)
|
|
|
|
goto do_e;
|
|
|
|
}
|
1999-10-13 20:43:49 -07:00
|
|
|
|
1998-06-29 15:40:49 -06:00
|
|
|
if (flag_dump_unnumbered)
|
2000-05-12 09:26:15 -07:00
|
|
|
fputs (" #", outfile);
|
1998-06-29 15:40:49 -06:00
|
|
|
else
|
1999-10-14 18:52:29 -07:00
|
|
|
fprintf (outfile, " %d", INSN_UID (sub));
|
1998-06-29 15:40:49 -06:00
|
|
|
}
|
1991-12-24 04:31:09 +00:00
|
|
|
else
|
1999-10-15 14:26:33 -07:00
|
|
|
fputs (" 0", outfile);
|
1992-04-02 08:44:47 +00:00
|
|
|
sawclose = 0;
|
|
|
|
break;
|
|
|
|
|
Makefile.in (HOST_RTL): Add $(HOST_PREFIX)bitmap.o.
* Makefile.in (HOST_RTL): Add $(HOST_PREFIX)bitmap.o.
(rtl.o, emit-rtl.o): Add dependency on bitmap.h.
($(HOST_PREFIX_1)rtl.o): Likewise.
($(HOST_PREFIX_1)bitmap.o): New host object.
* emit-rtl.c (toplevel): Include bitmap.h.
(gen_rtx): Handle 't' and 'b' nodes.
* print-rtl.c (print_rtx): Handle printing NOTE_INSN_LIVE notes.
Print block number for block begin/end notes. Print 't' type
nodes as a pointer. Know that the 3rd argument of live range
start/stop notes is really a range_info rtx. If type is 'b', print
out argument as a bitmap.
* rtl.c: Include bitmap.c.
(copy_rtx): Copy tree nodes as is. Copy bitmaps if type is 'b'.
(note_insn_name): Add NOTE_INSN_RANGE_{START,END}, NOTE_INSN_LIVE.
* rtl.def (RANGE_LIVE): New node to hold live information while we
recalculate the basic blocks.
(RANGE_REG, RANGE_INFO): New rtl types for live range splitting.
(RANGE_VAR): New node, to hold information saved in symbol node for New
communicating live range information to the debug output functions.
* rtl.h (rtunion_def): Add rttree and rtbit fields.
(XBITMAP, XTREE): New accessor macros.
(NOTE_LIVE_INFO): Overload NOTE_SOURCE_FILE for NOTE_INSN_LIVE notes.
(NOTE_RANGE_INFO): Similarly for NOTE_INSN_RANGE_{START,END} notes.
(NOTE_BLOCK_LIVE_RANGE_BLOCK): Define.
(NOTE_INSN_RANGE_START, NOTE_INSN_RANGE_END, NOTE_INSN_LIVE): New notes.
(RANGE_LIVE_{BITMAP,ORIG_BLOCK}): New accessor macros.
(RANGE_REG_{SYMBOL,BLOCK}_NODE, RANGE_VAR_*): New accessor macros.
(RANGE_INFO_*): Likewise.
* sched.c (sched_analyze): Keep live range start/stop notes.
(unlink_other_notes): Likewise.
* haifa-sched.c (sched_analyze): Keep live range start/stop notes.
(unlink_other_notes): Likewise.
* tree.h (BLOCK_LIVE_RANGE_{START,END,VAR_FLAG}): New accessor macros.
(BLOCK_LIVE_RANGE_FLAG): Likewise.
(DECL_LIVE_RANGE_RTL): Likewise.
(struct tree_block): Add live_range_flag, live_range_var_flag,
live_range_start and live_range_end.
(struct tree_decl): Add live_range_rtl field.
* gengenrtl.c (type_from_format): Handle 'b' and 't'.
(accessor_from_format): Likewise.
Co-Authored-By: Jeffrey A Law <law@cygnus.com>
From-SVN: r19727
1998-05-13 21:13:47 +00:00
|
|
|
case 'b':
|
|
|
|
if (XBITMAP (in_rtx, i) == NULL)
|
1998-11-23 16:41:12 +00:00
|
|
|
fputs (" {null}", outfile);
|
Makefile.in (HOST_RTL): Add $(HOST_PREFIX)bitmap.o.
* Makefile.in (HOST_RTL): Add $(HOST_PREFIX)bitmap.o.
(rtl.o, emit-rtl.o): Add dependency on bitmap.h.
($(HOST_PREFIX_1)rtl.o): Likewise.
($(HOST_PREFIX_1)bitmap.o): New host object.
* emit-rtl.c (toplevel): Include bitmap.h.
(gen_rtx): Handle 't' and 'b' nodes.
* print-rtl.c (print_rtx): Handle printing NOTE_INSN_LIVE notes.
Print block number for block begin/end notes. Print 't' type
nodes as a pointer. Know that the 3rd argument of live range
start/stop notes is really a range_info rtx. If type is 'b', print
out argument as a bitmap.
* rtl.c: Include bitmap.c.
(copy_rtx): Copy tree nodes as is. Copy bitmaps if type is 'b'.
(note_insn_name): Add NOTE_INSN_RANGE_{START,END}, NOTE_INSN_LIVE.
* rtl.def (RANGE_LIVE): New node to hold live information while we
recalculate the basic blocks.
(RANGE_REG, RANGE_INFO): New rtl types for live range splitting.
(RANGE_VAR): New node, to hold information saved in symbol node for New
communicating live range information to the debug output functions.
* rtl.h (rtunion_def): Add rttree and rtbit fields.
(XBITMAP, XTREE): New accessor macros.
(NOTE_LIVE_INFO): Overload NOTE_SOURCE_FILE for NOTE_INSN_LIVE notes.
(NOTE_RANGE_INFO): Similarly for NOTE_INSN_RANGE_{START,END} notes.
(NOTE_BLOCK_LIVE_RANGE_BLOCK): Define.
(NOTE_INSN_RANGE_START, NOTE_INSN_RANGE_END, NOTE_INSN_LIVE): New notes.
(RANGE_LIVE_{BITMAP,ORIG_BLOCK}): New accessor macros.
(RANGE_REG_{SYMBOL,BLOCK}_NODE, RANGE_VAR_*): New accessor macros.
(RANGE_INFO_*): Likewise.
* sched.c (sched_analyze): Keep live range start/stop notes.
(unlink_other_notes): Likewise.
* haifa-sched.c (sched_analyze): Keep live range start/stop notes.
(unlink_other_notes): Likewise.
* tree.h (BLOCK_LIVE_RANGE_{START,END,VAR_FLAG}): New accessor macros.
(BLOCK_LIVE_RANGE_FLAG): Likewise.
(DECL_LIVE_RANGE_RTL): Likewise.
(struct tree_block): Add live_range_flag, live_range_var_flag,
live_range_start and live_range_end.
(struct tree_decl): Add live_range_rtl field.
* gengenrtl.c (type_from_format): Handle 'b' and 't'.
(accessor_from_format): Likewise.
Co-Authored-By: Jeffrey A Law <law@cygnus.com>
From-SVN: r19727
1998-05-13 21:13:47 +00:00
|
|
|
else
|
|
|
|
bitmap_print (outfile, XBITMAP (in_rtx, i), " {", "}");
|
|
|
|
sawclose = 0;
|
|
|
|
break;
|
|
|
|
|
|
|
|
case 't':
|
|
|
|
putc (' ', outfile);
|
1998-07-13 16:53:32 +00:00
|
|
|
fprintf (outfile, HOST_PTR_PRINTF, (char *) XTREE (in_rtx, i));
|
Makefile.in (HOST_RTL): Add $(HOST_PREFIX)bitmap.o.
* Makefile.in (HOST_RTL): Add $(HOST_PREFIX)bitmap.o.
(rtl.o, emit-rtl.o): Add dependency on bitmap.h.
($(HOST_PREFIX_1)rtl.o): Likewise.
($(HOST_PREFIX_1)bitmap.o): New host object.
* emit-rtl.c (toplevel): Include bitmap.h.
(gen_rtx): Handle 't' and 'b' nodes.
* print-rtl.c (print_rtx): Handle printing NOTE_INSN_LIVE notes.
Print block number for block begin/end notes. Print 't' type
nodes as a pointer. Know that the 3rd argument of live range
start/stop notes is really a range_info rtx. If type is 'b', print
out argument as a bitmap.
* rtl.c: Include bitmap.c.
(copy_rtx): Copy tree nodes as is. Copy bitmaps if type is 'b'.
(note_insn_name): Add NOTE_INSN_RANGE_{START,END}, NOTE_INSN_LIVE.
* rtl.def (RANGE_LIVE): New node to hold live information while we
recalculate the basic blocks.
(RANGE_REG, RANGE_INFO): New rtl types for live range splitting.
(RANGE_VAR): New node, to hold information saved in symbol node for New
communicating live range information to the debug output functions.
* rtl.h (rtunion_def): Add rttree and rtbit fields.
(XBITMAP, XTREE): New accessor macros.
(NOTE_LIVE_INFO): Overload NOTE_SOURCE_FILE for NOTE_INSN_LIVE notes.
(NOTE_RANGE_INFO): Similarly for NOTE_INSN_RANGE_{START,END} notes.
(NOTE_BLOCK_LIVE_RANGE_BLOCK): Define.
(NOTE_INSN_RANGE_START, NOTE_INSN_RANGE_END, NOTE_INSN_LIVE): New notes.
(RANGE_LIVE_{BITMAP,ORIG_BLOCK}): New accessor macros.
(RANGE_REG_{SYMBOL,BLOCK}_NODE, RANGE_VAR_*): New accessor macros.
(RANGE_INFO_*): Likewise.
* sched.c (sched_analyze): Keep live range start/stop notes.
(unlink_other_notes): Likewise.
* haifa-sched.c (sched_analyze): Keep live range start/stop notes.
(unlink_other_notes): Likewise.
* tree.h (BLOCK_LIVE_RANGE_{START,END,VAR_FLAG}): New accessor macros.
(BLOCK_LIVE_RANGE_FLAG): Likewise.
(DECL_LIVE_RANGE_RTL): Likewise.
(struct tree_block): Add live_range_flag, live_range_var_flag,
live_range_start and live_range_end.
(struct tree_decl): Add live_range_rtl field.
* gengenrtl.c (type_from_format): Handle 'b' and 't'.
(accessor_from_format): Likewise.
Co-Authored-By: Jeffrey A Law <law@cygnus.com>
From-SVN: r19727
1998-05-13 21:13:47 +00:00
|
|
|
break;
|
|
|
|
|
1992-04-02 08:44:47 +00:00
|
|
|
case '*':
|
1998-11-23 16:41:12 +00:00
|
|
|
fputs (" Unknown", outfile);
|
1991-12-24 04:31:09 +00:00
|
|
|
sawclose = 0;
|
|
|
|
break;
|
|
|
|
|
|
|
|
default:
|
|
|
|
fprintf (stderr,
|
|
|
|
"switch format wrong in rtl.print_rtx(). format was: %c.\n",
|
|
|
|
format_ptr[-1]);
|
|
|
|
abort ();
|
|
|
|
}
|
|
|
|
|
2000-05-12 09:26:15 -07:00
|
|
|
switch (GET_CODE (in_rtx))
|
|
|
|
{
|
|
|
|
case MEM:
|
2000-06-14 14:04:42 -07:00
|
|
|
fputc (' ', outfile);
|
2000-06-12 23:08:05 +00:00
|
|
|
fprintf (outfile, HOST_WIDE_INT_PRINT_DEC, MEM_ALIAS_SET (in_rtx));
|
2000-05-12 09:26:15 -07:00
|
|
|
break;
|
1998-09-09 20:59:53 +00:00
|
|
|
|
2000-03-06 19:51:52 +01:00
|
|
|
#if HOST_FLOAT_FORMAT == TARGET_FLOAT_FORMAT && MAX_LONG_DOUBLE_TYPE_SIZE == 64
|
2000-05-12 09:26:15 -07:00
|
|
|
case CONST_DOUBLE:
|
|
|
|
if (FLOAT_MODE_P (GET_MODE (in_rtx)))
|
|
|
|
{
|
|
|
|
double val;
|
|
|
|
REAL_VALUE_FROM_CONST_DOUBLE (val, in_rtx);
|
|
|
|
fprintf (outfile, " [%.16g]", val);
|
|
|
|
}
|
|
|
|
break;
|
1998-07-06 15:40:02 -07:00
|
|
|
#endif
|
|
|
|
|
2000-05-12 09:26:15 -07:00
|
|
|
case CODE_LABEL:
|
2000-04-12 12:59:56 +00:00
|
|
|
fprintf (outfile, " [%d uses]", LABEL_NUSES (in_rtx));
|
1999-11-03 21:55:51 +00:00
|
|
|
if (LABEL_ALTERNATE_NAME (in_rtx))
|
2000-04-12 12:59:56 +00:00
|
|
|
fprintf (outfile, " [alternate name: %s]",
|
|
|
|
LABEL_ALTERNATE_NAME (in_rtx));
|
2000-05-12 09:26:15 -07:00
|
|
|
break;
|
|
|
|
|
|
|
|
case CALL_PLACEHOLDER:
|
2000-09-11 21:03:26 +00:00
|
|
|
if (debug_call_placeholder_verbose)
|
|
|
|
{
|
|
|
|
fputs (" (cond [\n (const_string \"normal\") (sequence [", outfile);
|
|
|
|
for (tem = XEXP (in_rtx, 0); tem != 0; tem = NEXT_INSN (tem))
|
|
|
|
{
|
|
|
|
fputs ("\n ", outfile);
|
|
|
|
print_inline_rtx (outfile, tem, 4);
|
|
|
|
}
|
|
|
|
|
|
|
|
tem = XEXP (in_rtx, 1);
|
|
|
|
if (tem)
|
|
|
|
fputs ("\n ])\n (const_string \"tail_call\") (sequence [", outfile);
|
|
|
|
for (; tem != 0; tem = NEXT_INSN (tem))
|
|
|
|
{
|
|
|
|
fputs ("\n ", outfile);
|
|
|
|
print_inline_rtx (outfile, tem, 4);
|
|
|
|
}
|
|
|
|
|
|
|
|
tem = XEXP (in_rtx, 2);
|
|
|
|
if (tem)
|
|
|
|
fputs ("\n ])\n (const_string \"tail_recursion\") (sequence [", outfile);
|
|
|
|
for (; tem != 0; tem = NEXT_INSN (tem))
|
|
|
|
{
|
|
|
|
fputs ("\n ", outfile);
|
|
|
|
print_inline_rtx (outfile, tem, 4);
|
|
|
|
}
|
|
|
|
|
|
|
|
fputs ("\n ])\n ])", outfile);
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
|
2000-05-12 09:26:15 -07:00
|
|
|
for (tem = XEXP (in_rtx, 0); tem != 0; tem = NEXT_INSN (tem))
|
|
|
|
if (GET_CODE (tem) == CALL_INSN)
|
|
|
|
{
|
|
|
|
fprintf (outfile, " ");
|
|
|
|
print_rtx (tem);
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
break;
|
|
|
|
|
|
|
|
default:
|
|
|
|
break;
|
1999-11-03 21:55:51 +00:00
|
|
|
}
|
2000-04-12 12:59:56 +00:00
|
|
|
|
1998-11-23 16:41:12 +00:00
|
|
|
if (dump_for_graph
|
|
|
|
&& (is_insn || GET_CODE (in_rtx) == NOTE
|
|
|
|
|| GET_CODE (in_rtx) == CODE_LABEL || GET_CODE (in_rtx) == BARRIER))
|
|
|
|
sawclose = 0;
|
|
|
|
else
|
|
|
|
{
|
|
|
|
fputc (')', outfile);
|
|
|
|
sawclose = 1;
|
|
|
|
}
|
1991-12-24 04:31:09 +00:00
|
|
|
}
|
|
|
|
|
1997-08-02 17:29:08 -04:00
|
|
|
/* Print an rtx on the current line of FILE. Initially indent IND
|
|
|
|
characters. */
|
|
|
|
|
|
|
|
void
|
|
|
|
print_inline_rtx (outf, x, ind)
|
|
|
|
FILE *outf;
|
|
|
|
rtx x;
|
c-lex.c: Include <stdlib.h> and <string.h>/<strings.h>.
/
* c-lex.c: Include <stdlib.h> and <string.h>/<strings.h>. Add
prototype for `handle_sysv_pragma', and make it static. Add
parentheses around assignment used as truth value.
* combine.c (combine_instructions): Protect variable `prev' with
macro HAVE_cc0.
(can_combine_p): Protect variable `link' with AUTO_INC_DEC.
(extract_left_shift): Add parentheses around operand of &.
(merge_outer_ops): Avoid an empty body in an else-statement.
(gen_rtx_combine): Remove unused variable `i'.
* sparc/gmon-sol2.c: Include <fcntl.h>. Make return type of
function monstartup `void'. Likewise for internal_mcount. Add
`static void' prototype for moncontrol. Reconcile sprintf format
vs. args.
* sparc/sparc.c: Include <stdlib.h> and <string.h>/<strings.h>.
Make return type of function_arg_slotno explicitly `int'.
(reg_unused_after): Add parentheses around assignment used as
truth value.
(save_regs): Add explicit braces to avoid ambiguous `else'.
(function_arg_slotno): Add parentheses around && within ||.
(function_arg_pass_by_reference): Likewise.
(sparc_flat_output_function_prologue): Reconcile fprintf format
vs. args.
* svr4.h (ASM_OUTPUT_LIMITED_STRING): Add parentheses around
assignment used as truth value.
* cplus-dem.c: Include <stdlib.h>.
(demangle_signature): Avoid an empty body in an else-statement.
(do_type): Remove unused variable `lvl'.
* cppexp.c: Don't have <stdlib.h> depend on MULTIBYTE_CHARS.
Include <string.h>/<strings.h>.
(cpp_lex): Remove unused variable `namelen'.
(cpp_lex): Explicitly declare `num_chars' as an int.
* cpplib.c: Avoid duplicate inclusion of <stdlib.h>, include
<unistd.h> instead. Explicitly declare is_system_include
returning int.
(make_assertion): Remove unused variable `kt'.
(cpp_expand_to_buffer): Hide variable `obuf'.
(output_line_command): Remove unused variables, `line_end',
`line_cmd_buf' and `len'.
(macarg): Remove unused variable `arg_start'.
(special_symbol): Remove unused variable `i'. Add parentheses
around assignment used as truth value.
(do_include): Remove unused variables `pcfname' and `retried',
hide `pcf' and `pcfbuflimit'.
(do_line): Remove unused variable `i'.
(finclude): Hide variable `missing_newline'.
(cpp_handle_options): Remove unused variable `j'.
(read_token_list): Remove unused variable `eofp'.
(cpp_error_with_line): Remove unused variable `i'.
(cpp_warning_with_line): Likewise.
(cpp_pedwarn_with_line): Explicitly declare `column' as int.
(cpp_error_from_errno): Remove unused variable `i'.
* cse.c (invalidate): Add parentheses around assignment used as
truth value.
(find_best_addr): Move declaration of variable `our_cost' inside
the conditional macro where its used.
(fold_rtx): Avoid an empty body in an if-statement.
(cse_insn): Wrap variables `this_insn_cc0_mode' and
`this_insn_cc0' in macro HAVE_cc0.
* dwarf2out.c: Include <stdlib.h> and <string.h>/<string.h>.
(ASM_OUTPUT_DWARF_DATA8): Reconcile format vs. args in fprintf's.
(output_uleb128): Likewise.
(output_sleb128): Likewise.
(output_cfi): Likewise.
(output_call_frame_info): Remove unused variables `j', `fde_size'
and `fde_pad'.
(comp_unit_has_inlines): Hide declaration as per rest of file.
(size_of_line_prolog): Correct typo in prototype.
(add_arange): Likewise.
(output_aranges): Likewise.
(add_name_and_src_coords_attributes): Likewise.
(gen_array_type_die): Likewise.
(gen_inlined_subroutine_die): Likewise.
(equate_decl_number_to_die): Remove unused variable `i'.
(print_die): Reconcile format vs. args in fprintf's.
(print_dwarf_line_table): Likewise.
(output_die): Likewise.
(output_line_info): Likewise.
(add_subscript_info): Avoid an empty body in an else-statement.
(gen_subprogram_die): Remove unused variable `fp_loc'.
* dwarfout.c: Explicitly declare `next_pubname_number' as int.
Protect `ordering_attribute' prototype with USE_ORDERING_ATTRIBUTE
macro. Protect `src_coords_attribute' prototype with
DWARF_DECL_COORDINATES macro. Hide `output_entry_point_die'
prototype as in the rest of the file. Likewise for
`output_pointer_type_die' and `output_reference_type_die'. Remove
prototype for `type_of_for_scope'.
(output_unsigned_leb128): Reconcile format vs. args in fprintf.
(type_attribute): Add explicit braces to avoid ambiguous `else'.
* final.c: Include <stdlib.h> and <string.h>/<strings.h>.
(shorten_branches): Protect declaration of tmp_length with
SHORTEN_WITH_ADJUST_INSN_LENGTH and ADJUST_INSN_LENGTH macros.
(profile_function): Protect declaration of `sval' and `cxt'
variables with appropriate macros.
(final_scan_insn): Likewise for `note' variable. Add explicit
braces to avoid empty body in an if-statement.
(output_asm_insn): Move variable `i' inside macro conditional
where it is used. Add parentheses around assignment used as truth
value.
(asm_fprintf) Likewise, likewise.
* fix-header.c (main): Remove unused variable `done'. Protect
declaration of `i' with FIXPROTO_IGNORE_LIST.
* pexecute.c: Include <unistd.h>. Prototype `my_strerror'.
* print-rtl.c (print_inline_rtx): Explicitly declare the parameter
`ind'.
* profile.c: Include <string.h>/<strings.h>.
(instrument_arcs): Remove unused variables `note', `inverted',
`zero' and `neg_one'.
(branch_prob): Avoid empty body in an if-statement.
* regclass.c: Include <stdlib.h>.
(reg_alternate_class): Explicitly declare parameter `regno'.
* regmove.c (regmove_optimize): Remove unused variable `p'. Add
parentheses around assignment used as truth value.
(find_matches): Remove unused variables `output_operand' and
`matching_operand'.
(fixup_match_1): Remove statement with no effect: "if (0) ;".
* scan.c (sstring_append): Explicitly declare `count' as int.
(scan_string): Explicitly declare parameter `init' as int.
* sched.c: Include <stdlib.h>.
(BLOCKAGE_RANGE): Add parentheses around arithmetic in operand of |.
(rank_for_schedule): Add parentheses around assignment used as
truth value.
(schedule_block): Likewise.
(regno_use_in): Likewise.
(schedule_insns): Remove unused variable `i'.
* toplev.c: Include <stdlib.h> and <string.h>/<strings.h>.
(v_message_with_decl): Remove unused variable `n'.
(botch): Explicitly declare parameter `s' as char *.
(main): Add parentheses around assignment used as truth value.
* tree.c (make_node): Protect the variable `kind' with the
GATHER_STATISTICS macro.
(real_value_from_int_cst): Move variable `e' inside conditional
macro area where it is used.
(tree_last): Add parentheses around assignment used as truth value.
(build1): Protect the variable `kind' with the GATHER_STATISTICS
macro.
(print_obstack_statistics): Reconcile format vs. args in fprintf.
Protect variables `i', `total_nodes', and `total_bytes' with the
GATHER_STATISTICS macro.
Lots more -W -Wall warnings disappear.
From-SVN: r17517
1998-01-27 15:11:54 -07:00
|
|
|
int ind;
|
1997-08-02 17:29:08 -04:00
|
|
|
{
|
1997-12-06 17:31:01 -07:00
|
|
|
int oldsaw = sawclose;
|
|
|
|
int oldindent = indent;
|
|
|
|
|
1997-08-02 17:29:08 -04:00
|
|
|
sawclose = 0;
|
|
|
|
indent = ind;
|
|
|
|
outfile = outf;
|
|
|
|
print_rtx (x);
|
1997-12-06 17:31:01 -07:00
|
|
|
sawclose = oldsaw;
|
|
|
|
indent = oldindent;
|
1997-08-02 17:29:08 -04:00
|
|
|
}
|
|
|
|
|
1991-12-24 04:31:09 +00:00
|
|
|
/* Call this function from the debugger to see what X looks like. */
|
|
|
|
|
|
|
|
void
|
|
|
|
debug_rtx (x)
|
|
|
|
rtx x;
|
|
|
|
{
|
|
|
|
outfile = stderr;
|
|
|
|
print_rtx (x);
|
|
|
|
fprintf (stderr, "\n");
|
|
|
|
}
|
|
|
|
|
1993-01-26 00:30:34 +00:00
|
|
|
/* Count of rtx's to print with debug_rtx_list.
|
|
|
|
This global exists because gdb user defined commands have no arguments. */
|
|
|
|
|
|
|
|
int debug_rtx_count = 0; /* 0 is treated as equivalent to 1 */
|
|
|
|
|
|
|
|
/* Call this function to print list from X on.
|
|
|
|
|
|
|
|
N is a count of the rtx's to print. Positive values print from the specified
|
|
|
|
rtx on. Negative values print a window around the rtx.
|
|
|
|
EG: -5 prints 2 rtx's on either side (in addition to the specified rtx). */
|
|
|
|
|
|
|
|
void
|
|
|
|
debug_rtx_list (x, n)
|
|
|
|
rtx x;
|
|
|
|
int n;
|
|
|
|
{
|
|
|
|
int i,count;
|
|
|
|
rtx insn;
|
|
|
|
|
|
|
|
count = n == 0 ? 1 : n < 0 ? -n : n;
|
|
|
|
|
|
|
|
/* If we are printing a window, back up to the start. */
|
|
|
|
|
|
|
|
if (n < 0)
|
|
|
|
for (i = count / 2; i > 0; i--)
|
|
|
|
{
|
|
|
|
if (PREV_INSN (x) == 0)
|
|
|
|
break;
|
|
|
|
x = PREV_INSN (x);
|
|
|
|
}
|
|
|
|
|
|
|
|
for (i = count, insn = x; i > 0 && insn != 0; i--, insn = NEXT_INSN (insn))
|
|
|
|
debug_rtx (insn);
|
|
|
|
}
|
|
|
|
|
2000-04-07 02:24:06 -07:00
|
|
|
/* Call this function to print an rtx list from START to END inclusive. */
|
|
|
|
|
|
|
|
void
|
|
|
|
debug_rtx_range (start, end)
|
|
|
|
rtx start, end;
|
|
|
|
{
|
|
|
|
while (1)
|
|
|
|
{
|
|
|
|
debug_rtx (start);
|
|
|
|
if (!start || start == end)
|
|
|
|
break;
|
|
|
|
start = NEXT_INSN (start);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
1993-01-26 00:30:34 +00:00
|
|
|
/* Call this function to search an rtx list to find one with insn uid UID,
|
|
|
|
and then call debug_rtx_list to print it, using DEBUG_RTX_COUNT.
|
|
|
|
The found insn is returned to enable further debugging analysis. */
|
|
|
|
|
|
|
|
rtx
|
1997-08-02 17:29:08 -04:00
|
|
|
debug_rtx_find (x, uid)
|
1993-01-26 00:30:34 +00:00
|
|
|
rtx x;
|
|
|
|
int uid;
|
|
|
|
{
|
|
|
|
while (x != 0 && INSN_UID (x) != uid)
|
|
|
|
x = NEXT_INSN (x);
|
|
|
|
if (x != 0)
|
|
|
|
{
|
|
|
|
debug_rtx_list (x, debug_rtx_count);
|
|
|
|
return x;
|
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
|
|
|
fprintf (stderr, "insn uid %d not found\n", uid);
|
|
|
|
return 0;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
1991-12-24 04:31:09 +00:00
|
|
|
/* External entry point for printing a chain of insns
|
|
|
|
starting with RTX_FIRST onto file OUTF.
|
|
|
|
A blank line separates insns.
|
|
|
|
|
|
|
|
If RTX_FIRST is not an insn, then it alone is printed, with no newline. */
|
|
|
|
|
|
|
|
void
|
|
|
|
print_rtl (outf, rtx_first)
|
|
|
|
FILE *outf;
|
|
|
|
rtx rtx_first;
|
|
|
|
{
|
|
|
|
register rtx tmp_rtx;
|
|
|
|
|
|
|
|
outfile = outf;
|
|
|
|
sawclose = 0;
|
|
|
|
|
|
|
|
if (rtx_first == 0)
|
2000-09-13 21:34:05 +02:00
|
|
|
{
|
|
|
|
fputs (print_rtx_head, outf);
|
|
|
|
fputs ("(nil)\n", outf);
|
|
|
|
}
|
1991-12-24 04:31:09 +00:00
|
|
|
else
|
|
|
|
switch (GET_CODE (rtx_first))
|
|
|
|
{
|
|
|
|
case INSN:
|
|
|
|
case JUMP_INSN:
|
|
|
|
case CALL_INSN:
|
|
|
|
case NOTE:
|
|
|
|
case CODE_LABEL:
|
|
|
|
case BARRIER:
|
2000-04-12 12:59:56 +00:00
|
|
|
for (tmp_rtx = rtx_first; tmp_rtx != 0; tmp_rtx = NEXT_INSN (tmp_rtx))
|
|
|
|
if (! flag_dump_unnumbered
|
|
|
|
|| GET_CODE (tmp_rtx) != NOTE || NOTE_LINE_NUMBER (tmp_rtx) < 0)
|
|
|
|
{
|
2000-09-13 21:34:05 +02:00
|
|
|
fputs (print_rtx_head, outfile);
|
2000-04-12 12:59:56 +00:00
|
|
|
print_rtx (tmp_rtx);
|
|
|
|
fprintf (outfile, "\n");
|
|
|
|
}
|
1991-12-24 04:31:09 +00:00
|
|
|
break;
|
|
|
|
|
|
|
|
default:
|
2000-09-13 21:34:05 +02:00
|
|
|
fputs (print_rtx_head, outfile);
|
1991-12-24 04:31:09 +00:00
|
|
|
print_rtx (rtx_first);
|
|
|
|
}
|
|
|
|
}
|
1997-09-04 19:15:50 +00:00
|
|
|
|
|
|
|
/* Like print_rtx, except specify a file. */
|
1998-10-06 09:03:38 +00:00
|
|
|
/* Return nonzero if we actually printed anything. */
|
1997-09-04 19:15:50 +00:00
|
|
|
|
1998-10-06 09:03:38 +00:00
|
|
|
int
|
1997-09-04 19:15:50 +00:00
|
|
|
print_rtl_single (outf, x)
|
|
|
|
FILE *outf;
|
|
|
|
rtx x;
|
|
|
|
{
|
|
|
|
outfile = outf;
|
|
|
|
sawclose = 0;
|
1998-06-29 15:40:49 -06:00
|
|
|
if (! flag_dump_unnumbered
|
|
|
|
|| GET_CODE (x) != NOTE || NOTE_LINE_NUMBER (x) < 0)
|
|
|
|
{
|
2000-09-13 21:34:05 +02:00
|
|
|
fputs (print_rtx_head, outfile);
|
1998-06-29 15:40:49 -06:00
|
|
|
print_rtx (x);
|
|
|
|
putc ('\n', outf);
|
1998-10-06 09:03:38 +00:00
|
|
|
return 1;
|
1998-06-29 15:40:49 -06:00
|
|
|
}
|
1998-10-06 09:03:38 +00:00
|
|
|
return 0;
|
1997-09-04 19:15:50 +00:00
|
|
|
}
|
2001-01-05 23:30:02 +00:00
|
|
|
|
|
|
|
|
|
|
|
/* Like print_rtl except without all the detail; for example,
|
|
|
|
if RTX is a CONST_INT then print in decimal format. */
|
|
|
|
|
|
|
|
void
|
|
|
|
print_simple_rtl (outf, x)
|
|
|
|
FILE *outf;
|
|
|
|
rtx x;
|
|
|
|
{
|
|
|
|
flag_simple = 1;
|
|
|
|
print_rtl (outf, x);
|
|
|
|
flag_simple = 0;
|
|
|
|
}
|