diff options
author | olegendo <olegendo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-03-21 20:19:31 +0000 |
---|---|---|
committer | olegendo <olegendo@138bc75d-0d04-0410-961f-82ee72b054a4> | 2012-03-21 20:19:31 +0000 |
commit | 8fe7656faf7b78e29b1f361f76e7b9fbbb30581d (patch) | |
tree | 95b619449df10fe2da08648e140784df8f69ceea | |
parent | 2ac000bb67d11f6b11441e887362c90d20e46c9e (diff) | |
download | ppe42-gcc-8fe7656faf7b78e29b1f361f76e7b9fbbb30581d.tar.gz ppe42-gcc-8fe7656faf7b78e29b1f361f76e7b9fbbb30581d.zip |
PR/target 52642
* config/sh/sh.c (sh_expand_prologue): Emit blockage at the end of
prologue for unwinder and profiler.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@185616 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/config/sh/sh.c | 7 |
2 files changed, 13 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index efa5bfbf2a6..fd07ac60844 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2012-03-21 Kaz Kojima <kkojima@gcc.gnu.org> + + PR/target 52642 + * config/sh/sh.c (sh_expand_prologue): Emit blockage at the end of + prologue for unwinder and profiler. + 2012-03-21 Andreas Tobler <andreast@fgznet.ch> * configure.ac (HAVE_LD_NO_DOT_SYMBOLS): Add powerpc64-*-freebsd*. diff --git a/gcc/config/sh/sh.c b/gcc/config/sh/sh.c index 4b5db674e82..1bfd89b44b7 100644 --- a/gcc/config/sh/sh.c +++ b/gcc/config/sh/sh.c @@ -7239,6 +7239,13 @@ sh_expand_prologue (void) emit_insn (gen_shcompact_incoming_args ()); } + /* If we are profiling, make sure no instructions are scheduled before + the call to mcount. Similarly if some call instructions are swapped + before frame related insns, it'll confuse the unwinder because + currently SH has no unwind info for function epilogues. */ + if (crtl->profile || flag_exceptions || flag_unwind_tables) + emit_insn (gen_blockage ()); + if (flag_stack_usage_info) current_function_static_stack_size = stack_usage; } |