diff gcc/dwarf2asm.c @ 55:77e2b8dfacca gcc-4.4.5

update it from 4.4.3 to 4.5.0
author ryoma <e075725@ie.u-ryukyu.ac.jp>
date Fri, 12 Feb 2010 23:39:51 +0900
parents a06113de4d67
children b7f97abdc517
line wrap: on
line diff
--- a/gcc/dwarf2asm.c	Sun Feb 07 18:28:00 2010 +0900
+++ b/gcc/dwarf2asm.c	Fri Feb 12 23:39:51 2010 +0900
@@ -1,5 +1,5 @@
 /* Dwarf2 assembler output helper routines.
-   Copyright (C) 2001, 2002, 2003, 2004, 2005, 2007, 2008
+   Copyright (C) 2001, 2002, 2003, 2004, 2005, 2007, 2008, 2009
    Free Software Foundation, Inc.
 
 This file is part of GCC.
@@ -52,7 +52,7 @@
   if (op)
     {
       fputs (op, asm_out_file);
-      if (GET_CODE (x) == CONST_INT)
+      if (CONST_INT_P (x))
 	fprintf (asm_out_file, HOST_WIDE_INT_PRINT_HEX,
 		 (unsigned HOST_WIDE_INT) INTVAL (x));
       else
@@ -268,7 +268,7 @@
    If COMMENT is not NULL and comments in the debug information
    have been requested by the user, append the given COMMENT
    to the generated output.  */
-   
+
 void
 dw2_asm_output_nstring (const char *str, size_t orig_len,
 			const char *comment, ...)
@@ -446,6 +446,8 @@
   S(DW_EH_PE_sdata4 | DW_EH_PE_funcrel, "funcrel sdata4")
   S(DW_EH_PE_sdata8 | DW_EH_PE_funcrel, "funcrel sdata8")
 
+  S(DW_EH_PE_indirect | DW_EH_PE_absptr, "indirect absolute")
+
   S(DW_EH_PE_indirect | DW_EH_PE_absptr | DW_EH_PE_pcrel,
     "indirect pcrel")
   S(DW_EH_PE_indirect | DW_EH_PE_uleb128 | DW_EH_PE_pcrel,
@@ -526,7 +528,7 @@
   };
 
   gcc_assert (format >= 0 && format < 0x100 && format_names[format]);
-  
+
   return format_names[format];
 #else
   }
@@ -809,7 +811,7 @@
 {
   splay_tree_node node;
   const char *key;
-  tree decl;
+  tree decl_id;
 
   if (! indirect_pool)
     /* We use strcmp, rather than just comparing pointers, so that the
@@ -821,7 +823,7 @@
   key = XSTR (x, 0);
   node = splay_tree_lookup (indirect_pool, (splay_tree_key) key);
   if (node)
-    decl = (tree) node->value;
+    decl_id = (tree) node->value;
   else
     {
       tree id;
@@ -832,13 +834,9 @@
 	  char *ref_name = XALLOCAVEC (char, strlen (str) + sizeof "DW.ref.");
 
 	  sprintf (ref_name, "DW.ref.%s", str);
-	  id = get_identifier (ref_name);
-	  decl = build_decl (VAR_DECL, id, ptr_type_node);
-	  DECL_ARTIFICIAL (decl) = 1;
-	  DECL_IGNORED_P (decl) = 1;
-	  TREE_PUBLIC (decl) = 1;
-	  DECL_INITIAL (decl) = decl;
-	  make_decl_one_only (decl);
+	  gcc_assert (!maybe_get_identifier (ref_name));
+	  decl_id = get_identifier (ref_name);
+	  TREE_PUBLIC (decl_id) = 1;
 	}
       else
 	{
@@ -846,12 +844,8 @@
 
 	  ASM_GENERATE_INTERNAL_LABEL (label, "LDFCM", dw2_const_labelno);
 	  ++dw2_const_labelno;
-	  id = get_identifier (label);
-	  decl = build_decl (VAR_DECL, id, ptr_type_node);
-	  DECL_ARTIFICIAL (decl) = 1;
-	  DECL_IGNORED_P (decl) = 1;
-	  TREE_STATIC (decl) = 1;
-	  DECL_INITIAL (decl) = decl;
+	  gcc_assert (!maybe_get_identifier (label));
+	  decl_id = get_identifier (label);
 	}
 
       id = maybe_get_identifier (str);
@@ -859,10 +853,10 @@
 	TREE_SYMBOL_REFERENCED (id) = 1;
 
       splay_tree_insert (indirect_pool, (splay_tree_key) key,
-			 (splay_tree_value) decl);
+			 (splay_tree_value) decl_id);
     }
 
-  return XEXP (DECL_RTL (decl), 0);
+  return gen_rtx_SYMBOL_REF (Pmode, IDENTIFIER_POINTER (decl_id));
 }
 
 /* A helper function for dw2_output_indirect_constants called through
@@ -874,10 +868,24 @@
 {
   const char *sym;
   rtx sym_ref;
-  tree decl;
+  tree id, decl;
 
   sym = (const char *) node->key;
-  decl = (tree) node->value;
+  id = (tree) node->value;
+
+  decl = build_decl (UNKNOWN_LOCATION, VAR_DECL, id, ptr_type_node);
+  DECL_ARTIFICIAL (decl) = 1;
+  DECL_IGNORED_P (decl) = 1;
+  DECL_INITIAL (decl) = decl;
+
+  if (TREE_PUBLIC (id))
+    {
+      TREE_PUBLIC (decl) = 1;
+      make_decl_one_only (decl, DECL_ASSEMBLER_NAME (decl));
+    }
+  else
+    TREE_STATIC (decl) = 1;
+
   sym_ref = gen_rtx_SYMBOL_REF (Pmode, sym);
   sym = targetm.strip_name_encoding (sym);
   if (TREE_PUBLIC (decl) && USE_LINKONCE_INDIRECT)