OSDN Git Service

* alpha.md (addsi3, subsi3): No new temporaries once cse is
[pf3gnuchains/gcc-fork.git] / gcc / varasm.c
index 760aa77..e47a0cd 100644 (file)
@@ -116,20 +116,6 @@ int size_directive_output;
 
 tree last_assemble_variable_decl;
 
-
-#ifdef HANDLE_PRAGMA_WEAK
-/* Any weak symbol declarations waiting to be emitted.  */
-
-struct weak_syms
-{
-  struct weak_syms *next;
-  char *name;
-  char *value;
-};
-
-static struct weak_syms *weak_decls;
-#endif
-
 /* Nonzero if at least one function definition has been seen.  */
 
 static int function_defined;
@@ -609,7 +595,7 @@ decode_reg_name (asmspec)
        static struct { char *name; int number; } table[]
          = ADDITIONAL_REGISTER_NAMES;
 
-       for (i = 0; i < sizeof (table) / sizeof (table[0]); i++)
+       for (i = 0; i < (int)(sizeof (table) / sizeof (table[0])); i++)
          if (! strcmp (asmspec, table[i].name))
            return table[i].number;
       }
@@ -662,8 +648,6 @@ make_decl_rtl (decl, asmspec, top_level)
      same DECL node.  Don't discard the RTL already made.  */
   if (DECL_RTL (decl) == 0)
     {
-      DECL_RTL (decl) = 0;
-
       /* First detect errors in declaring global registers.  */
       if (TREE_CODE (decl) != FUNCTION_DECL
          && DECL_REGISTER (decl) && reg_number == -1)
@@ -767,7 +751,8 @@ make_decl_rtl (decl, asmspec, top_level)
 
          DECL_RTL (decl) = gen_rtx_MEM (DECL_MODE (decl),
                                         gen_rtx_SYMBOL_REF (Pmode, name));
-
+         MEM_ALIAS_SET (DECL_RTL (decl)) = get_alias_set (decl);
+           
          /* If this variable is to be treated as volatile, show its
             tree node has side effects.  If it has side effects, either
             because of this test or from TREE_THIS_VOLATILE also
@@ -1149,7 +1134,7 @@ assemble_string (p, size)
 void
 assemble_variable (decl, top_level, at_end, dont_output_data)
      tree decl;
-     int top_level;
+     int top_level ATTRIBUTE_UNUSED;
      int at_end;
      int dont_output_data;
 {
@@ -1465,7 +1450,9 @@ assemble_variable (decl, top_level, at_end, dont_output_data)
     reloc = output_addressed_constants (DECL_INITIAL (decl));
 
 #ifdef ASM_OUTPUT_SECTION_NAME
-  if (UNIQUE_SECTION_P (decl))
+  if ((flag_data_sections != 0
+       && DECL_SECTION_NAME (decl) == NULL_TREE)
+      || UNIQUE_SECTION_P (decl))
     UNIQUE_SECTION (decl, reloc);
 #endif
 
@@ -1621,7 +1608,7 @@ assemble_external (decl)
 
 void
 assemble_external_libcall (fun)
-     rtx fun;
+     rtx fun ATTRIBUTE_UNUSED;
 {
 #ifdef ASM_OUTPUT_EXTERNAL_LIBCALL
   /* Declare library function name external when first used, if nec.  */
@@ -2071,6 +2058,8 @@ immed_real_const_1 (d, mode)
   else if (! REAL_VALUE_ISNAN (d) && REAL_VALUES_EQUAL (dconst1, d))
     return CONST1_RTX (mode);
 
+  if (sizeof u == sizeof (HOST_WIDE_INT))
+    return immed_double_const (u.i[0], 0, mode);
   if (sizeof u == 2 * sizeof (HOST_WIDE_INT))
     return immed_double_const (u.i[0], u.i[1], mode);
 
@@ -2562,6 +2551,7 @@ compare_constant_1 (exp, p)
 
     case PLUS_EXPR:
     case MINUS_EXPR:
+    case RANGE_EXPR:
       p = compare_constant_1 (TREE_OPERAND (exp, 0), p);
       if (p == 0)
        return 0;
@@ -2738,6 +2728,7 @@ record_constant_1 (exp)
 
     case PLUS_EXPR:
     case MINUS_EXPR:
+    case RANGE_EXPR:
       record_constant_1 (TREE_OPERAND (exp, 0));
       record_constant_1 (TREE_OPERAND (exp, 1));
       return;
@@ -3581,8 +3572,8 @@ get_pool_size ()
 
 void
 output_constant_pool (fnname, fndecl)
-     char *fnname;
-     tree fndecl;
+  char *fnname ATTRIBUTE_UNUSED;
+  tree fndecl ATTRIBUTE_UNUSED;
 {
   struct pool_constant *pool;
   rtx x;
@@ -4241,38 +4232,6 @@ output_constructor (exp, size)
     assemble_zeros (size - total_bytes);
 }
 
-/* Output asm to handle ``#pragma weak'' */
-
-void
-handle_pragma_weak (what, name, value)
-     enum pragma_state what;
-     char *name, *value;
-{
-#ifdef HANDLE_PRAGMA_WEAK
-  if (what == ps_name || what == ps_value)
-    {
-      struct weak_syms *weak =
-       (struct weak_syms *)permalloc (sizeof (struct weak_syms));
-      weak->next = weak_decls;
-      weak->name = permalloc (strlen (name) + 1);
-      strcpy (weak->name, name);
-
-      if (what != ps_value)
-       weak->value = NULL_PTR;
-
-      else
-       {
-         weak->value = permalloc (strlen (value) + 1);
-         strcpy (weak->value, value);
-       }
-
-      weak_decls = weak;
-    }
-  else if (! (what == ps_done || what == ps_start))
-    warning ("malformed `#pragma weak'");
-#endif /* HANDLE_PRAGMA_WEAK */
-}
-
 /* Declare DECL to be a weak symbol.  */
 
 void
@@ -4289,6 +4248,10 @@ declare_weak (decl)
 
 /* Emit any pending weak declarations.  */
 
+#ifdef HANDLE_PRAGMA_WEAK
+struct weak_syms * weak_decls;
+#endif
+
 void
 weak_finish ()
 {