]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
libfuncs.h (LTI_setbits, [...]): New.
authorRichard Henderson <rth@redhat.com>
Fri, 11 Apr 2003 19:45:32 +0000 (12:45 -0700)
committerRichard Henderson <rth@gcc.gnu.org>
Fri, 11 Apr 2003 19:45:32 +0000 (12:45 -0700)
        * libfuncs.h (LTI_setbits, LTI_gcov_flush, LTI_gcov_init): New.
        (setbits_libfunc, gcov_flush_libfunc, gcov_init_libfunc): New.
        * optabs.c (init_optabs): Initialize them.
        (init_libfuncs): Use init_one_libfunc.
        * calls.c (expand_call): Use gcov_flush_libfunc.
        * expr.c (store_constructor): Use setbits_libfunc.
        * function.c (expand_main_function): Use init_one_libfunc.
        * profile.c (create_profiler): Use gcov_init_libfunc and DECL_RTL.

From-SVN: r65478

gcc/ChangeLog
gcc/calls.c
gcc/expr.c
gcc/function.c
gcc/libfuncs.h
gcc/optabs.c
gcc/profile.c

index 9a558be16954364ce18b5c4826630e32049bbbaf..300f4e096f1b90a8788d9585faec73fb6772fa67 100644 (file)
@@ -1,3 +1,14 @@
+2003-04-11  Richard Henderson  <rth@redhat.com>
+
+       * libfuncs.h (LTI_setbits, LTI_gcov_flush, LTI_gcov_init): New.
+       (setbits_libfunc, gcov_flush_libfunc, gcov_init_libfunc): New.
+       * optabs.c (init_optabs): Initialize them.
+       (init_libfuncs): Use init_one_libfunc.
+       * calls.c (expand_call): Use gcov_flush_libfunc.
+       * expr.c (store_constructor): Use setbits_libfunc.
+       * function.c (expand_main_function): Use init_one_libfunc.
+       * profile.c (create_profiler): Use gcov_init_libfunc and DECL_RTL.
+
 2003-04-11  Mark Mitchell  <mark@codesourcery.com>
 
        * doc/c-tree.texi (Functions): Remove DECL_REAL_CONTEXT
index f23b9397d596b46ad8288ece84331544ba4f8367..ffb8a21f021cf7796d0da8371695395838a1cb0c 100644 (file)
@@ -2635,9 +2635,7 @@ expand_call (exp, target, ignore)
         is subject to race conditions, just as with multithreaded
         programs.  */
 
-      emit_library_call (gen_rtx_SYMBOL_REF (Pmode, "__gcov_flush"),
-                        LCT_ALWAYS_RETURN,
-                        VOIDmode, 0);
+      emit_library_call (gcov_flush_libfunc, LCT_ALWAYS_RETURN, VOIDmode, 0);
     }
 
   /* Ensure current function's preferred stack boundary is at least
index 3d8903da7002d2307242b09a51ef5e650247cc98..caf35cdaf49acbac549824676e476cebfe8f7492 100644 (file)
@@ -5450,8 +5450,8 @@ store_constructor (exp, target, cleared, size)
                                 TYPE_MODE (sizetype));
            }
          else
-           emit_library_call (gen_rtx_SYMBOL_REF (Pmode, "__setbits"),
-                              LCT_NORMAL, VOIDmode, 4, XEXP (targetx, 0),
+           emit_library_call (setbits_libfunc, LCT_NORMAL,
+                              VOIDmode, 4, XEXP (targetx, 0),
                               Pmode, bitlength_rtx, TYPE_MODE (sizetype),
                               startbit_rtx, TYPE_MODE (sizetype),
                               endbit_rtx, TYPE_MODE (sizetype));
index 1f2ed4401afe61e73611e4ff6ed099f81d19cab0..699fd21e6d477399081ff3dfe97af5a06cd422f8 100644 (file)
@@ -6470,8 +6470,7 @@ expand_main_function ()
 #endif
 
 #ifndef HAS_INIT_SECTION
-  emit_library_call (gen_rtx_SYMBOL_REF (Pmode, NAME__MAIN), LCT_NORMAL,
-                    VOIDmode, 0);
+  emit_library_call (init_one_libfunc (NAME__MAIN), LCT_NORMAL, VOIDmode, 0);
 #endif
 }
 \f
index bb2aa17f3647bac0619f55bd575c245a019a2482..79b7d4249b2353b31f79bb1b19da1a501183e701 100644 (file)
@@ -44,6 +44,7 @@ enum libfunc_index
   LTI_bcmp,
   LTI_memset,
   LTI_bzero,
+  LTI_setbits,
 
   LTI_unwind_resume,
   LTI_eh_personality,
@@ -143,6 +144,9 @@ enum libfunc_index
   LTI_profile_function_entry,
   LTI_profile_function_exit,
 
+  LTI_gcov_flush,
+  LTI_gcov_init,
+
   LTI_MAX
 };
 
@@ -171,6 +175,7 @@ extern GTY(()) rtx libfunc_table[LTI_MAX];
 #define bcmp_libfunc   (libfunc_table[LTI_bcmp])
 #define memset_libfunc (libfunc_table[LTI_memset])
 #define bzero_libfunc  (libfunc_table[LTI_bzero])
+#define setbits_libfunc        (libfunc_table[LTI_setbits])
 
 #define unwind_resume_libfunc  (libfunc_table[LTI_unwind_resume])
 #define eh_personality_libfunc (libfunc_table[LTI_eh_personality])
@@ -271,4 +276,7 @@ extern GTY(()) rtx libfunc_table[LTI_MAX];
 #define profile_function_entry_libfunc (libfunc_table[LTI_profile_function_entry])
 #define profile_function_exit_libfunc  (libfunc_table[LTI_profile_function_exit])
 
+#define gcov_flush_libfunc     (libfunc_table[LTI_gcov_flush])
+#define gcov_init_libfunc      (libfunc_table[LTI_gcov_init])
+
 #endif /* GCC_LIBFUNCS_H */
index 14d93c65fe8392dce373f3b3fdb5c6a92487c75f..fc00b186dee6dedf36657aaf9bb917399ece97df 100644 (file)
@@ -5329,8 +5329,7 @@ init_libfuncs (optable, first_mode, last_mode, opname, suffix)
       *p = '\0';
 
       optable->handlers[(int) mode].libfunc
-       = gen_rtx_SYMBOL_REF (Pmode, ggc_alloc_string (libfunc_name,
-                                                      p - libfunc_name));
+       = init_one_libfunc (ggc_alloc_string (libfunc_name, p - libfunc_name));
     }
 }
 
@@ -5647,6 +5646,7 @@ init_optabs ()
   bcmp_libfunc = init_one_libfunc ("__gcc_bcmp");
   memset_libfunc = init_one_libfunc ("memset");
   bzero_libfunc = init_one_libfunc ("bzero");
+  setbits_libfunc = init_one_libfunc ("__setbits");
 
   unwind_resume_libfunc = init_one_libfunc (USING_SJLJ_EXCEPTIONS
                                            ? "_Unwind_SjLj_Resume"
@@ -5756,6 +5756,9 @@ init_optabs ()
   profile_function_exit_libfunc
     = init_one_libfunc ("__cyg_profile_func_exit");
 
+  gcov_flush_libfunc = init_one_libfunc ("__gcov_flush");
+  gcov_init_libfunc = init_one_libfunc ("__gcov_init");
+
 #ifdef HAVE_conditional_trap
   init_traps ();
 #endif
index 759314451dea6d85129da18b368bad0164125f2a..07f7a72e840fda122b8169e287cd29fc73d27f3b 100644 (file)
@@ -1979,13 +1979,8 @@ create_profiler ()
   cfun->arc_profile = 0;
 
   /* Actually generate the code to call __gcov_init.  */
-  gcov_info_address = force_reg (Pmode,
-                                gen_rtx_SYMBOL_REF (
-                                       Pmode,
-                                       IDENTIFIER_POINTER (
-                                               DECL_NAME (gcov_info))));
-  emit_library_call (gen_rtx_SYMBOL_REF (Pmode, "__gcov_init"),
-                    LCT_NORMAL, VOIDmode, 1,
+  gcov_info_address = force_reg (Pmode, XEXP (DECL_RTL (gcov_info), 0));
+  emit_library_call (gcov_init_libfunc, LCT_NORMAL, VOIDmode, 1,
                     gcov_info_address, Pmode);
 
   expand_function_end (input_filename, lineno, 0);