This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Could not build libstdc++-v3 with --target=sh-elf


On Jan  8, 2001, Joern Rennecke <amylaar@cambridge.redhat.com> wrote:

> There should be no wide aligns.  There is logic that should prevent
> wide aligns in splitted branches, you'll have to track down why it fails.

Done.  Here's the patch, containing a short explanation.  Does this
one look good to you?

Index: gcc/ChangeLog
from  Alexandre Oliva  <aoliva@redhat.com>

	* config/sh/sh.c (barrier_align): Recognize branch around far
	branch and redundant insn.

2001-01-11  Alexandre Oliva  <aoliva@redhat.com>

	* Makefile.in (check-gcc//%, check-g++//%, check-g77//%,
	check-objc//%): Support parallel testing of multilibs.
	(TESTSUITEDIR): Set to testsuite by default, but override for
	parallel testing.
	(check-gcc, check-g++, check-g77, check-objc): Enter
	$(TESTSUITEDIR).

Index: gcc/config/sh/sh.c
===================================================================
RCS file: /cvs/gcc/egcs/gcc/config/sh/sh.c,v
retrieving revision 1.83
diff -u -p -r1.83 sh.c
--- gcc/config/sh/sh.c 2001/01/09 10:31:32 1.83
+++ gcc/config/sh/sh.c 2001/01/11 16:23:43
@@ -2862,7 +2862,11 @@ barrier_align (barrier_or_label)
       if (prev
 	  && GET_CODE (prev) == JUMP_INSN
 	  && JUMP_LABEL (prev)
-	  && (jump_to_next || next_real_insn (JUMP_LABEL (prev)) == next))
+	  && (jump_to_next || next_real_insn (JUMP_LABEL (prev)) == next
+	      /* If relax_delay_slots() decides NEXT was redundant
+		 with some previous instruction, it will have
+		 redirected PREV's jump to the following insn.  */
+	      || JUMP_LABEL (prev) == next_nonnote_insn (next)))
 	{
 	  rtx pat = PATTERN (prev);
 	  if (GET_CODE (pat) == PARALLEL)

-- 
Alexandre Oliva   Enjoy Guarana', see http://www.ic.unicamp.br/~oliva/
Red Hat GCC Developer                  aoliva@{cygnus.com, redhat.com}
CS PhD student at IC-Unicamp        oliva@{lsd.ic.unicamp.br, gnu.org}
Free Software Evangelist    *Please* write to mailing lists, not to me

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]