OSDN Git Service

cp:
[pf3gnuchains/gcc-fork.git] / gcc / dwarfout.c
index abc24bd..ad715cd 100644 (file)
@@ -574,9 +574,11 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
 #include "insn-config.h"
 #include "reload.h"
 #include "output.h"
+#include "dwarf2asm.h"
 #include "toplev.h"
 #include "tm_p.h"
 #include "debug.h"
+#include "langhooks.h"
 
 /* NOTE: In the comments in this file, many references are made to
    so called "Debugging Information Entries".  For the sake of brevity,
@@ -629,8 +631,6 @@ Software Foundation, 59 Temple Place - Suite 330, Boston, MA
        && is_tagged_type (TREE_TYPE (decl))            \
        && decl == TYPE_STUB_DECL (TREE_TYPE (decl))))
 
-extern int flag_traditional;
-
 /* Maximum size (in bytes) of an artificially generated label. */
 
 #define MAX_ARTIFICIAL_LABEL_BYTES     30
@@ -669,10 +669,6 @@ static unsigned ft_entries;
 
 static const char *primary_filename;
 
-/* Pointer to the most recent filename for which we produced some line info.  */
-
-static const char *last_filename;
-
 /* Counter to generate unique names for DIEs.  */
 
 static unsigned next_unused_dienum = 1;
@@ -927,7 +923,8 @@ static void shuffle_filename_entry  PARAMS ((filename_entry *));
 static void generate_new_sfname_entry  PARAMS ((void));
 static unsigned lookup_filename                PARAMS ((const char *));
 static void generate_srcinfo_entry     PARAMS ((unsigned, unsigned));
-static void generate_macinfo_entry     PARAMS ((const char *, const char *));
+static void generate_macinfo_entry     PARAMS ((unsigned int, rtx,
+                                                const char *));
 static int is_pseudo_reg               PARAMS ((rtx));
 static tree type_main_variant          PARAMS ((tree));
 static int is_tagged_type              PARAMS ((tree));
@@ -1206,154 +1203,84 @@ static void retry_incomplete_types     PARAMS ((void));
 
 #ifndef ASM_OUTPUT_DWARF_DELTA2
 #define ASM_OUTPUT_DWARF_DELTA2(FILE,LABEL1,LABEL2)                    \
- do {  fprintf ((FILE), "%s", UNALIGNED_SHORT_ASM_OP);                 \
-       assemble_name (FILE, LABEL1);                                   \
-       fprintf (FILE, "-");                                            \
-       assemble_name (FILE, LABEL2);                                   \
-       fprintf (FILE, "\n");                                           \
-  } while (0)
+  dw2_asm_output_delta (2, LABEL1, LABEL2, NULL)
 #endif
 
 #ifndef ASM_OUTPUT_DWARF_DELTA4
 #define ASM_OUTPUT_DWARF_DELTA4(FILE,LABEL1,LABEL2)                    \
- do {  fprintf ((FILE), "%s", UNALIGNED_INT_ASM_OP);                   \
-       assemble_name (FILE, LABEL1);                                   \
-       fprintf (FILE, "-");                                            \
-       assemble_name (FILE, LABEL2);                                   \
-       fprintf (FILE, "\n");                                           \
-  } while (0)
+  dw2_asm_output_delta (4, LABEL1, LABEL2, NULL)
 #endif
 
 #ifndef ASM_OUTPUT_DWARF_TAG
 #define ASM_OUTPUT_DWARF_TAG(FILE,TAG)                                 \
-  do {                                                                 \
-    fprintf ((FILE), "%s0x%x",                                         \
-                    UNALIGNED_SHORT_ASM_OP, (unsigned) TAG);           \
-    if (flag_debug_asm)                                                        \
-      fprintf ((FILE), "\t%s %s",                                      \
-                      ASM_COMMENT_START, dwarf_tag_name (TAG));        \
-    fputc ('\n', (FILE));                                              \
-  } while (0)
+  dw2_asm_output_data (2, TAG, "%s", dwarf_tag_name (TAG));
 #endif
 
 #ifndef ASM_OUTPUT_DWARF_ATTRIBUTE
 #define ASM_OUTPUT_DWARF_ATTRIBUTE(FILE,ATTR)                          \
-  do {                                                                 \
-    fprintf ((FILE), "%s0x%x",                                         \
-                    UNALIGNED_SHORT_ASM_OP, (unsigned) ATTR);          \
-    if (flag_debug_asm)                                                        \
-      fprintf ((FILE), "\t%s %s",                                      \
-                      ASM_COMMENT_START, dwarf_attr_name (ATTR));      \
-    fputc ('\n', (FILE));                                              \
-  } while (0)
+  dw2_asm_output_data (2, ATTR, "%s", dwarf_attr_name (ATTR))
 #endif
 
 #ifndef ASM_OUTPUT_DWARF_STACK_OP
 #define ASM_OUTPUT_DWARF_STACK_OP(FILE,OP)                             \
-  do {                                                                 \
-    fprintf ((FILE), "%s0x%x", ASM_BYTE_OP, (unsigned) OP);            \
-    if (flag_debug_asm)                                                        \
-      fprintf ((FILE), "\t%s %s",                                      \
-                      ASM_COMMENT_START, dwarf_stack_op_name (OP));    \
-    fputc ('\n', (FILE));                                              \
-  } while (0)
+  dw2_asm_output_data (1, OP, "%s", dwarf_stack_op_name (OP))
 #endif
 
 #ifndef ASM_OUTPUT_DWARF_FUND_TYPE
 #define ASM_OUTPUT_DWARF_FUND_TYPE(FILE,FT)                            \
-  do {                                                                 \
-    fprintf ((FILE), "%s0x%x",                                         \
-                    UNALIGNED_SHORT_ASM_OP, (unsigned) FT);            \
-    if (flag_debug_asm)                                                        \
-      fprintf ((FILE), "\t%s %s",                                      \
-                      ASM_COMMENT_START, dwarf_fund_type_name (FT));   \
-    fputc ('\n', (FILE));                                              \
-  } while (0)
+  dw2_asm_output_data (2, FT, "%s", dwarf_fund_type_name (FT))
 #endif
 
 #ifndef ASM_OUTPUT_DWARF_FMT_BYTE
 #define ASM_OUTPUT_DWARF_FMT_BYTE(FILE,FMT)                            \
-  do {                                                                 \
-    fprintf ((FILE), "%s0x%x", ASM_BYTE_OP, (unsigned) FMT);           \
-    if (flag_debug_asm)                                                        \
-      fprintf ((FILE), "\t%s %s",                                      \
-                      ASM_COMMENT_START, dwarf_fmt_byte_name (FMT));   \
-    fputc ('\n', (FILE));                                              \
-  } while (0)
+  dw2_asm_output_data (1, FMT, "%s", dwarf_fmt_byte_name (FMT));
 #endif
 
 #ifndef ASM_OUTPUT_DWARF_TYPE_MODIFIER
 #define ASM_OUTPUT_DWARF_TYPE_MODIFIER(FILE,MOD)                       \
-  do {                                                                 \
-    fprintf ((FILE), "%s0x%x", ASM_BYTE_OP, (unsigned) MOD);           \
-    if (flag_debug_asm)                                                        \
-      fprintf ((FILE), "\t%s %s",                                      \
-                      ASM_COMMENT_START, dwarf_typemod_name (MOD));    \
-    fputc ('\n', (FILE));                                              \
-  } while (0)
+  dw2_asm_output_data (1, MOD, "%s", dwarf_typemod_name (MOD));
 #endif
 \f
 #ifndef ASM_OUTPUT_DWARF_ADDR
 #define ASM_OUTPUT_DWARF_ADDR(FILE,LABEL)                              \
- do {  fprintf ((FILE), "%s", UNALIGNED_INT_ASM_OP);                   \
-       assemble_name (FILE, LABEL);                                    \
-       fprintf (FILE, "\n");                                           \
-  } while (0)
+  dw2_asm_output_addr (4, LABEL, NULL)
 #endif
 
 #ifndef ASM_OUTPUT_DWARF_ADDR_CONST
 #define ASM_OUTPUT_DWARF_ADDR_CONST(FILE,RTX)                          \
-  do {                                                                 \
-    fprintf ((FILE), "%s", UNALIGNED_INT_ASM_OP);                      \
-    output_addr_const ((FILE), (RTX));                                 \
-    fputc ('\n', (FILE));                                              \
-  } while (0)
+  dw2_asm_output_addr_rtx (4, RTX, NULL)
 #endif
 
 #ifndef ASM_OUTPUT_DWARF_REF
 #define ASM_OUTPUT_DWARF_REF(FILE,LABEL)                               \
- do {  fprintf ((FILE), "%s", UNALIGNED_INT_ASM_OP);                   \
-       assemble_name (FILE, LABEL);                                    \
-       fprintf (FILE, "\n");                                           \
-  } while (0)
+  dw2_asm_output_addr (4, LABEL, NULL)
 #endif
 
 #ifndef ASM_OUTPUT_DWARF_DATA1
 #define ASM_OUTPUT_DWARF_DATA1(FILE,VALUE) \
-  fprintf ((FILE), "%s0x%x\n", ASM_BYTE_OP, VALUE)
+  dw2_asm_output_data (1, VALUE, NULL)
 #endif
 
 #ifndef ASM_OUTPUT_DWARF_DATA2
 #define ASM_OUTPUT_DWARF_DATA2(FILE,VALUE) \
-  fprintf ((FILE), "%s0x%x\n", UNALIGNED_SHORT_ASM_OP, (unsigned) VALUE)
+  dw2_asm_output_data (2, VALUE, NULL)
 #endif
 
 #ifndef ASM_OUTPUT_DWARF_DATA4
 #define ASM_OUTPUT_DWARF_DATA4(FILE,VALUE) \
-  fprintf ((FILE), "%s0x%x\n", UNALIGNED_INT_ASM_OP, (unsigned) VALUE)
+  dw2_asm_output_data (4, VALUE, NULL)
 #endif
 
 #ifndef ASM_OUTPUT_DWARF_DATA8
 #define ASM_OUTPUT_DWARF_DATA8(FILE,HIGH_VALUE,LOW_VALUE)              \
-  do {                                                                 \
-    if (WORDS_BIG_ENDIAN)                                              \
-      {                                                                        \
-       fprintf ((FILE), "%s0x%x\n", UNALIGNED_INT_ASM_OP, HIGH_VALUE); \
-       fprintf ((FILE), "%s0x%x\n", UNALIGNED_INT_ASM_OP, LOW_VALUE);  \
-      }                                                                        \
-    else                                                               \
-      {                                                                        \
-       fprintf ((FILE), "%s0x%x\n", UNALIGNED_INT_ASM_OP, LOW_VALUE);  \
-       fprintf ((FILE), "%s0x%x\n", UNALIGNED_INT_ASM_OP, HIGH_VALUE); \
-      }                                                                        \
-  } while (0)
+  dw2_asm_output_data (8, VALUE, NULL)
 #endif
 
 /* ASM_OUTPUT_DWARF_STRING is defined to output an ascii string, but to
    NOT issue a trailing newline. We define ASM_OUTPUT_DWARF_STRING_NEWLINE
    based on whether ASM_OUTPUT_DWARF_STRING is defined or not. If it is
    defined, we call it, then issue the line feed. If not, we supply a
-   default defintion of calling ASM_OUTPUT_ASCII */
+   default definition of calling ASM_OUTPUT_ASCII */
 
 #ifndef ASM_OUTPUT_DWARF_STRING
 #define ASM_OUTPUT_DWARF_STRING_NEWLINE(FILE,P) \
@@ -1393,7 +1320,7 @@ struct gcc_debug_hooks dwarf_debug_hooks =
 
 static inline int
 is_pseudo_reg (rtl)
-     register rtx rtl;
+     rtx rtl;
 {
   return (((GET_CODE (rtl) == REG) && (REGNO (rtl) >= FIRST_PSEUDO_REGISTER))
           || ((GET_CODE (rtl) == SUBREG)
@@ -1402,7 +1329,7 @@ is_pseudo_reg (rtl)
 
 static inline tree
 type_main_variant (type)
-     register tree type;
+     tree type;
 {
   type = TYPE_MAIN_VARIANT (type);
 
@@ -1424,9 +1351,9 @@ type_main_variant (type)
 
 static inline int
 is_tagged_type (type)
-     register tree type;
+     tree type;
 {
-  register enum tree_code code = TREE_CODE (type);
+  enum tree_code code = TREE_CODE (type);
 
   return (code == RECORD_TYPE || code == UNION_TYPE
          || code == QUAL_UNION_TYPE || code == ENUMERAL_TYPE);
@@ -1434,7 +1361,7 @@ is_tagged_type (type)
 
 static const char *
 dwarf_tag_name (tag)
-     register unsigned tag;
+     unsigned tag;
 {
   switch (tag)
     {
@@ -1484,7 +1411,7 @@ dwarf_tag_name (tag)
 
 static const char *
 dwarf_attr_name (attr)
-     register unsigned attr;
+     unsigned attr;
 {
   switch (attr)
     {
@@ -1562,7 +1489,7 @@ dwarf_attr_name (attr)
 
 static const char *
 dwarf_stack_op_name (op)
-     register unsigned op;
+     unsigned op;
 {
   switch (op)
     {
@@ -1579,7 +1506,7 @@ dwarf_stack_op_name (op)
 
 static const char *
 dwarf_typemod_name (mod)
-     register unsigned mod;
+     unsigned mod;
 {
   switch (mod)
     {
@@ -1593,7 +1520,7 @@ dwarf_typemod_name (mod)
 
 static const char *
 dwarf_fmt_byte_name (fmt)
-     register unsigned fmt;
+     unsigned fmt;
 {
   switch (fmt)
     {
@@ -1612,7 +1539,7 @@ dwarf_fmt_byte_name (fmt)
 
 static const char *
 dwarf_fund_type_name (ft)
-     register unsigned ft;
+     unsigned ft;
 {
   switch (ft)
     {
@@ -1678,7 +1605,7 @@ dwarf_fund_type_name (ft)
 
 static tree
 decl_ultimate_origin (decl)
-     register tree decl;
+     tree decl;
 {
 #ifdef ENABLE_CHECKING 
   if (DECL_FROM_INLINE (DECL_ORIGIN (decl)))
@@ -1698,16 +1625,16 @@ decl_ultimate_origin (decl)
 
 static tree
 block_ultimate_origin (block)
-     register tree block;
+     tree block;
 {
-  register tree immediate_origin = BLOCK_ABSTRACT_ORIGIN (block);
+  tree immediate_origin = BLOCK_ABSTRACT_ORIGIN (block);
 
   if (immediate_origin == NULL)
     return NULL;
   else
     {
-      register tree ret_val;
-      register tree lookahead = immediate_origin;
+      tree ret_val;
+      tree lookahead = immediate_origin;
 
       do
        {
@@ -1745,37 +1672,34 @@ decl_class_context (decl)
 #if 0
 static void
 output_unsigned_leb128 (value)
-     register unsigned long value;
+     unsigned long value;
 {
-  register unsigned long orig_value = value;
+  unsigned long orig_value = value;
 
   do
     {
-      register unsigned byte = (value & 0x7f);
+      unsigned byte = (value & 0x7f);
 
       value >>= 7;
       if (value != 0)  /* more bytes to follow */
        byte |= 0x80;
-      fprintf (asm_out_file, "%s0x%x", ASM_BYTE_OP, (unsigned) byte);
-      if (flag_debug_asm && value == 0)
-       fprintf (asm_out_file, "\t%s ULEB128 number - value = %lu",
-                ASM_COMMENT_START, orig_value);
-      fputc ('\n', asm_out_file);
+      dw2_asm_output_data (1, byte, "\t%s ULEB128 number - value = %lu",
+                          orig_value);
     }
   while (value != 0);
 }
 
 static void
 output_signed_leb128 (value)
-     register long value;
+     long value;
 {
-  register long orig_value = value;
-  register int negative = (value < 0);
-  register int more;
+  long orig_value = value;
+  int negative = (value < 0);
+  int more;
 
   do
     {
-      register unsigned byte = (value & 0x7f);
+      unsigned byte = (value & 0x7f);
 
       value >>= 7;
       if (negative)
@@ -1788,11 +1712,8 @@ output_signed_leb128 (value)
          byte |= 0x80;
          more = 1;
        }
-      fprintf (asm_out_file, "%s0x%x", ASM_BYTE_OP, (unsigned) byte);
-      if (flag_debug_asm && more == 0)
-       fprintf (asm_out_file, "\t%s SLEB128 number - value = %ld",
-                ASM_COMMENT_START, orig_value);
-      fputc ('\n', asm_out_file);
+      dw2_asm_output_data (1, byte, "\t%s SLEB128 number - value = %ld",
+                          orig_value);
     }
   while (more);
 }
@@ -1817,7 +1738,7 @@ output_signed_leb128 (value)
 
        struct s { my_type f; };
 
-   Since we may be stuck here without enought information to do exactly
+   Since we may be stuck here without enough information to do exactly
    what is called for in the Dwarf draft specification, we do the best
    that we can under the circumstances and always use the "plain" integral
    fundamental type codes for int, short, and long types.  That's probably
@@ -1826,7 +1747,7 @@ output_signed_leb128 (value)
 
 static int
 fundamental_type_code (type)
-     register tree type;
+     tree type;
 {
   if (TREE_CODE (type) == ERROR_MARK)
     return 0;
@@ -1911,7 +1832,7 @@ fundamental_type_code (type)
            const char *const name =
              IDENTIFIER_POINTER (DECL_NAME (TYPE_NAME (type)));
 
-           /* Note that here we can run afowl of a serious bug in "classic"
+           /* Note that here we can run afoul of a serious bug in "classic"
               svr4 SDB debuggers.  They don't seem to understand the
               FT_ext_prec_float type (even though they should).  */
 
@@ -1933,7 +1854,7 @@ fundamental_type_code (type)
        if (TYPE_PRECISION (type) == FLOAT_TYPE_SIZE)
          return FT_float;
 
-       /* Note that here we can run afowl of a serious bug in "classic"
+       /* Note that here we can run afoul of a serious bug in "classic"
           svr4 SDB debuggers.  They don't seem to understand the
           FT_ext_prec_float type (even though they should).  */
 
@@ -1968,8 +1889,8 @@ fundamental_type_code (type)
 
 static tree
 root_type_1 (type, count)
-     register tree type;
-     register int count;
+     tree type;
+     int count;
 {
   /* Give up after searching 1000 levels, in case this is a recursive
      pointer type.  Such types are possible in Ada, but it is not possible
@@ -1993,7 +1914,7 @@ root_type_1 (type, count)
 
 static tree
 root_type (type)
-     register tree type;
+     tree type;
 {
   type = root_type_1 (type, 0);
   if (type != error_mark_node)
@@ -2006,10 +1927,10 @@ root_type (type)
 
 static void
 write_modifier_bytes_1 (type, decl_const, decl_volatile, count)
-     register tree type;
-     register int decl_const;
-     register int decl_volatile;
-     register int count;
+     tree type;
+     int decl_const;
+     int decl_volatile;
+     int count;
 {
   if (TREE_CODE (type) == ERROR_MARK)
     return;
@@ -2044,9 +1965,9 @@ write_modifier_bytes_1 (type, decl_const, decl_volatile, count)
 
 static void
 write_modifier_bytes (type, decl_const, decl_volatile)
-     register tree type;
-     register int decl_const;
-     register int decl_volatile;
+     tree type;
+     int decl_const;
+     int decl_volatile;
 {
   write_modifier_bytes_1 (type, decl_const, decl_volatile, 0);
 }
@@ -2056,7 +1977,7 @@ write_modifier_bytes (type, decl_const, decl_volatile)
 
 static inline int
 type_is_fundamental (type)
-     register tree type;
+     tree type;
 {
   switch (TREE_CODE (type))
     {
@@ -2106,7 +2027,7 @@ type_is_fundamental (type)
 
 static void
 equate_decl_number_to_die_number (decl)
-     register tree decl;
+     tree decl;
 {
   /* In the case where we are generating a DIE for some ..._DECL node
      which represents either some inline function declaration or some
@@ -2138,7 +2059,7 @@ equate_decl_number_to_die_number (decl)
 
 static inline void
 equate_type_number_to_die_number (type)
-     register tree type;
+     tree type;
 {
   char type_label[MAX_ARTIFICIAL_LABEL_BYTES];
   char die_label[MAX_ARTIFICIAL_LABEL_BYTES];
@@ -2157,9 +2078,9 @@ equate_type_number_to_die_number (type)
 
 static void
 output_reg_number (rtl)
-     register rtx rtl;
+     rtx rtl;
 {
-  register unsigned regno = REGNO (rtl);
+  unsigned regno = REGNO (rtl);
 
   if (regno >= DWARF_FRAME_REGISTERS)
     {
@@ -2167,8 +2088,7 @@ output_reg_number (rtl)
                         regno);
       regno = 0;
     }
-  fprintf (asm_out_file, "%s0x%x",
-          UNALIGNED_INT_ASM_OP, DBX_REGISTER_NUMBER (regno));
+  dw2_assemble_integer (4, GEN_INT (DBX_REGISTER_NUMBER (regno)));
   if (flag_debug_asm)
     {
       fprintf (asm_out_file, "\t%s ", ASM_COMMENT_START);
@@ -2189,7 +2109,7 @@ output_reg_number (rtl)
 
 static void
 output_mem_loc_descriptor (rtl)
-      register rtx rtl;
+     rtx rtl;
 {
   /* Note that for a dynamically sized array, the location we will
      generate a description of here will be the lowest numbered location
@@ -2282,7 +2202,7 @@ output_mem_loc_descriptor (rtl)
 
 static void
 output_loc_descriptor (rtl)
-     register rtx rtl;
+     rtx rtl;
 {
   switch (GET_CODE (rtl))
     {
@@ -2316,9 +2236,9 @@ output_loc_descriptor (rtl)
 
 static void
 output_bound_representation (bound, dim_num, u_or_l)
-     register tree bound;
-     register unsigned dim_num; /* For multi-dimensional arrays.  */
-     register char u_or_l;     /* Designates upper or lower bound.  */
+     tree bound;
+     unsigned dim_num; /* For multi-dimensional arrays.  */
+     char u_or_l;      /* Designates upper or lower bound.  */
 {
   switch (TREE_CODE (bound))
     {
@@ -2399,7 +2319,7 @@ output_bound_representation (bound, dim_num, u_or_l)
 
 static void
 output_enumeral_list (link)
-     register tree link;
+     tree link;
 {
   if (link)
     {
@@ -2419,8 +2339,8 @@ output_enumeral_list (link)
 
 static inline HOST_WIDE_INT
 ceiling (value, boundary)
-     register HOST_WIDE_INT value;
-     register unsigned int boundary;
+     HOST_WIDE_INT value;
+     unsigned int boundary;
 {
   return (((value + boundary - 1) / boundary) * boundary);
 }
@@ -2431,9 +2351,9 @@ ceiling (value, boundary)
 
 static inline tree
 field_type (decl)
-     register tree decl;
+     tree decl;
 {
-  register tree type;
+  tree type;
 
   if (TREE_CODE (decl) == ERROR_MARK)
     return integer_type_node;
@@ -2450,7 +2370,7 @@ field_type (decl)
 
 static inline unsigned int
 simple_type_align_in_bits (type)
-     register tree type;
+     tree type;
 {
   return (TREE_CODE (type) != ERROR_MARK) ? TYPE_ALIGN (type) : BITS_PER_WORD;
 }
@@ -2463,7 +2383,7 @@ simple_type_align_in_bits (type)
 
 static inline unsigned HOST_WIDE_INT
 simple_type_size_in_bits (type)
-     register tree type;
+     tree type;
 {
   tree type_size_tree;
 
@@ -2487,7 +2407,7 @@ simple_type_size_in_bits (type)
 
 static HOST_WIDE_INT
 field_byte_offset (decl)
-     register tree decl;
+     tree decl;
 {
   unsigned int type_align_in_bytes;
   unsigned int type_align_in_bits;
@@ -2647,7 +2567,7 @@ sibling_attribute ()
 
 static void
 location_attribute (rtl)
-     register rtx rtl;
+     rtx rtl;
 {
   char begin_label[MAX_ARTIFICIAL_LABEL_BYTES];
   char end_label[MAX_ARTIFICIAL_LABEL_BYTES];
@@ -2710,9 +2630,9 @@ location_attribute (rtl)
 
 static void
 data_member_location_attribute (t)
-     register tree t;
+     tree t;
 {
-  register unsigned object_offset_in_bytes;
+  unsigned object_offset_in_bytes;
   char begin_label[MAX_ARTIFICIAL_LABEL_BYTES];
   char end_label[MAX_ARTIFICIAL_LABEL_BYTES];
 
@@ -2740,7 +2660,7 @@ data_member_location_attribute (t)
 
 static void
 const_value_attribute (rtl)
-     register rtx rtl;
+     rtx rtl;
 {
   char begin_label[MAX_ARTIFICIAL_LABEL_BYTES];
   char end_label[MAX_ARTIFICIAL_LABEL_BYTES];
@@ -2825,9 +2745,9 @@ const_value_attribute (rtl)
 
 static void
 location_or_const_value_attribute (decl)
-     register tree decl;
+     tree decl;
 {
-  register rtx rtl;
+  rtx rtl;
 
   if (TREE_CODE (decl) == ERROR_MARK)
     return;
@@ -2919,8 +2839,8 @@ location_or_const_value_attribute (decl)
     if (rtl == NULL_RTX || is_pseudo_reg (rtl))
       {
        /* This decl represents a formal parameter which was optimized out.  */
-        register tree declared_type = type_main_variant (TREE_TYPE (decl));
-        register tree passed_type = type_main_variant (DECL_ARG_TYPE (decl));
+        tree declared_type = type_main_variant (TREE_TYPE (decl));
+        tree passed_type = type_main_variant (DECL_ARG_TYPE (decl));
 
        /* Note that DECL_INCOMING_RTL may be NULL in here, but we handle
           *all* cases where (rtl == NULL_RTX) just below.  */
@@ -2985,7 +2905,7 @@ location_or_const_value_attribute (decl)
 
 static inline void
 name_attribute (name_string)
-     register const char *name_string;
+     const char *name_string;
 {
   if (name_string && *name_string)
     {
@@ -2996,7 +2916,7 @@ name_attribute (name_string)
 
 static inline void
 fund_type_attribute (ft_code)
-     register unsigned ft_code;
+     unsigned ft_code;
 {
   ASM_OUTPUT_DWARF_ATTRIBUTE (asm_out_file, AT_fund_type);
   ASM_OUTPUT_DWARF_FUND_TYPE (asm_out_file, ft_code);
@@ -3004,9 +2924,9 @@ fund_type_attribute (ft_code)
 
 static void
 mod_fund_type_attribute (type, decl_const, decl_volatile)
-     register tree type;
-     register int decl_const;
-     register int decl_volatile;
+     tree type;
+     int decl_const;
+     int decl_volatile;
 {
   char begin_label[MAX_ARTIFICIAL_LABEL_BYTES];
   char end_label[MAX_ARTIFICIAL_LABEL_BYTES];
@@ -3024,7 +2944,7 @@ mod_fund_type_attribute (type, decl_const, decl_volatile)
 
 static inline void
 user_def_type_attribute (type)
-     register tree type;
+     tree type;
 {
   char ud_type_name[MAX_ARTIFICIAL_LABEL_BYTES];
 
@@ -3035,9 +2955,9 @@ user_def_type_attribute (type)
 
 static void
 mod_u_d_type_attribute (type, decl_const, decl_volatile)
-     register tree type;
-     register int decl_const;
-     register int decl_volatile;
+     tree type;
+     int decl_const;
+     int decl_volatile;
 {
   char begin_label[MAX_ARTIFICIAL_LABEL_BYTES];
   char end_label[MAX_ARTIFICIAL_LABEL_BYTES];
@@ -3057,7 +2977,7 @@ mod_u_d_type_attribute (type, decl_const, decl_volatile)
 #ifdef USE_ORDERING_ATTRIBUTE
 static inline void
 ordering_attribute (ordering)
-     register unsigned ordering;
+     unsigned ordering;
 {
   ASM_OUTPUT_DWARF_ATTRIBUTE (asm_out_file, AT_ordering);
   ASM_OUTPUT_DWARF_DATA2 (asm_out_file, ordering);
@@ -3069,9 +2989,9 @@ ordering_attribute (ordering)
 
 static void
 subscript_data_attribute (type)
-     register tree type;
+     tree type;
 {
-  register unsigned dimension_number;
+  unsigned dimension_number;
   char begin_label[MAX_ARTIFICIAL_LABEL_BYTES];
   char end_label[MAX_ARTIFICIAL_LABEL_BYTES];
 
@@ -3094,7 +3014,7 @@ subscript_data_attribute (type)
        TREE_CODE (type) == ARRAY_TYPE;
        type = TREE_TYPE (type), dimension_number++)
     {
-      register tree domain = TYPE_DOMAIN (type);
+      tree domain = TYPE_DOMAIN (type);
 
       /* Arrays come in three flavors. Unspecified bounds, fixed
         bounds, and (in GNU C only) variable bounds.  Handle all
@@ -3104,8 +3024,8 @@ subscript_data_attribute (type)
        {
          /* We have an array type with specified bounds.  */
 
-         register tree lower = TYPE_MIN_VALUE (domain);
-         register tree upper = TYPE_MAX_VALUE (domain);
+         tree lower = TYPE_MIN_VALUE (domain);
+         tree upper = TYPE_MAX_VALUE (domain);
 
          /* Handle only fundamental types as index types for now.  */
          if (! type_is_fundamental (domain))
@@ -3168,9 +3088,9 @@ subscript_data_attribute (type)
 
 static void
 byte_size_attribute (tree_node)
-     register tree tree_node;
+     tree tree_node;
 {
-  register unsigned size;
+  unsigned size;
 
   ASM_OUTPUT_DWARF_ATTRIBUTE (asm_out_file, AT_byte_size);
   switch (TREE_CODE (tree_node))
@@ -3228,7 +3148,7 @@ byte_size_attribute (tree_node)
 
 static inline void
 bit_offset_attribute (decl)
-    register tree decl;
+     tree decl;
 {
   HOST_WIDE_INT object_offset_in_bytes = field_byte_offset (decl);
   tree type = DECL_BIT_FIELD_TYPE (decl);
@@ -3281,7 +3201,7 @@ bit_offset_attribute (decl)
 
 static inline void
 bit_size_attribute (decl)
-    register tree decl;
+    tree decl;
 {
   /* Must be a field and a bit field.  */
   if (TREE_CODE (decl) != FIELD_DECL
@@ -3303,7 +3223,7 @@ bit_size_attribute (decl)
 
 static inline void
 element_list_attribute (element)
-     register tree element;
+     tree element;
 {
   char begin_label[MAX_ARTIFICIAL_LABEL_BYTES];
   char end_label[MAX_ARTIFICIAL_LABEL_BYTES];
@@ -3329,7 +3249,7 @@ element_list_attribute (element)
 
 static inline void
 stmt_list_attribute (label)
-    register const char *label;
+    const char *label;
 {
   ASM_OUTPUT_DWARF_ATTRIBUTE (asm_out_file, AT_stmt_list);
   /* Don't use ASM_OUTPUT_DWARF_DATA4 here.  */
@@ -3341,7 +3261,7 @@ stmt_list_attribute (label)
 
 static inline void
 low_pc_attribute (asm_low_label)
-     register const char *asm_low_label;
+     const char *asm_low_label;
 {
   ASM_OUTPUT_DWARF_ATTRIBUTE (asm_out_file, AT_low_pc);
   ASM_OUTPUT_DWARF_ADDR (asm_out_file, asm_low_label);
@@ -3352,7 +3272,7 @@ low_pc_attribute (asm_low_label)
 
 static inline void
 high_pc_attribute (asm_high_label)
-    register const char *asm_high_label;
+     const char *asm_high_label;
 {
   ASM_OUTPUT_DWARF_ATTRIBUTE (asm_out_file, AT_high_pc);
   ASM_OUTPUT_DWARF_ADDR (asm_out_file, asm_high_label);
@@ -3362,7 +3282,7 @@ high_pc_attribute (asm_high_label)
 
 static inline void
 body_begin_attribute (asm_begin_label)
-     register const char *asm_begin_label;
+     const char *asm_begin_label;
 {
   ASM_OUTPUT_DWARF_ATTRIBUTE (asm_out_file, AT_body_begin);
   ASM_OUTPUT_DWARF_ADDR (asm_out_file, asm_begin_label);
@@ -3372,7 +3292,7 @@ body_begin_attribute (asm_begin_label)
 
 static inline void
 body_end_attribute (asm_end_label)
-     register const char *asm_end_label;
+     const char *asm_end_label;
 {
   ASM_OUTPUT_DWARF_ATTRIBUTE (asm_out_file, AT_body_end);
   ASM_OUTPUT_DWARF_ADDR (asm_out_file, asm_end_label);
@@ -3383,7 +3303,7 @@ body_end_attribute (asm_end_label)
 
 static inline void
 language_attribute (language_code)
-     register unsigned language_code;
+     unsigned language_code;
 {
   ASM_OUTPUT_DWARF_ATTRIBUTE (asm_out_file, AT_language);
   ASM_OUTPUT_DWARF_DATA4 (asm_out_file, language_code);
@@ -3391,7 +3311,7 @@ language_attribute (language_code)
 
 static inline void
 member_attribute (context)
-    register tree context;
+     tree context;
 {
   char label[MAX_ARTIFICIAL_LABEL_BYTES];
 
@@ -3408,7 +3328,7 @@ member_attribute (context)
 #if 0
 static inline void
 string_length_attribute (upper_bound)
-     register tree upper_bound;
+     tree upper_bound;
 {
   char begin_label[MAX_ARTIFICIAL_LABEL_BYTES];
   char end_label[MAX_ARTIFICIAL_LABEL_BYTES];
@@ -3425,7 +3345,7 @@ string_length_attribute (upper_bound)
 
 static inline void
 comp_dir_attribute (dirname)
-     register const char *dirname;
+     const char *dirname;
 {
   ASM_OUTPUT_DWARF_ATTRIBUTE (asm_out_file, AT_comp_dir);
   ASM_OUTPUT_DWARF_STRING_NEWLINE (asm_out_file, dirname);
@@ -3433,7 +3353,7 @@ comp_dir_attribute (dirname)
 
 static inline void
 sf_names_attribute (sf_names_start_label)
-     register const char *sf_names_start_label;
+     const char *sf_names_start_label;
 {
   ASM_OUTPUT_DWARF_ATTRIBUTE (asm_out_file, AT_sf_names);
   /* Don't use ASM_OUTPUT_DWARF_DATA4 here.  */
@@ -3442,7 +3362,7 @@ sf_names_attribute (sf_names_start_label)
 
 static inline void
 src_info_attribute (src_info_start_label)
-     register const char *src_info_start_label;
+     const char *src_info_start_label;
 {
   ASM_OUTPUT_DWARF_ATTRIBUTE (asm_out_file, AT_src_info);
   /* Don't use ASM_OUTPUT_DWARF_DATA4 here.  */
@@ -3451,7 +3371,7 @@ src_info_attribute (src_info_start_label)
 
 static inline void
 mac_info_attribute (mac_info_start_label)
-     register const char *mac_info_start_label;
+     const char *mac_info_start_label;
 {
   ASM_OUTPUT_DWARF_ATTRIBUTE (asm_out_file, AT_mac_info);
   /* Don't use ASM_OUTPUT_DWARF_DATA4 here.  */
@@ -3460,9 +3380,9 @@ mac_info_attribute (mac_info_start_label)
 
 static inline void
 prototyped_attribute (func_type)
-     register tree func_type;
+     tree func_type;
 {
-  if ((strcmp (language_string, "GNU C") == 0)
+  if ((strcmp (lang_hooks.name, "GNU C") == 0)
       && (TYPE_ARG_TYPES (func_type) != NULL))
     {
       ASM_OUTPUT_DWARF_ATTRIBUTE (asm_out_file, AT_prototyped);
@@ -3472,7 +3392,7 @@ prototyped_attribute (func_type)
 
 static inline void
 producer_attribute (producer)
-     register const char *producer;
+     const char *producer;
 {
   ASM_OUTPUT_DWARF_ATTRIBUTE (asm_out_file, AT_producer);
   ASM_OUTPUT_DWARF_STRING_NEWLINE (asm_out_file, producer);
@@ -3480,7 +3400,7 @@ producer_attribute (producer)
 
 static inline void
 inline_attribute (decl)
-     register tree decl;
+     tree decl;
 {
   if (DECL_INLINE (decl))
     {
@@ -3491,7 +3411,7 @@ inline_attribute (decl)
 
 static inline void
 containing_type_attribute (containing_type)
-     register tree containing_type;
+     tree containing_type;
 {
   char label[MAX_ARTIFICIAL_LABEL_BYTES];
 
@@ -3502,7 +3422,7 @@ containing_type_attribute (containing_type)
 
 static inline void
 abstract_origin_attribute (origin)
-     register tree origin;
+     tree origin;
 {
   char label[MAX_ARTIFICIAL_LABEL_BYTES];
 
@@ -3527,8 +3447,8 @@ abstract_origin_attribute (origin)
 #ifdef DWARF_DECL_COORDINATES
 static inline void
 src_coords_attribute (src_fileno, src_lineno)
-     register unsigned src_fileno;
-     register unsigned src_lineno;
+     unsigned src_fileno;
+     unsigned src_lineno;
 {
   ASM_OUTPUT_DWARF_ATTRIBUTE (asm_out_file, AT_src_coords);
   ASM_OUTPUT_DWARF_DATA2 (asm_out_file, src_fileno);
@@ -3538,7 +3458,7 @@ src_coords_attribute (src_fileno, src_lineno)
 
 static inline void
 pure_or_virtual_attribute (func_decl)
-     register tree func_decl;
+     tree func_decl;
 {
   if (DECL_VIRTUAL_P (func_decl))
     {
@@ -3561,9 +3481,9 @@ pure_or_virtual_attribute (func_decl)
 
 static void
 name_and_src_coords_attributes (decl)
-    register tree decl;
+    tree decl;
 {
-  register tree decl_name = DECL_NAME (decl);
+  tree decl_name = DECL_NAME (decl);
 
   if (decl_name && IDENTIFIER_POINTER (decl_name))
     {
@@ -3597,12 +3517,12 @@ name_and_src_coords_attributes (decl)
 
 static void
 type_attribute (type, decl_const, decl_volatile)
-     register tree type;
-     register int decl_const;
-     register int decl_volatile;
+     tree type;
+     int decl_const;
+     int decl_volatile;
 {
-  register enum tree_code code = TREE_CODE (type);
-  register int root_type_modified;
+  enum tree_code code = TREE_CODE (type);
+  int root_type_modified;
 
   if (code == ERROR_MARK)
     return;
@@ -3655,13 +3575,13 @@ type_attribute (type, decl_const, decl_volatile)
 
 static const char *
 type_tag (type)
-     register tree type;
+     tree type;
 {
-  register const char *name = 0;
+  const char *name = 0;
 
   if (TYPE_NAME (type) != 0)
     {
-      register tree t = 0;
+      tree t = 0;
 
       /* Find the IDENTIFIER_NODE for the type name.  */
       if (TREE_CODE (TYPE_NAME (type)) == IDENTIFIER_NODE)
@@ -3711,7 +3631,7 @@ dienum_pop ()
 
 static inline tree
 member_declared_type (member)
-     register tree member;
+     tree member;
 {
   return (DECL_BIT_FIELD_TYPE (member))
           ? DECL_BIT_FIELD_TYPE (member)
@@ -3724,7 +3644,7 @@ member_declared_type (member)
 
 static const char *
 function_start_label (decl)
-    register tree decl;
+    tree decl;
 {
   rtx x;
   const char *fnname;
@@ -3748,9 +3668,9 @@ function_start_label (decl)
 
 static void
 output_array_type_die (arg)
-     register void *arg;
+     void *arg;
 {
-  register tree type = arg;
+  tree type = arg;
 
   ASM_OUTPUT_DWARF_TAG (asm_out_file, TAG_array_type);
   sibling_attribute ();
@@ -3775,9 +3695,9 @@ output_array_type_die (arg)
 
 static void
 output_set_type_die (arg)
-     register void *arg;
+     void *arg;
 {
-  register tree type = arg;
+  tree type = arg;
 
   ASM_OUTPUT_DWARF_TAG (asm_out_file, TAG_set_type);
   sibling_attribute ();
@@ -3791,10 +3711,10 @@ output_set_type_die (arg)
 
 static void
 output_entry_point_die (arg)
-     register void *arg;
+     void *arg;
 {
-  register tree decl = arg;
-  register tree origin = decl_ultimate_origin (decl);
+  tree decl = arg;
+  tree origin = decl_ultimate_origin (decl);
 
   ASM_OUTPUT_DWARF_TAG (asm_out_file, TAG_entry_point);
   sibling_attribute ();
@@ -3818,9 +3738,9 @@ output_entry_point_die (arg)
 
 static void
 output_inlined_enumeration_type_die (arg)
-     register void *arg;
+     void *arg;
 {
-  register tree type = arg;
+  tree type = arg;
 
   ASM_OUTPUT_DWARF_TAG (asm_out_file, TAG_enumeration_type);
   sibling_attribute ();
@@ -3833,9 +3753,9 @@ output_inlined_enumeration_type_die (arg)
 
 static void
 output_inlined_structure_type_die (arg)
-     register void *arg;
+     void *arg;
 {
-  register tree type = arg;
+  tree type = arg;
 
   ASM_OUTPUT_DWARF_TAG (asm_out_file, TAG_structure_type);
   sibling_attribute ();
@@ -3848,9 +3768,9 @@ output_inlined_structure_type_die (arg)
 
 static void
 output_inlined_union_type_die (arg)
-     register void *arg;
+     void *arg;
 {
-  register tree type = arg;
+  tree type = arg;
 
   ASM_OUTPUT_DWARF_TAG (asm_out_file, TAG_union_type);
   sibling_attribute ();
@@ -3865,9 +3785,9 @@ output_inlined_union_type_die (arg)
 
 static void
 output_enumeration_type_die (arg)
-     register void *arg;
+     void *arg;
 {
-  register tree type = arg;
+  tree type = arg;
 
   ASM_OUTPUT_DWARF_TAG (asm_out_file, TAG_enumeration_type);
   sibling_attribute ();
@@ -3901,9 +3821,9 @@ output_enumeration_type_die (arg)
 
 static void
 output_formal_parameter_die (arg)
-     register void *arg;
+     void *arg;
 {
-  register tree node = arg;
+  tree node = arg;
 
   ASM_OUTPUT_DWARF_TAG (asm_out_file, TAG_formal_parameter);
   sibling_attribute ();
@@ -3943,10 +3863,10 @@ output_formal_parameter_die (arg)
 
 static void
 output_global_subroutine_die (arg)
-     register void *arg;
+     void *arg;
 {
-  register tree decl = arg;
-  register tree origin = decl_ultimate_origin (decl);
+  tree decl = arg;
+  tree origin = decl_ultimate_origin (decl);
 
   ASM_OUTPUT_DWARF_TAG (asm_out_file, TAG_global_subroutine);
   sibling_attribute ();
@@ -3955,7 +3875,7 @@ output_global_subroutine_die (arg)
     abstract_origin_attribute (origin);
   else
     {
-      register tree type = TREE_TYPE (decl);
+      tree type = TREE_TYPE (decl);
 
       name_and_src_coords_attributes (decl);
       inline_attribute (decl);
@@ -3992,10 +3912,10 @@ output_global_subroutine_die (arg)
 
 static void
 output_global_variable_die (arg)
-     register void *arg;
+     void *arg;
 {
-  register tree decl = arg;
-  register tree origin = decl_ultimate_origin (decl);
+  tree decl = arg;
+  tree origin = decl_ultimate_origin (decl);
 
   ASM_OUTPUT_DWARF_TAG (asm_out_file, TAG_global_variable);
   sibling_attribute ();
@@ -4020,10 +3940,10 @@ output_global_variable_die (arg)
 
 static void
 output_label_die (arg)
-     register void *arg;
+     void *arg;
 {
-  register tree decl = arg;
-  register tree origin = decl_ultimate_origin (decl);
+  tree decl = arg;
+  tree origin = decl_ultimate_origin (decl);
 
   ASM_OUTPUT_DWARF_TAG (asm_out_file, TAG_label);
   sibling_attribute ();
@@ -4035,7 +3955,7 @@ output_label_die (arg)
     equate_decl_number_to_die_number (decl);
   else
     {
-      register rtx insn = DECL_RTL (decl);
+      rtx insn = DECL_RTL (decl);
 
       /* Deleted labels are programmer specified labels which have been
         eliminated because of various optimisations.  We still emit them
@@ -4063,9 +3983,9 @@ output_label_die (arg)
 
 static void
 output_lexical_block_die (arg)
-     register void *arg;
+     void *arg;
 {
-  register tree stmt = arg;
+  tree stmt = arg;
 
   ASM_OUTPUT_DWARF_TAG (asm_out_file, TAG_lexical_block);
   sibling_attribute ();
@@ -4084,9 +4004,9 @@ output_lexical_block_die (arg)
 
 static void
 output_inlined_subroutine_die (arg)
-     register void *arg;
+     void *arg;
 {
-  register tree stmt = arg;
+  tree stmt = arg;
 
   ASM_OUTPUT_DWARF_TAG (asm_out_file, TAG_inlined_subroutine);
   sibling_attribute ();
@@ -4109,10 +4029,10 @@ output_inlined_subroutine_die (arg)
 
 static void
 output_local_variable_die (arg)
-     register void *arg;
+     void *arg;
 {
-  register tree decl = arg;
-  register tree origin = decl_ultimate_origin (decl);
+  tree decl = arg;
+  tree origin = decl_ultimate_origin (decl);
 
   ASM_OUTPUT_DWARF_TAG (asm_out_file, TAG_local_variable);
   sibling_attribute ();
@@ -4133,9 +4053,9 @@ output_local_variable_die (arg)
 
 static void
 output_member_die (arg)
-     register void *arg;
+     void *arg;
 {
-  register tree decl = arg;
+  tree decl = arg;
 
   ASM_OUTPUT_DWARF_TAG (asm_out_file, TAG_member);
   sibling_attribute ();
@@ -4162,9 +4082,9 @@ output_member_die (arg)
 
 static void
 output_pointer_type_die (arg)
-     register void *arg;
+     void *arg;
 {
-  register tree type = arg;
+  tree type = arg;
 
   ASM_OUTPUT_DWARF_TAG (asm_out_file, TAG_pointer_type);
   sibling_attribute ();
@@ -4175,9 +4095,9 @@ output_pointer_type_die (arg)
 
 static void
 output_reference_type_die (arg)
-     register void *arg;
+     void *arg;
 {
-  register tree type = arg;
+  tree type = arg;
 
   ASM_OUTPUT_DWARF_TAG (asm_out_file, TAG_reference_type);
   sibling_attribute ();
@@ -4189,9 +4109,9 @@ output_reference_type_die (arg)
 
 static void
 output_ptr_to_mbr_type_die (arg)
-     register void *arg;
+     void *arg;
 {
-  register tree type = arg;
+  tree type = arg;
 
   ASM_OUTPUT_DWARF_TAG (asm_out_file, TAG_ptr_to_member_type);
   sibling_attribute ();
@@ -4203,9 +4123,10 @@ output_ptr_to_mbr_type_die (arg)
 
 static void
 output_compile_unit_die (arg)
-     register void *arg;
+     void *arg;
 {
-  register const char *main_input_filename = arg;
+  const char *main_input_filename = arg;
+  const char *language_string = lang_hooks.name;
 
   ASM_OUTPUT_DWARF_TAG (asm_out_file, TAG_compile_unit);
   sibling_attribute ();
@@ -4229,15 +4150,12 @@ output_compile_unit_die (arg)
     language_attribute (LANG_PASCAL83);
   else if (strcmp (language_string, "GNU Java") == 0)
     language_attribute (LANG_JAVA);
-  else if (flag_traditional)
-    language_attribute (LANG_C);
   else
     language_attribute (LANG_C89);
   low_pc_attribute (TEXT_BEGIN_LABEL);
   high_pc_attribute (TEXT_END_LABEL);
   if (debug_info_level >= DINFO_LEVEL_NORMAL)
     stmt_list_attribute (LINE_BEGIN_LABEL);
-  last_filename = xstrdup (main_input_filename);
 
   {
     const char *wd = getpwd ();
@@ -4256,9 +4174,9 @@ output_compile_unit_die (arg)
 
 static void
 output_string_type_die (arg)
-     register void *arg;
+     void *arg;
 {
-  register tree type = arg;
+  tree type = arg;
 
   ASM_OUTPUT_DWARF_TAG (asm_out_file, TAG_string_type);
   sibling_attribute ();
@@ -4270,9 +4188,9 @@ output_string_type_die (arg)
 
 static void
 output_inheritance_die (arg)
-     register void *arg;
+     void *arg;
 {
-  register tree binfo = arg;
+  tree binfo = arg;
 
   ASM_OUTPUT_DWARF_TAG (asm_out_file, TAG_inheritance);
   sibling_attribute ();
@@ -4297,9 +4215,9 @@ output_inheritance_die (arg)
 
 static void
 output_structure_type_die (arg)
-     register void *arg;
+     void *arg;
 {
-  register tree type = arg;
+  tree type = arg;
 
   ASM_OUTPUT_DWARF_TAG (asm_out_file, TAG_structure_type);
   sibling_attribute ();
@@ -4325,10 +4243,10 @@ output_structure_type_die (arg)
 
 static void
 output_local_subroutine_die (arg)
-     register void *arg;
+     void *arg;
 {
-  register tree decl = arg;
-  register tree origin = decl_ultimate_origin (decl);
+  tree decl = arg;
+  tree origin = decl_ultimate_origin (decl);
 
   ASM_OUTPUT_DWARF_TAG (asm_out_file, TAG_subroutine);
   sibling_attribute ();
@@ -4337,7 +4255,7 @@ output_local_subroutine_die (arg)
     abstract_origin_attribute (origin);
   else
     {
-      register tree type = TREE_TYPE (decl);
+      tree type = TREE_TYPE (decl);
 
       name_and_src_coords_attributes (decl);
       inline_attribute (decl);
@@ -4372,10 +4290,10 @@ output_local_subroutine_die (arg)
 
 static void
 output_subroutine_type_die (arg)
-     register void *arg;
+     void *arg;
 {
-  register tree type = arg;
-  register tree return_type = TREE_TYPE (type);
+  tree type = arg;
+  tree return_type = TREE_TYPE (type);
 
   ASM_OUTPUT_DWARF_TAG (asm_out_file, TAG_subroutine_type);
   sibling_attribute ();
@@ -4388,10 +4306,10 @@ output_subroutine_type_die (arg)
 
 static void
 output_typedef_die (arg)
-     register void *arg;
+     void *arg;
 {
-  register tree decl = arg;
-  register tree origin = decl_ultimate_origin (decl);
+  tree decl = arg;
+  tree origin = decl_ultimate_origin (decl);
 
   ASM_OUTPUT_DWARF_TAG (asm_out_file, TAG_typedef);
   sibling_attribute ();
@@ -4410,9 +4328,9 @@ output_typedef_die (arg)
 
 static void
 output_union_type_die (arg)
-     register void *arg;
+     void *arg;
 {
-  register tree type = arg;
+  tree type = arg;
 
   ASM_OUTPUT_DWARF_TAG (asm_out_file, TAG_union_type);
   sibling_attribute ();
@@ -4438,9 +4356,9 @@ output_union_type_die (arg)
 
 static void
 output_unspecified_parameters_die (arg)
-     register void *arg;
+     void *arg;
 {
-  register tree decl_or_type = arg;
+  tree decl_or_type = arg;
 
   ASM_OUTPUT_DWARF_TAG (asm_out_file, TAG_unspecified_parameters);
   sibling_attribute ();
@@ -4464,7 +4382,7 @@ output_unspecified_parameters_die (arg)
 
 static void
 output_padded_null_die (arg)
-     register void *arg ATTRIBUTE_UNUSED;
+     void *arg ATTRIBUTE_UNUSED;
 {
   ASM_OUTPUT_ALIGN (asm_out_file, 2);  /* 2**2 == 4 */
 }
@@ -4479,8 +4397,8 @@ output_padded_null_die (arg)
 
 static void
 output_die (die_specific_output_function, param)
-     register void (*die_specific_output_function) PARAMS ((void *));
-     register void *param;
+     void (*die_specific_output_function) PARAMS ((void *));
+     void *param;
 {
   char begin_label[MAX_ARTIFICIAL_LABEL_BYTES];
   char end_label[MAX_ARTIFICIAL_LABEL_BYTES];
@@ -4543,11 +4461,11 @@ end_sibling_chain ()
 
 static void
 output_formal_types (function_or_method_type)
-     register tree function_or_method_type;
+     tree function_or_method_type;
 {
-  register tree link;
-  register tree formal_type = NULL;
-  register tree first_parm_type = TYPE_ARG_TYPES (function_or_method_type);
+  tree link;
+  tree formal_type = NULL;
+  tree first_parm_type = TYPE_ARG_TYPES (function_or_method_type);
 
   /* Set TREE_ASM_WRITTEN while processing the parameters, lest we
      get bogus recursion when outputting tagged types local to a
@@ -4608,7 +4526,7 @@ output_formal_types (function_or_method_type)
 
 static void
 pend_type (type)
-     register tree type;
+     tree type;
 {
   if (pending_types == pending_types_allocated)
     {
@@ -4664,8 +4582,8 @@ pend_type (type)
 
 static inline int
 type_ok_for_scope (type, scope)
-    register tree type;
-    register tree scope;
+    tree type;
+    tree scope;
 {
   /* Tagged types (i.e. struct, union, and enum types) must always be
      output only in the scopes where they actually belong (or else the
@@ -4701,18 +4619,18 @@ type_ok_for_scope (type, scope)
 
 static void
 output_pending_types_for_scope (containing_scope)
-     register tree containing_scope;
+     tree containing_scope;
 {
-  register unsigned i;
+  unsigned i;
 
   for (i = 0; i < pending_types; )
     {
-      register tree type = pending_types_list[i];
+      tree type = pending_types_list[i];
 
       if (type_ok_for_scope (type, containing_scope))
        {
-         register tree *mover;
-         register tree *limit;
+         tree *mover;
+         tree *limit;
 
          pending_types--;
          limit = &pending_types_list[pending_types];
@@ -4758,7 +4676,7 @@ add_incomplete_type (type)
 static void
 retry_incomplete_types ()
 {
-  register tree type;
+  tree type;
 
   finalizing = 1;
   while (incomplete_types)
@@ -4771,8 +4689,8 @@ retry_incomplete_types ()
 
 static void
 output_type (type, containing_scope)
-     register tree type;
-     register tree containing_scope;
+     tree type;
+     tree containing_scope;
 {
   if (type == 0 || type == error_mark_node)
     return;
@@ -4787,7 +4705,7 @@ output_type (type, containing_scope)
     {
       if (finalizing && AGGREGATE_TYPE_P (type))
        {
-         register tree member;
+         tree member;
 
          /* Some of our nested types might not have been defined when we
             were written out before; force them out now.  */
@@ -4885,7 +4803,7 @@ output_type (type, containing_scope)
          }
        else
          {
-           register tree element_type;
+           tree element_type;
 
            element_type = TREE_TYPE (type);
            while (TREE_CODE (element_type) == ARRAY_TYPE)
@@ -4977,7 +4895,7 @@ output_type (type, containing_scope)
           to output DIEs to represent the *types* of those members.
           However the `output_type' function (above) will specifically
           avoid generating type DIEs for member types *within* the list
-          of member DIEs for this (containing) type execpt for those
+          of member DIEs for this (containing) type except for those
           types (of members) which are explicitly marked as also being
           members of this (containing) type themselves.  The g++ front-
           end can force any given type to be treated as a member of some
@@ -5006,7 +4924,7 @@ output_type (type, containing_scope)
            ++in_class;
 
            {
-             register tree normal_member;
+             tree normal_member;
 
              /* Now output info about the data members and type members.  */
 
@@ -5017,7 +4935,7 @@ output_type (type, containing_scope)
            }
 
            {
-             register tree func_member;
+             tree func_member;
 
              /* Now output info about the function members (if any).  */
 
@@ -5066,7 +4984,7 @@ output_type (type, containing_scope)
 
 static void
 output_tagged_type_instantiation (type)
-     register tree type;
+     tree type;
 {
   if (type == 0 || type == error_mark_node)
     return;
@@ -5110,12 +5028,12 @@ output_tagged_type_instantiation (type)
 
 static void
 output_block (stmt, depth)
-    register tree stmt;
+    tree stmt;
     int depth;
 {
-  register int must_output_die = 0;
-  register tree origin;
-  register enum tree_code origin_code;
+  int must_output_die = 0;
+  tree origin;
+  enum tree_code origin_code;
 
   /* Ignore blocks never really used to make RTL.  */
 
@@ -5161,7 +5079,7 @@ output_block (stmt, depth)
            must_output_die = (BLOCK_VARS (stmt) != NULL);
          else
            {
-             register tree decl;
+             tree decl;
 
              /* We are in terse mode, so only local (nested) function
                 definitions count as "significant" local declarations.  */
@@ -5204,7 +5122,7 @@ output_block (stmt, depth)
 
 static void
 output_decls_for_scope (stmt, depth)
-     register tree stmt;
+     tree stmt;
      int depth;
 {
   /* Ignore blocks never really used to make RTL.  */
@@ -5217,7 +5135,7 @@ output_decls_for_scope (stmt, depth)
      but not within any nested sub-blocks.  */
 
   {
-    register tree decl;
+    tree decl;
 
     for (decl = BLOCK_VARS (stmt); decl; decl = TREE_CHAIN (decl))
       output_decl (decl, stmt);
@@ -5229,7 +5147,7 @@ output_decls_for_scope (stmt, depth)
      therein) of this block.    */
 
   {
-    register tree subblocks;
+    tree subblocks;
 
     for (subblocks = BLOCK_SUBBLOCKS (stmt);
          subblocks;
@@ -5242,7 +5160,7 @@ output_decls_for_scope (stmt, depth)
 
 static inline int
 is_redundant_typedef (decl)
-     register tree decl;
+     tree decl;
 {
   if (TYPE_DECL_IS_STUB (decl))
     return 1;
@@ -5260,8 +5178,8 @@ is_redundant_typedef (decl)
 
 static void
 output_decl (decl, containing_scope)
-     register tree decl;
-     register tree containing_scope;
+     tree decl;
+     tree containing_scope;
 {
   /* Make a note of the decl node we are going to be working on.  We may
      need to give the user the source coordinates of where it appeared in
@@ -5368,8 +5286,8 @@ output_decl (decl, containing_scope)
        {
          /* Generate DIEs to represent all known formal parameters */
 
-         register tree arg_decls = DECL_ARGUMENTS (decl);
-         register tree parm;
+         tree arg_decls = DECL_ARGUMENTS (decl);
+         tree parm;
 
          /* WARNING!  Kludge zone ahead!  Here we have a special
             hack for svr4 SDB compatibility.  Instead of passing the
@@ -5437,7 +5355,7 @@ output_decl (decl, containing_scope)
          */
 
          {
-           register tree fn_arg_types = TYPE_ARG_TYPES (TREE_TYPE (decl));
+           tree fn_arg_types = TYPE_ARG_TYPES (TREE_TYPE (decl));
 
            if (fn_arg_types)
              {
@@ -5457,7 +5375,7 @@ output_decl (decl, containing_scope)
             function (if it has one - it may be just a declaration).  */
 
          {
-           register tree outer_scope = DECL_INITIAL (decl);
+           tree outer_scope = DECL_INITIAL (decl);
 
            if (outer_scope && TREE_CODE (outer_scope) != ERROR_MARK)
              {
@@ -5584,7 +5502,7 @@ output_decl (decl, containing_scope)
         function.  */
 
       {
-        register void (*func) PARAMS ((void *));
+        void (*func) PARAMS ((void *));
        register tree origin = decl_ultimate_origin (decl);
 
        if (origin != NULL && TREE_CODE (origin) == PARM_DECL)
@@ -5611,7 +5529,7 @@ output_decl (decl, containing_scope)
 
     case PARM_DECL:
      /* Force out the type of this formal, if it was not forced out yet.
-       Note that here we can run afowl of a bug in "classic" svr4 SDB.
+       Note that here we can run afoul of a bug in "classic" svr4 SDB.
        It should be able to grok the presence of type DIEs within a list
        of TAG_formal_parameter DIEs, but it doesn't.  */
 
@@ -5685,8 +5603,8 @@ dwarfout_deferred_inline_function (decl)
 
 static void
 dwarfout_file_scope_decl (decl, set_finalizing)
-     register tree decl;
-     register int set_finalizing;
+     tree decl;
+     int set_finalizing;
 {
   if (TREE_CODE (decl) == ERROR_MARK)
     return;
@@ -5715,7 +5633,7 @@ dwarfout_file_scope_decl (decl, set_finalizing)
         future (i.e. later on within the current translation unit).
         So here we just ignore all file-scope function declarations
         which are not also definitions.  If and when the debugger needs
-        to know something about these functions, it wil have to hunt
+        to know something about these functions, it will have to hunt
         around and find the DWARF information associated with the
         *definition* of the function.
 
@@ -5978,11 +5896,11 @@ dwarfout_end_epilogue ()
 
 static void
 shuffle_filename_entry (new_zeroth)
-     register filename_entry *new_zeroth;
+     filename_entry *new_zeroth;
 {
   filename_entry temp_entry;
-  register filename_entry *limit_p;
-  register filename_entry *move_p;
+  filename_entry *limit_p;
+  filename_entry *move_p;
 
   if (new_zeroth == &filename_table[0])
     return;
@@ -6053,8 +5971,8 @@ static unsigned
 lookup_filename (file_name)
      const char *file_name;
 {
-  register filename_entry *search_p;
-  register filename_entry *limit_p = &filename_table[ft_entries];
+  filename_entry *search_p;
+  filename_entry *limit_p = &filename_table[ft_entries];
 
   for (search_p = filename_table; search_p < limit_p; search_p++)
     if (!strcmp (file_name, search_p->name))
@@ -6129,7 +6047,7 @@ dwarfout_source_line (line, filename)
       char label[MAX_ARTIFICIAL_LABEL_BYTES];
       static unsigned last_line_entry_num = 0;
       static unsigned prev_file_entry_num = (unsigned) -1;
-      register unsigned this_file_entry_num;
+      unsigned this_file_entry_num;
 
       function_section (current_function_decl);
       sprintf (label, LINE_CODE_LABEL_FMT, ++last_line_entry_num);
@@ -6152,15 +6070,13 @@ dwarfout_source_line (line, filename)
         }
 
       {
-        register const char *tail = strrchr (filename, '/');
+        const char *tail = strrchr (filename, '/');
 
         if (tail != NULL)
           filename = tail;
       }
 
-      fprintf (asm_out_file, "%s%u\t%s %s:%u\n",
-              UNALIGNED_INT_ASM_OP, line, ASM_COMMENT_START,
-              filename, line);
+      dw2_asm_output_data (4, line, "%s:%u", filename, line);
       ASM_OUTPUT_DWARF_DATA2 (asm_out_file, 0xffff);
       ASM_OUTPUT_DWARF_DELTA4 (asm_out_file, label, TEXT_BEGIN_LABEL);
       ASM_OUTPUT_POP_SECTION (asm_out_file);
@@ -6174,16 +6090,18 @@ dwarfout_source_line (line, filename)
 /* Generate an entry in the .debug_macinfo section.  */
 
 static void
-generate_macinfo_entry (type_and_offset, string)
-     register const char *type_and_offset;
-     register const char *string;
+generate_macinfo_entry (type, offset, string)
+     unsigned int type;
+     rtx offset;
+     const char *string;
 {
   if (! use_gnu_debug_info_extensions)
     return;
 
   fputc ('\n', asm_out_file);
   ASM_OUTPUT_PUSH_SECTION (asm_out_file, DEBUG_MACINFO_SECTION);
-  fprintf (asm_out_file, "%s%s\n", UNALIGNED_INT_ASM_OP, type_and_offset);
+  assemble_integer (gen_rtx_PLUS (SImode, GEN_INT (type << 24), offset),
+                   4, BITS_PER_UNIT, 1);
   ASM_OUTPUT_DWARF_STRING_NEWLINE (asm_out_file, string);
   ASM_OUTPUT_POP_SECTION (asm_out_file);
 }
@@ -6192,7 +6110,7 @@ generate_macinfo_entry (type_and_offset, string)
 static void
 dwarfout_start_source_file_check (line, filename)
      unsigned int line;
-     register const char *filename;
+     const char *filename;
 {
   if (debug_info_level == DINFO_LEVEL_VERBOSE)
     dwarfout_start_source_file (line, filename);
@@ -6201,24 +6119,25 @@ dwarfout_start_source_file_check (line, filename)
 static void
 dwarfout_start_source_file (line, filename)
      unsigned int line ATTRIBUTE_UNUSED;
-     register const char *filename;
+     const char *filename;
 {
   char label[MAX_ARTIFICIAL_LABEL_BYTES];
-  char type_and_offset[MAX_ARTIFICIAL_LABEL_BYTES*3];
+  const char *label1, *label2;
 
   sprintf (label, SFNAMES_ENTRY_LABEL_FMT, lookup_filename (filename));
-  sprintf (type_and_offset, "0x%08x+%s-%s",
-          ((unsigned) MACINFO_start << 24),
-          /* Hack: skip leading '*' .  */
-          (*label == '*') + label,
-          (*SFNAMES_BEGIN_LABEL == '*') + SFNAMES_BEGIN_LABEL);
-  generate_macinfo_entry (type_and_offset, "");
+  label1 = (*label == '*') + label;
+  label2 = (*SFNAMES_BEGIN_LABEL == '*') + SFNAMES_BEGIN_LABEL;
+  generate_macinfo_entry (MACINFO_start,
+                         gen_rtx_MINUS (Pmode,
+                                        gen_rtx_SYMBOL_REF (Pmode, label1),
+                                        gen_rtx_SYMBOL_REF (Pmode, label2)),
+                         "");
 }
 
 /* Wrapper for toplev.c callback to check debug info level.  */
 static void
 dwarfout_end_source_file_check (lineno)
-     register unsigned lineno;
+     unsigned lineno;
 {
   if (debug_info_level == DINFO_LEVEL_VERBOSE)
     dwarfout_end_source_file (lineno);
@@ -6226,13 +6145,9 @@ dwarfout_end_source_file_check (lineno)
 
 static void
 dwarfout_end_source_file (lineno)
-     register unsigned lineno;
+     unsigned lineno;
 {
-  char type_and_offset[MAX_ARTIFICIAL_LABEL_BYTES*2];
-
-  sprintf (type_and_offset, "0x%08x+%u",
-          ((unsigned) MACINFO_resume << 24), lineno);
-  generate_macinfo_entry (type_and_offset, "");
+  generate_macinfo_entry (MACINFO_resume, GEN_INT (lineno), "");
 }
 
 /* Called from check_newline in c-parse.y.  The `buffer' parameter
@@ -6242,20 +6157,17 @@ dwarfout_end_source_file (lineno)
 
 static void
 dwarfout_define (lineno, buffer)
-     register unsigned lineno;
-     register const char *buffer;
+     unsigned lineno;
+     const char *buffer;
 {
   static int initialized = 0;
-  char type_and_offset[MAX_ARTIFICIAL_LABEL_BYTES*2];
 
   if (!initialized)
     {
       dwarfout_start_source_file (0, primary_filename);
       initialized = 1;
     }
-  sprintf (type_and_offset, "0x%08x+%u",
-          ((unsigned) MACINFO_define << 24), lineno);
-  generate_macinfo_entry (type_and_offset, buffer);
+  generate_macinfo_entry (MACINFO_define, GEN_INT (lineno), buffer);
 }
 
 /* Called from check_newline in c-parse.y.  The `buffer' parameter
@@ -6265,21 +6177,17 @@ dwarfout_define (lineno, buffer)
 
 static void
 dwarfout_undef (lineno, buffer)
-     register unsigned lineno;
-     register const char *buffer;
+     unsigned lineno;
+     const char *buffer;
 {
-  char type_and_offset[MAX_ARTIFICIAL_LABEL_BYTES*2];
-
-  sprintf (type_and_offset, "0x%08x+%u",
-          ((unsigned) MACINFO_undef << 24), lineno);
-  generate_macinfo_entry (type_and_offset, buffer);
+  generate_macinfo_entry (MACINFO_undef, GEN_INT (lineno), buffer);
 }
 
 /* Set up for Dwarf output at the start of compilation.         */
 
 static void
 dwarfout_init (main_input_filename)
-     register const char *main_input_filename;
+     const char *main_input_filename;
 {
   /* Remember the name of the primary input file.  */
 
@@ -6372,8 +6280,8 @@ dwarfout_init (main_input_filename)
          ASM_OUTPUT_PUSH_SECTION (asm_out_file, DEBUG_SFNAMES_SECTION);
          ASM_OUTPUT_LABEL (asm_out_file, SFNAMES_BEGIN_LABEL);
          {
-           register const char *pwd = getpwd ();
-           register char *dirname;
+           const char *pwd = getpwd ();
+           char *dirname;
 
            if (!pwd)
              fatal_io_error ("can't get current directory");
@@ -6468,7 +6376,7 @@ dwarfout_init (main_input_filename)
 
 static void
 dwarfout_finish (main_input_filename)
-     register const char *main_input_filename ATTRIBUTE_UNUSED;
+     const char *main_input_filename ATTRIBUTE_UNUSED;
 {
   char label[MAX_ARTIFICIAL_LABEL_BYTES];