/* Print RTL for GNU C Compiler.
- Copyright (C) 1987, 1988, 1992, 1997, 1998, 1999
+ Copyright (C) 1987, 1988, 1992, 1997, 1998, 1999, 2000
Free Software Foundation, Inc.
This file is part of GNU CC.
static int indent;
-/* Names for patterns. */
-
-extern const char *get_insn_name PROTO ((int));
-
-static void print_rtx PROTO ((rtx));
+static void print_rtx PARAMS ((rtx));
/* Nonzero means suppress output of instruction numbers and line number
notes in debugging dumps.
if (XSTR (in_rtx, i) == 0)
fputs (dump_for_graph ? " \\\"\\\"" : " \"\"", outfile);
else
- fprintf (outfile, dump_for_graph ? " (\\\"%s\\\")" : " (\"%s\")",
- XSTR (in_rtx, i));
+ {
+ if (dump_for_graph)
+ fprintf (outfile, " (\\\"%s\\\")", XSTR (in_rtx, i));
+ else
+ fprintf (outfile, " (\"%s\")", XSTR (in_rtx, i));
+ }
sawclose = 1;
break;
if (NOTE_LINE_NUMBER (in_rtx) == NOTE_INSN_EH_REGION_BEG
|| NOTE_LINE_NUMBER (in_rtx) == NOTE_INSN_EH_REGION_END)
{
- fprintf (outfile, " %d", NOTE_EH_HANDLER (in_rtx));
+ if (flag_dump_unnumbered)
+ fprintf (outfile, " #");
+ else
+ fprintf (outfile, " %d", NOTE_EH_HANDLER (in_rtx));
sawclose = 1;
}
else if (NOTE_LINE_NUMBER (in_rtx) == NOTE_INSN_BLOCK_BEG
|| NOTE_LINE_NUMBER (in_rtx) == NOTE_INSN_BLOCK_END)
{
- fprintf (outfile, " %d", NOTE_BLOCK_NUMBER (in_rtx));
+ fprintf (outfile, " ");
+ if (flag_dump_unnumbered)
+ fprintf (outfile, "#");
+ else
+ fprintf (outfile, HOST_PTR_PRINTF,
+ (char *) NOTE_BLOCK (in_rtx));
sawclose = 1;
}
else if (NOTE_LINE_NUMBER (in_rtx) == NOTE_INSN_RANGE_START
}
else
{
- char *str = X0STR (in_rtx, i);
+ const char * const str = X0STR (in_rtx, i);
if (str == 0)
fputs (dump_for_graph ? " \\\"\\\"" : " \"\"", outfile);
else
- fprintf (outfile,
- dump_for_graph ? " (\\\"%s\\\")" : " (\"%s\")",
- str);
+ {
+ if (dump_for_graph)
+ fprintf (outfile, " (\\\"%s\\\")", str);
+ else
+ fprintf (outfile, " (\"%s\")", str);
+ }
}
}
break;
case 'e':
+ do_e:
indent += 2;
if (!sawclose)
fprintf (outfile, " ");
case 'u':
if (XEXP (in_rtx, i) != NULL)
{
+ rtx sub = XEXP (in_rtx, i);
+ enum rtx_code subc = GET_CODE (sub);
+
+ if (GET_CODE (in_rtx) == LABEL_REF
+ && subc != CODE_LABEL)
+ goto do_e;
+
if (flag_dump_unnumbered)
fputc ('#', outfile);
else
- fprintf (outfile, " %d", INSN_UID (XEXP (in_rtx, i)));
+ fprintf (outfile, " %d", INSN_UID (sub));
}
else
fputs (" 0", outfile);
if (GET_CODE (in_rtx) == MEM)
fprintf (outfile, " %d", MEM_ALIAS_SET (in_rtx));
-#if HOST_FLOAT_FORMAT == TARGET_FLOAT_FORMAT && LONG_DOUBLE_TYPE_SIZE == 64
+#if HOST_FLOAT_FORMAT == TARGET_FLOAT_FORMAT && MAX_LONG_DOUBLE_TYPE_SIZE == 64
if (GET_CODE (in_rtx) == CONST_DOUBLE && FLOAT_MODE_P (GET_MODE (in_rtx)))
{
double val;
#endif
if (GET_CODE (in_rtx) == CODE_LABEL)
- fprintf (outfile, " [num uses: %d]", LABEL_NUSES (in_rtx));
+ {
+ fprintf (outfile, " [num uses: %d]", LABEL_NUSES (in_rtx));
+ if (LABEL_ALTERNATE_NAME (in_rtx))
+ fprintf (outfile, " [alternate name: %s]", LABEL_ALTERNATE_NAME (in_rtx));
+ }
if (dump_for_graph
&& (is_insn || GET_CODE (in_rtx) == NOTE