This is the mail archive of the 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]
Other format: [Raw text]

[patch committed] SH: Fix missing label for the eh landing pad


I've committed the attached patch which works around another
latent issue exposed with the fix for PR target/42841.  See
the audit trail of PR42841 for the details.  The patch makes
find_barrier not to emit the constant pool at the landing pad.
It's tested with the bootstrap and the top level "make -k check"
on sh4-unknown-linux-gnu with no new failures.

2010-02-10  Kaz Kojima  <>

	* config/sh/sh.c (find_barrier): Skip call insn with a REG_EH_REGION
	note when flag_exceptions is set.

--- ORIG/trunk/gcc/config/sh/sh.c	2010-02-10 07:17:07.000000000 +0900
+++ trunk/gcc/config/sh/sh.c	2010-10-04 09:01:16.000000000 +0900
@@ -4654,6 +4654,13 @@ find_barrier (int num_mova, rtx mova, rt
       if (last_got)
         from = PREV_INSN (last_got);
+      /* Don't insert the constant pool table at the position which
+	 may be the landing pad.  */
+      if (flag_exceptions
+	  && CALL_P (from)
+	  && find_reg_note (from, REG_EH_REGION, NULL_RTX))
+	from = PREV_INSN (from);
       /* Walk back to be just before any jump or label.
 	 Putting it before a label reduces the number of times the branch
 	 around the constant pool table will be hit.  Putting it before

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