From: David S. Miller Date: Wed, 14 May 2008 08:39:46 +0000 (+0000) Subject: sparc.c (sparc_profile_hook): If NO_PROFILE_COUNTERS, don't generate and pass a label... X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=cc44abe6a5bedb27256cfb8b2c9d42c3873ceacd;p=gcc.git sparc.c (sparc_profile_hook): If NO_PROFILE_COUNTERS, don't generate and pass a label into mcount. * config/sparc/sparc.c (sparc_profile_hook): If NO_PROFILE_COUNTERS, don't generate and pass a label into mcount. * config/sparc/linux.h (NO_PROFILE_COUNTERS): Define as 1. * config/sparc/linux64.h (NO_PROFILE_COUNTERS): Likewise. From-SVN: r135284 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index d5b6672174f..c9f46852f68 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,11 @@ +2008-05-14 David S. Miller + + * config/sparc/sparc.c (sparc_profile_hook): If + NO_PROFILE_COUNTERS, don't generate and pass a label + into mcount. + * config/sparc/linux.h (NO_PROFILE_COUNTERS): Define as 1. + * config/sparc/linux64.h (NO_PROFILE_COUNTERS): Likewise. + 2008-05-14 Andreas Krebbel * cse.c (cse_cc_succs): Invoke delete_insn_and_edges. diff --git a/gcc/config/sparc/linux.h b/gcc/config/sparc/linux.h index 67b6412d2e9..ab2ab308c91 100644 --- a/gcc/config/sparc/linux.h +++ b/gcc/config/sparc/linux.h @@ -175,3 +175,6 @@ do { \ /* Define if long doubles should be mangled as 'g'. */ #define TARGET_ALTERNATE_LONG_DOUBLE_MANGLING + +/* We use glibc _mcount for profiling. */ +#define NO_PROFILE_COUNTERS 1 diff --git a/gcc/config/sparc/linux64.h b/gcc/config/sparc/linux64.h index f8c87b95c86..cd156673faf 100644 --- a/gcc/config/sparc/linux64.h +++ b/gcc/config/sparc/linux64.h @@ -309,3 +309,6 @@ do { \ /* Define if long doubles should be mangled as 'g'. */ #define TARGET_ALTERNATE_LONG_DOUBLE_MANGLING + +/* We use glibc _mcount for profiling. */ +#define NO_PROFILE_COUNTERS 1 diff --git a/gcc/config/sparc/sparc.c b/gcc/config/sparc/sparc.c index 2758e4d8485..c1cc725334c 100644 --- a/gcc/config/sparc/sparc.c +++ b/gcc/config/sparc/sparc.c @@ -7800,11 +7800,17 @@ sparc_profile_hook (int labelno) char buf[32]; rtx lab, fun; - ASM_GENERATE_INTERNAL_LABEL (buf, "LP", labelno); - lab = gen_rtx_SYMBOL_REF (Pmode, ggc_strdup (buf)); fun = gen_rtx_SYMBOL_REF (Pmode, MCOUNT_FUNCTION); - - emit_library_call (fun, LCT_NORMAL, VOIDmode, 1, lab, Pmode); + if (NO_PROFILE_COUNTERS) + { + emit_library_call (fun, LCT_NORMAL, VOIDmode, 0); + } + else + { + ASM_GENERATE_INTERNAL_LABEL (buf, "LP", labelno); + lab = gen_rtx_SYMBOL_REF (Pmode, ggc_strdup (buf)); + emit_library_call (fun, LCT_NORMAL, VOIDmode, 1, lab, Pmode); + } } #ifdef OBJECT_FORMAT_ELF