diff options
author | rth <rth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2000-05-28 02:25:46 +0000 |
---|---|---|
committer | rth <rth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2000-05-28 02:25:46 +0000 |
commit | 30dceb30ca0876d616e90c132fbb60833da50268 (patch) | |
tree | 64a0402d015893558373f8e8a8ee91f36f3af265 /gcc/config/alpha/alpha.c | |
parent | 66f29f9d1acc87ffd90e5f4ed170394beddc269e (diff) | |
download | gcc-30dceb30ca0876d616e90c132fbb60833da50268.tar.gz |
* config/alpha/alpha.c (alpha_does_function_need_gp): Test
TARGET_PROFILING_NEEDS_GP in the if, instead of with an ifdef.
(alpha_expand_prologue): Emit prologue_mcount if needed.
* config/alpha/alpha.h (TARGET_PROFILING_NEEDS_GP): Default to 0.
* config/alpha/alpha.md (prologue_mcount): New.
* config/alpha/linux.h (FUNCTION_PROFILER): Remove.
(TARGET_PROFILING_NEEDS_GP): Undef before redefining.
* config/alpha/netbsd.h: Likewise.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@34222 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/config/alpha/alpha.c')
-rw-r--r-- | gcc/config/alpha/alpha.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/gcc/config/alpha/alpha.c b/gcc/config/alpha/alpha.c index ed708788d7c..f70e889bac8 100644 --- a/gcc/config/alpha/alpha.c +++ b/gcc/config/alpha/alpha.c @@ -4056,10 +4056,8 @@ alpha_does_function_need_gp () if (TARGET_WINDOWS_NT || TARGET_OPEN_VMS) return 0; -#ifdef TARGET_PROFILING_NEEDS_GP - if (profile_flag) + if (TARGET_PROFILING_NEEDS_GP && profile_flag) return 1; -#endif #ifdef ASM_OUTPUT_MI_THUNK if (current_function_is_thunk) @@ -4190,6 +4188,13 @@ alpha_expand_prologue () emit_insn (gen_prologue_ldgp ()); } + /* TARGET_PROFILING_NEEDS_GP actually implies that we need to insert + the call to mcount ourselves, rather than having the linker do it + magically in response to -pg. Since _mcount has special linkage, + don't represent the call as a call. */ + if (TARGET_PROFILING_NEEDS_GP && profile_flag) + emit_insn (gen_prologue_mcount ()); + /* Adjust the stack by the frame size. If the frame size is > 4096 bytes, we need to be sure we probe somewhere in the first and last 4096 bytes (we can probably get away without the latter test) and |