OSDN Git Service

* config/sparc/sparc.md (movdi_insn_sp64_novis): New pattern.
[pf3gnuchains/gcc-fork.git] / gcc / print-rtl.c
index 862999a..2c7194a 100644 (file)
@@ -1,5 +1,5 @@
 /* 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.
@@ -52,11 +52,7 @@ static int sawclose = 0;
 
 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.
@@ -150,8 +146,12 @@ print_rtx (in_rtx)
        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;
 
@@ -164,13 +164,21 @@ print_rtx (in_rtx)
            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
@@ -190,18 +198,22 @@ print_rtx (in_rtx)
              }
            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, " ");
@@ -300,10 +312,17 @@ print_rtx (in_rtx)
       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);
@@ -338,7 +357,7 @@ print_rtx (in_rtx)
   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;
@@ -348,7 +367,11 @@ print_rtx (in_rtx)
 #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