diff options
author | David S. Miller <davem@davemloft.net> | 2008-05-14 08:39:46 +0000 |
---|---|---|
committer | David S. Miller <davem@gcc.gnu.org> | 2008-05-14 01:39:46 -0700 |
commit | cc44abe6a5bedb27256cfb8b2c9d42c3873ceacd (patch) | |
tree | ff37f188be94e6a92b63d0f364f9e94bc49d13aa /gcc/config | |
parent | eaa2f8c7e6ae12642905df0e518d58b724bccf5f (diff) | |
download | gcc-cc44abe6a5bedb27256cfb8b2c9d42c3873ceacd.zip gcc-cc44abe6a5bedb27256cfb8b2c9d42c3873ceacd.tar.gz gcc-cc44abe6a5bedb27256cfb8b2c9d42c3873ceacd.tar.bz2 |
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
Diffstat (limited to 'gcc/config')
-rw-r--r-- | gcc/config/sparc/linux.h | 3 | ||||
-rw-r--r-- | gcc/config/sparc/linux64.h | 3 | ||||
-rw-r--r-- | gcc/config/sparc/sparc.c | 14 |
3 files changed, 16 insertions, 4 deletions
diff --git a/gcc/config/sparc/linux.h b/gcc/config/sparc/linux.h index 67b6412..ab2ab30 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 f8c87b9..cd15667 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 2758e4d..c1cc725 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 |