From c299b39cfe0b941882f9873c3311fb15fc434e6e Mon Sep 17 00:00:00 2001 From: kkojima Date: Wed, 10 Feb 2010 13:13:49 +0000 Subject: [PATCH] * config/sh/sh.c (find_barrier): Skip call insn with a REG_EH_REGION note when flag_exceptions is set. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@156656 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 5 +++++ gcc/config/sh/sh.c | 7 +++++++ 2 files changed, 12 insertions(+) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 887a03bc91d..e680a14a631 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +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. + 2010-02-10 Duncan Sands * Makefile.in (PLUGIN_HEADERS): Add debug.h. diff --git a/gcc/config/sh/sh.c b/gcc/config/sh/sh.c index d482100fbe2..3e8ff24d041 100644 --- a/gcc/config/sh/sh.c +++ b/gcc/config/sh/sh.c @@ -4654,6 +4654,13 @@ find_barrier (int num_mova, rtx mova, rtx from) 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 -- 2.11.0