OSDN Git Service

2004-03-01 Paolo Bonzini <bonzini@gnu.org>
[pf3gnuchains/gcc-fork.git] / gcc / print-rtl.c
index b46d1c6..f1496c2 100644 (file)
@@ -1,5 +1,5 @@
 /* Print RTL for GCC.
-   Copyright (C) 1987, 1988, 1992, 1997, 1998, 1999, 2000, 2002, 2003
+   Copyright (C) 1987, 1988, 1992, 1997, 1998, 1999, 2000, 2002, 2003, 2004
    Free Software Foundation, Inc.
 
 This file is part of GCC.
@@ -34,23 +34,7 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
 #include "flags.h"
 #include "hard-reg-set.h"
 #include "basic-block.h"
-
-/* 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
-static const char * const debug_reg_names[] = DEBUG_REGISTER_NAMES;
-#define reg_names debug_reg_names
-#else
-const char * reg_names[] = REGISTER_NAMES;
-#endif
+#include "tm_p.h"
 
 static FILE *outfile;
 
@@ -307,6 +291,14 @@ print_rtx (rtx in_rtx)
                  fprintf (outfile, " [ ERROR ]");
                break;
 
+             case NOTE_INSN_VAR_LOCATION:
+               fprintf (outfile, " (");
+               print_mem_expr (outfile, NOTE_VAR_LOCATION_DECL (in_rtx));
+               fprintf (outfile, " ");
+               print_rtx (NOTE_VAR_LOCATION_LOC (in_rtx));
+               fprintf (outfile, ")");
+               break;
+
              default:
                {
                  const char * const str = X0STR (in_rtx, i);
@@ -398,11 +390,10 @@ print_rtx (rtx in_rtx)
            int value = XINT (in_rtx, i);
            const char *name;
 
+#ifndef GENERATOR_FILE
            if (GET_CODE (in_rtx) == REG && value < FIRST_PSEUDO_REGISTER)
-             {
-               fputc (' ', outfile);
-               DEBUG_PRINT_REG (in_rtx, 0, outfile);
-             }
+             fprintf (outfile, " %d %s", REGNO (in_rtx),
+                      reg_names[REGNO (in_rtx)]);
            else if (GET_CODE (in_rtx) == REG
                     && value <= LAST_VIRTUAL_REGISTER)
              {
@@ -420,7 +411,9 @@ print_rtx (rtx in_rtx)
                  fprintf (outfile, " %d virtual-reg-%d", value,
                           value-FIRST_VIRTUAL_REGISTER);
              }
-           else if (flag_dump_unnumbered
+           else
+#endif
+             if (flag_dump_unnumbered
                     && (is_insn || GET_CODE (in_rtx) == NOTE))
              fputc ('#', outfile);
            else