]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
frv-protos.h (frv_init_builtins, [...]): Delete.
authorKaveh R. Ghazi <ghazi@caip.rutgers.edu>
Wed, 4 Sep 2002 20:56:33 +0000 (20:56 +0000)
committerKaveh Ghazi <ghazi@gcc.gnu.org>
Wed, 4 Sep 2002 20:56:33 +0000 (20:56 +0000)
* frv-protos.h (frv_init_builtins, frv_expand_builtin,
frv_select_section, frv_select_rtx_section,
frv_encode_section_info, frv_unique_section): Delete.
* frv.c: Update for target hooks.
* frv.h (STRIP_NAME_ENCODING, SLOW_ZERO_EXTEND, SELECT_SECTION,
SELECT_RTX_SECTION, ENCODE_SECTION_INFO, UNIQUE_SECTION,
EASY_DIV_EXPR, MD_INIT_BUILTINS, MD_EXPAND_BUILTIN): Delete.

From-SVN: r56810

gcc/ChangeLog
gcc/config/frv/frv-protos.h
gcc/config/frv/frv.c
gcc/config/frv/frv.h

index 1ad470129b46fea481c44b8bcfe353929711c829..9c952be5ab701ceb407dd24d0db763d613bc141d 100644 (file)
@@ -1,3 +1,13 @@
+2002-09-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
+
+       * frv-protos.h (frv_init_builtins, frv_expand_builtin,
+       frv_select_section, frv_select_rtx_section,
+       frv_encode_section_info, frv_unique_section): Delete.
+       * frv.c: Update for target hooks.
+       * frv.h (STRIP_NAME_ENCODING, SLOW_ZERO_EXTEND, SELECT_SECTION,
+       SELECT_RTX_SECTION, ENCODE_SECTION_INFO, UNIQUE_SECTION,
+       EASY_DIV_EXPR, MD_INIT_BUILTINS, MD_EXPAND_BUILTIN): Delete.
+
 2002-09-04  Kaveh R. Ghazi  <ghazi@caip.rutgers.edu>
 
        * ip2k-protos.h (function_prologue, function_epilogue,
index d00a9b8eaa517e01423fb43b05ca4c9b8fd4e5f9..c3f13f5772d4e25a461f97efadee5598ca904aee 100644 (file)
@@ -69,9 +69,6 @@ extern rtx frv_legitimize_address             PARAMS ((rtx, rtx,
                                                         enum machine_mode));
 
 #ifdef TREE_CODE
-extern void frv_init_builtins PARAMS ((void));
-extern rtx frv_expand_builtin PARAMS ((tree, rtx, rtx, enum machine_mode, int));
-
 extern void frv_init_cumulative_args           PARAMS ((CUMULATIVE_ARGS *, tree,
                                                       rtx, int, int));
 
@@ -174,16 +171,6 @@ extern int frv_register_move_cost  PARAMS ((enum reg_class, enum reg_class));
 
 #ifdef TREE_CODE
 extern int frv_adjust_field_align      PARAMS ((tree, int));
-extern void frv_select_section         PARAMS ((tree, int));
-#endif
-
-#ifdef RTX_CODE
-extern void frv_select_rtx_section     PARAMS ((enum machine_mode, rtx));
-#endif
-
-#ifdef TREE_CODE
-extern void frv_encode_section_info    PARAMS ((tree));
-extern void frv_unique_section         PARAMS ((tree, int));
 #endif
 
 extern void fixup_section              PARAMS ((void));
index 11b3674fee8db4e8e8737d6b793103d5bdd15be4..0ef0afeca634a435b57c2eaa1e62e9d55846c864 100644 (file)
@@ -274,6 +274,13 @@ static void frv_pack_insns                 PARAMS ((void));
 static void frv_function_prologue              PARAMS ((FILE *, HOST_WIDE_INT));
 static void frv_function_epilogue              PARAMS ((FILE *, HOST_WIDE_INT));
 static bool frv_assemble_integer               PARAMS ((rtx, unsigned, int));
+static const char * frv_strip_name_encoding    PARAMS ((const char *));
+static void frv_encode_section_info            PARAMS ((tree, int));
+static void frv_unique_section                 PARAMS ((tree, int));
+static void frv_init_builtins                  PARAMS ((void));
+static rtx frv_expand_builtin                  PARAMS ((tree, rtx, rtx, enum machine_mode, int));
+static void frv_select_section                 PARAMS ((tree, int, unsigned HOST_WIDE_INT));
+static void frv_select_rtx_section             PARAMS ((enum machine_mode, rtx, unsigned HOST_WIDE_INT));
 \f
 /* Initialize the GCC target structure.  */
 #undef  TARGET_ASM_FUNCTION_PROLOGUE
@@ -282,6 +289,20 @@ static bool frv_assemble_integer           PARAMS ((rtx, unsigned, int));
 #define TARGET_ASM_FUNCTION_EPILOGUE frv_function_epilogue
 #undef  TARGET_ASM_INTEGER
 #define TARGET_ASM_INTEGER frv_assemble_integer
+#undef  TARGET_STRIP_NAME_ENCODING
+#define TARGET_STRIP_NAME_ENCODING frv_strip_name_encoding
+#undef  TARGET_ENCODE_SECTION_INFO
+#define TARGET_ENCODE_SECTION_INFO frv_encode_section_info
+#undef  TARGET_ASM_UNIQUE_SECTION
+#define TARGET_ASM_UNIQUE_SECTION frv_unique_section
+#undef TARGET_INIT_BUILTINS
+#define TARGET_INIT_BUILTINS frv_init_builtins
+#undef TARGET_EXPAND_BUILTIN
+#define TARGET_EXPAND_BUILTIN frv_expand_builtin
+#undef TARGET_ASM_SELECT_SECTION
+#define TARGET_ASM_SELECT_SECTION frv_select_section
+#undef TARGET_ASM_SELECT_RTX_SECTION
+#define TARGET_ASM_SELECT_RTX_SECTION frv_select_rtx_section
 
 struct gcc_target targetm = TARGET_INITIALIZER;
 \f
@@ -620,10 +641,11 @@ frv_optimization_options (level, size)
 
    Defined in svr4.h.  */
 
-void
-frv_select_section (decl, reloc)
+static void
+frv_select_section (decl, reloc, align)
      tree decl;
      int reloc;
+     unsigned HOST_WIDE_INT align ATTRIBUTE_UNUSED;
 {
   int size = int_size_in_bytes (TREE_TYPE (decl));
 
@@ -676,10 +698,11 @@ frv_select_section (decl, reloc)
 
    Defined in svr4.h.  */
 
-void
-frv_select_rtx_section (mode, op)
+static void
+frv_select_rtx_section (mode, op, align)
      enum machine_mode mode;
      rtx op ATTRIBUTE_UNUSED;
+     unsigned HOST_WIDE_INT align ATTRIBUTE_UNUSED;
 {
   int size = (int) GET_MODE_SIZE (mode);
   if (size > 0 && size <= g_switch_value)
@@ -713,10 +736,13 @@ frv_string_begins_with (name, prefix)
 
 */
 
-void
-frv_encode_section_info (decl)
+static void
+frv_encode_section_info (decl, first)
      tree decl;
+     int first;
 {
+  if (first)
+    return;
   if (TREE_CODE (decl) == VAR_DECL)
     {
       int size = int_size_in_bytes (TREE_TYPE (decl));
@@ -757,7 +783,7 @@ frv_encode_section_info (decl)
     }
 }
 
-void
+static void
 frv_unique_section (decl, reloc)
      tree decl;
      int reloc;
@@ -767,7 +793,7 @@ frv_unique_section (decl, reloc)
   const char *name;
   char *string;
   const char *prefix;
-  static const char *prefixes[4][2] =
+  static const char *const prefixes[4][2] =
     {
       { ".text.", ".gnu.linkonce.t." },
       { ".rodata.", ".gnu.linkonce.r." },
@@ -777,7 +803,7 @@ frv_unique_section (decl, reloc)
 
   if (TREE_CODE (decl) == FUNCTION_DECL)
     sec = 0;
-  else if (DECL_READONLY_SECTION (decl, reloc))
+  else if (decl_readonly_section (decl, reloc))
     sec = 1;
   else if (SDATA_NAME_P (XSTR (XEXP (DECL_RTL (decl), 0), 0)))
     sec = 3;
@@ -785,7 +811,7 @@ frv_unique_section (decl, reloc)
     sec = 2;
 
   name = IDENTIFIER_POINTER (DECL_ASSEMBLER_NAME (decl));
-  STRIP_NAME_ENCODING (name, name);
+  name = (* targetm.strip_name_encoding) (name);
   prefix = prefixes[sec][DECL_ONE_ONLY (decl)];
   len = strlen (name) + strlen (prefix);
   string = alloca (len + 1);
@@ -3480,7 +3506,7 @@ frv_regno_ok_for_base_p (regno, strict_p)
    with suitable punctuation to prevent any ambiguity.  Allocate the new name
    in `saveable_obstack'.  You will have to modify `ASM_OUTPUT_LABELREF' to
    remove and decode the added text and output the name accordingly, and define
-   `STRIP_NAME_ENCODING' to access the original name string.
+   `(* targetm.strip_name_encoding)' to access the original name string.
 
    You can check the information stored here into the `symbol_ref' in the
    definitions of the macros `GO_IF_LEGITIMATE_ADDRESS' and
@@ -8309,7 +8335,7 @@ frv_assemble_integer (value, size, aligned_p)
              const char *p;
 
              ASM_GENERATE_INTERNAL_LABEL (buf, "LCP", label_num++);
-             STRIP_NAME_ENCODING (p, buf);
+             p = (* targetm.strip_name_encoding) (buf);
 
              fprintf (asm_out_file, "%s:\n", p);
              fprintf (asm_out_file, "%s\n", FIXUP_SECTION_ASM_OP);
@@ -9087,7 +9113,7 @@ static struct builtin_description bdesc_voidacc[] =
 
 /* Initialize media builtins. */
 
-void
+static void
 frv_init_builtins ()
 {
   tree endlink = void_list_node;
@@ -9706,7 +9732,7 @@ frv_expand_mwtacc_builtin (icode, arglist)
 
 /* Expand builtins. */
 
-rtx
+static rtx
 frv_expand_builtin (exp, target, subtarget, mode, ignore)
      tree exp;
      rtx target;
@@ -9854,3 +9880,12 @@ frv_expand_builtin (exp, target, subtarget, mode, ignore)
     }
   return 0;
 }
+
+static const char *
+frv_strip_name_encoding (str)
+     const char *str;
+{
+  while (*str == '*' || *str == SDATA_FLAG_CHAR)
+    str++;
+  return str;
+}
index 0bd7b4decb3888743576216b8c2e17168e44e7c2..a663c03b4d332903dde59a3c30c0dd9f43fdc3fe 100644 (file)
@@ -2464,7 +2464,7 @@ __asm__("\n"                                                              \
    with suitable punctuation to prevent any ambiguity.  Allocate the new name
    in `saveable_obstack'.  You will have to modify `ASM_OUTPUT_LABELREF' to
    remove and decode the added text and output the name accordingly, and define
-   `STRIP_NAME_ENCODING' to access the original name string.
+   `(* targetm.strip_name_encoding)' to access the original name string.
 
    You can check the information stored here into the `symbol_ref' in the
    definitions of the macros `GO_IF_LEGITIMATE_ADDRESS' and
@@ -2722,17 +2722,6 @@ __asm__("\n"                                                             \
    same word of the structure, but to different bytes.  */
 #define SLOW_BYTE_ACCESS 1
 
-/* Define this macro if zero-extension (of a `char' or `short' to an `int') can
-   be done faster if the destination is a register that is known to be zero.
-
-   If you define this macro, you must have instruction patterns that recognize
-   RTL structures like this:
-
-        (set (strict_low_part (subreg:QI (reg:SI ...) 0)) ...)
-
-   and likewise for `HImode'.  */
-#define SLOW_ZERO_EXTEND 0
-
 /* Define this macro if it is as good or better to call a constant function
    address than to call an address kept in a register.  */
 #define NO_FUNCTION_CSE
@@ -2837,59 +2826,9 @@ fixup_section ()                                                 \
     }                                                                  \
 }                                                                      \
 
-/* A C statement or statements to switch to the appropriate section for output
-   of EXP.  You can assume that EXP is either a `VAR_DECL' node or a constant
-   of some sort.  RELOC indicates whether the initial value of EXP requires
-   link-time relocations.  Select the section by calling `text_section' or one
-   of the alternatives for other sections.
-
-   Do not define this macro if you put all read-only variables and constants in
-   the read-only data section (usually the text section).
-
-   Defined in svr4.h.  */
-#undef SELECT_SECTION
-#define SELECT_SECTION(EXP, RELOC, ALIGN) frv_select_section ((EXP), (RELOC))
-
-/* A C statement or statements to switch to the appropriate section for output
-   of RTX in mode MODE.  You can assume that RTX is some kind of constant in
-   RTL.  The argument MODE is redundant except in the case of a `const_int'
-   rtx.  Select the section by calling `text_section' or one of the
-   alternatives for other sections.
-
-   Do not define this macro if you put all constants in the read-only data
-   section.
-
-   Defined in svr4.h.  */
-#undef SELECT_RTX_SECTION
-#define SELECT_RTX_SECTION(MODE, RTX, ALIGN) frv_select_rtx_section (MODE, RTX)
-
 #define SDATA_FLAG_CHAR '@'
 
 #define SDATA_NAME_P(NAME) (*(NAME) == SDATA_FLAG_CHAR)
-
-#define ENCODE_SECTION_INFO(DECL, FIRST)       \
-  do                                           \
-    {                                          \
-      if (FIRST)                               \
-        frv_encode_section_info (DECL);                \
-    }                                          \
-  while (0)
-
-/* Decode SYM_NAME and store the real name part in VAR, sans
-   the characters that encode section info.  Define this macro if
-   ENCODE_SECTION_INFO alters the symbol's name string.  */
-
-#define STRIP_NAME_ENCODING(VAR, SYMBOL_NAME)                  \
-  do                                                           \
-    {                                                          \
-      const char * _name = (SYMBOL_NAME);                      \
-                                                               \
-      while (* _name == '*' || * _name == SDATA_FLAG_CHAR)     \
-       _name ++;                                               \
-      (VAR) = _name;                                           \
-    }                                                          \
-  while (0)
-
 \f
 /* Position Independent Code.  */
 
@@ -3366,12 +3305,6 @@ do {                                                                    \
    Defined in svr4.h.  */
 #undef  PREFERRED_DEBUGGING_TYPE
 #define PREFERRED_DEBUGGING_TYPE DWARF2_DEBUG
-
-/* This version of UNIQUE_SECTION overrides the one in elfos.h.  We
-   need to check whether DECL is destined for the .sdata section.  */
-
-#undef  UNIQUE_SECTION
-#define UNIQUE_SECTION(DECL,RELOC) frv_unique_section (DECL, RELOC)
 \f
 /* Miscellaneous Parameters.  */
 
@@ -3494,14 +3427,6 @@ do {                                                                    \
 /* Define if loading short immediate values into registers sign extends.  */
 #define SHORT_IMMEDIATES_SIGN_EXTEND
 
-/* An alias for a tree code that is the easiest kind of division to compile
-   code for in the general case.  It may be `TRUNC_DIV_EXPR', `FLOOR_DIV_EXPR',
-   `CEIL_DIV_EXPR' or `ROUND_DIV_EXPR'.  These four division operators differ
-   in how they round the result to an integer.  `EASY_DIV_EXPR' is used when it
-   is permissible to use any of those kinds of division and the choice should
-   be made on the basis of efficiency.  */
-#define EASY_DIV_EXPR TRUNC_DIV_EXPR
-
 /* The maximum number of bytes that a single instruction can move quickly from
    memory to memory.  */
 #define MOVE_MAX 8
@@ -3726,13 +3651,6 @@ enum frv_builtins
   FRV_BUILTIN_MHDSETH
 };
 
-#define MD_INIT_BUILTINS do { \
-    frv_init_builtins (); \
-  } while (0)
-
-#define MD_EXPAND_BUILTIN(EXP, TARGET, SUBTARGET, MODE, IGNORE) \
-    frv_expand_builtin ((EXP), (TARGET), (SUBTARGET), (MODE), (IGNORE))
-
 /* Enable prototypes on the call rtl functions.  */
 #define MD_CALL_PROTOTYPES 1