public inbox for gcc-patches@gcc.gnu.org
 help / color / mirror / Atom feed
* [SH, 4.7] Backport PR 52642 - libstdc++ failures
@ 2012-05-31 21:06 Oleg Endo
  2012-05-31 22:06 ` Kaz Kojima
  0 siblings, 1 reply; 2+ messages in thread
From: Oleg Endo @ 2012-05-31 21:06 UTC (permalink / raw)
  To: gcc-patches

[-- Attachment #1: Type: text/plain, Size: 556 bytes --]

Original patch:
http://gcc.gnu.org/ml/gcc-patches/2012-03/msg01393.html

'Tested' with..

../gcc-4_7-branch/configure --target=sh-elf --prefix=/usr/local
--enable-languages=c,c++ --enable-multilib --disable-libssp
--disable-nls --disable-werror --enable-lto --with-newlib --with-gnu-as
--with-gnu-ld --with-system-zlib

make all

OK for 4.7 branch?

ChangeLog:

	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.


[-- Attachment #2: pr52642.patch --]
[-- Type: text/x-patch, Size: 727 bytes --]

Index: gcc/config/sh/sh.c
===================================================================
--- gcc/config/sh/sh.c	(revision 185554)
+++ gcc/config/sh/sh.c	(working copy)
@@ -7239,6 +7239,13 @@
       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;
 }

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [SH, 4.7] Backport PR 52642 - libstdc++ failures
  2012-05-31 21:06 [SH, 4.7] Backport PR 52642 - libstdc++ failures Oleg Endo
@ 2012-05-31 22:06 ` Kaz Kojima
  0 siblings, 0 replies; 2+ messages in thread
From: Kaz Kojima @ 2012-05-31 22:06 UTC (permalink / raw)
  To: oleg.endo; +Cc: gcc-patches

Oleg Endo <oleg.endo@t-online.de> wrote:
> Original patch:
> http://gcc.gnu.org/ml/gcc-patches/2012-03/msg01393.html
> 
> 'Tested' with..
> 
> ../gcc-4_7-branch/configure --target=sh-elf --prefix=/usr/local
> --enable-languages=c,c++ --enable-multilib --disable-libssp
> --disable-nls --disable-werror --enable-lto --with-newlib --with-gnu-as
> --with-gnu-ld --with-system-zlib
> 
> make all
> 
> OK for 4.7 branch?
> 
> ChangeLog:
> 
> 	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.

OK as the fix for a regression from 4.6.

Regards,
	kaz

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-05-31 22:06 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-05-31 21:06 [SH, 4.7] Backport PR 52642 - libstdc++ failures Oleg Endo
2012-05-31 22:06 ` Kaz Kojima

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).