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.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/gcc-4_7-branch@188087
138bc75d-0d04-0410-961f-
82ee72b054a4
2012-06-01 Oleg Endo <olegendo@gcc.gnu.org>
Backport from mainline
+ 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-06-01 Oleg Endo <olegendo@gcc.gnu.org>
+
+ Backport from mainline
2012-03-03 Kaz Kojima <kkojima@gcc.gnu.org>
* config/sh/sh.md (abssi2): Add TARGET_SH1 condition.
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;
}