ns32k.c (ns32k_encode_section_info): Remove.
authorRichard Henderson <rth@redhat.com>
Thu, 17 Apr 2003 09:25:19 +0000 (02:25 -0700)
committerRichard Henderson <rth@gcc.gnu.org>
Thu, 17 Apr 2003 09:25:19 +0000 (02:25 -0700)
        * config/ns32k/ns32k.c (ns32k_encode_section_info): Remove.
        (global_symbolic_reference_mentioned_p): Use SYMBOL_REF_LOCAL_P.
        (print_operand_address): Likewise.

        * config/ns32k/ns32k.h (CANNOT_CHANGE_MODE_CLASS): Add CLASS argument.
        * config/ns32k/ns32k.c (expand_block_move): Don't check
        flag_unroll_loops.

From-SVN: r65733

gcc/ChangeLog
gcc/config/ns32k/ns32k.c
gcc/config/ns32k/ns32k.h

index 4a7fbce0585fe0af348a9b204a45ef4bd2c8aab4..8b4102881b89a4992b1fe031e7267df6e82d2a2c 100644 (file)
@@ -1,3 +1,13 @@
+2003-04-17  Richard Henderson  <rth@redhat.com>
+
+       * config/ns32k/ns32k.c (ns32k_encode_section_info): Remove.
+       (global_symbolic_reference_mentioned_p): Use SYMBOL_REF_LOCAL_P.
+       (print_operand_address): Likewise.
+
+       * config/ns32k/ns32k.h (CANNOT_CHANGE_MODE_CLASS): Add CLASS argument.
+       * config/ns32k/ns32k.c (expand_block_move): Don't check
+       flag_unroll_loops.
+
 2003-04-17  Richard Henderson  <rth@redhat.com>
 
        * config/mcore/mcore.c (mcore_encode_section_info): Don't set
index 73b16df9058e43828ccb23c58773cd8ace3c18c9..153a6a32a2cddf903bf8f3359d4873149d318497 100644 (file)
@@ -71,7 +71,6 @@ static tree ns32k_handle_fntype_attribute PARAMS ((tree *, tree, tree, int, bool
 const struct attribute_spec ns32k_attribute_table[];
 static void ns32k_output_function_prologue PARAMS ((FILE *, HOST_WIDE_INT));
 static void ns32k_output_function_epilogue PARAMS ((FILE *, HOST_WIDE_INT));
-static void ns32k_encode_section_info PARAMS ((tree, int));
 static bool ns32k_rtx_costs PARAMS ((rtx, int, int, int *));
 static int ns32k_address_cost PARAMS ((rtx));
 \f
@@ -91,8 +90,6 @@ static int ns32k_address_cost PARAMS ((rtx));
 #define TARGET_ASM_FUNCTION_PROLOGUE ns32k_output_function_prologue
 #undef TARGET_ASM_FUNCTION_EPILOGUE
 #define TARGET_ASM_FUNCTION_EPILOGUE ns32k_output_function_epilogue
-#undef TARGET_ENCODE_SECTION_INFO
-#define TARGET_ENCODE_SECTION_INFO ns32k_encode_section_info
 
 #undef TARGET_RTX_COSTS
 #define TARGET_RTX_COSTS ns32k_rtx_costs
@@ -887,7 +884,7 @@ expand_block_move (operands)
 
       if (words)
        {
-         if (words < 3 || flag_unroll_loops)
+         if (words < 3)
            {
              int offset = 0;
 
@@ -1003,7 +1000,7 @@ global_symbolic_reference_mentioned_p (op, f)
 
   if (GET_CODE (op) == SYMBOL_REF)
     {
-      if (! SYMBOL_REF_FLAG (op))
+      if (! SYMBOL_REF_LOCAL_P (op))
        return 1;
       else
         return 0;
@@ -1312,8 +1309,7 @@ print_operand_address (file, addr)
          indexexp = tmp;
          break;
        case SYMBOL_REF:
-         if (flag_pic && ! CONSTANT_POOL_ADDRESS_P (tmp)
-             && ! SYMBOL_REF_FLAG (tmp))
+         if (flag_pic && ! SYMBOL_REF_LOCAL_P (tmp))
            {
              if (base)
                {
@@ -1345,12 +1341,7 @@ print_operand_address (file, addr)
                  if (GET_CODE (off) != CONST_INT)
                    abort ();
 
-                 if (CONSTANT_POOL_ADDRESS_P (sym)
-                     || SYMBOL_REF_FLAG (sym))
-                   {
-                     SYMBOL_REF_FLAG (tmp) = 1;
-                   }
-                 else
+                 if (! SYMBOL_REF_LOCAL_P (sym))
                    {
                      if (base)
                        {
@@ -1601,21 +1592,3 @@ output_move_dconst (n, s)
   strcat (r, s);
   return r;
 }
-
-/* If using PIC, mark a SYMBOL_REF for a non-global symbol or a code
-   symbol. These symbols are referenced via pc and not via sb. */
-
-static void
-ns32k_encode_section_info (decl, first)
-     tree decl;
-     int first ATTRIBUTE_UNUSED;
-{
-  if (flag_pic)
-    {
-      rtx rtl = (TREE_CODE_CLASS (TREE_CODE (decl)) != 'd'
-                ? TREE_CST_RTL (decl) : DECL_RTL (decl));
-      SYMBOL_REF_FLAG (XEXP (rtl, 0))
-       = (TREE_CODE_CLASS (TREE_CODE (decl)) != 'd'
-          || ! TREE_PUBLIC (decl));
-    }
-}
index 9f2c0260fe82d796ce280a0df81dddf8bfa4303a..81343c4928436fa81074bea865e82af4fc2dd5cc 100644 (file)
@@ -474,8 +474,9 @@ enum reg_class
 /* LONG_REGS are registers which can only hold double precision floats
  * and can only be accessable by long float instructions.
  */
-#define CANNOT_CHANGE_MODE_CLASS(FROM, TO) \
-  (GET_MODE_SIZE (FROM) != GET_MODE_SIZE (TO) ? LONG_REGS : NO_REGS)
+#define CANNOT_CHANGE_MODE_CLASS(FROM, TO, CLASS)      \
+  (GET_MODE_SIZE (FROM) != GET_MODE_SIZE (TO)          \
+   ? reg_classes_intersect_p (LONG_REGS, CLASS) : 0)
 
 /* The same information, inverted:
    Return the class number of the smallest class containing