summaryrefslogtreecommitdiff
path: root/gcc/except.c
diff options
context:
space:
mode:
authorbstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4>2010-02-23 15:39:50 +0000
committerbstarynk <bstarynk@138bc75d-0d04-0410-961f-82ee72b054a4>2010-02-23 15:39:50 +0000
commit46d58fa5d18f3667ae6d506a2fd08bcbf782d46f (patch)
tree8558d61563a5774f4be3abfc1b874da2ee621b4d /gcc/except.c
parent770f5885e2423d3e043869e6059113f7491e025e (diff)
downloadgcc-46d58fa5d18f3667ae6d506a2fd08bcbf782d46f.tar.gz
2010-02-23 Basile Starynkevitch <basile@starynkevitch.net>
MELT branch merged with trunk rev 156999 git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/branches/melt-branch@157006 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/except.c')
-rw-r--r--gcc/except.c11
1 files changed, 8 insertions, 3 deletions
diff --git a/gcc/except.c b/gcc/except.c
index 10b547dcf3c..8012d781834 100644
--- a/gcc/except.c
+++ b/gcc/except.c
@@ -1,6 +1,6 @@
/* Implements exception handling.
Copyright (C) 1989, 1992, 1993, 1994, 1995, 1996, 1997, 1998,
- 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009
+ 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
Free Software Foundation, Inc.
Contributed by Mike Stump <mrs@cygnus.com>.
@@ -1154,7 +1154,7 @@ sjlj_emit_function_enter (rtx dispatch_label)
#ifdef DONT_USE_BUILTIN_SETJMP
{
- rtx x;
+ rtx x, last;
x = emit_library_call_value (setjmp_libfunc, NULL_RTX, LCT_RETURNS_TWICE,
TYPE_MODE (integer_type_node), 1,
plus_constant (XEXP (fc, 0),
@@ -1162,7 +1162,12 @@ sjlj_emit_function_enter (rtx dispatch_label)
emit_cmp_and_jump_insns (x, const0_rtx, NE, 0,
TYPE_MODE (integer_type_node), 0, dispatch_label);
- add_reg_br_prob_note (get_insns (), REG_BR_PROB_BASE/100);
+ last = get_last_insn ();
+ if (JUMP_P (last) && any_condjump_p (last))
+ {
+ gcc_assert (!find_reg_note (last, REG_BR_PROB, 0));
+ add_reg_note (last, REG_BR_PROB, GEN_INT (REG_BR_PROB_BASE / 100));
+ }
}
#else
expand_builtin_setjmp_setup (plus_constant (XEXP (fc, 0), sjlj_fc_jbuf_ofs),