Mercurial > hg > CbC > CbC_gcc
comparison gcc/except.c @ 63:b7f97abdc517 gcc-4.6-20100522
update gcc from gcc-4.5.0 to gcc-4.6
author | ryoma <e075725@ie.u-ryukyu.ac.jp> |
---|---|
date | Mon, 24 May 2010 12:47:05 +0900 |
parents | 77e2b8dfacca |
children | f6334be47118 |
comparison
equal
deleted
inserted
replaced
56:3c8a44c06a95 | 63:b7f97abdc517 |
---|---|
1 /* Implements exception handling. | 1 /* Implements exception handling. |
2 Copyright (C) 1989, 1992, 1993, 1994, 1995, 1996, 1997, 1998, | 2 Copyright (C) 1989, 1992, 1993, 1994, 1995, 1996, 1997, 1998, |
3 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009 | 3 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 |
4 Free Software Foundation, Inc. | 4 Free Software Foundation, Inc. |
5 Contributed by Mike Stump <mrs@cygnus.com>. | 5 Contributed by Mike Stump <mrs@cygnus.com>. |
6 | 6 |
7 This file is part of GCC. | 7 This file is part of GCC. |
8 | 8 |
137 #include "tm_p.h" | 137 #include "tm_p.h" |
138 #include "target.h" | 138 #include "target.h" |
139 #include "langhooks.h" | 139 #include "langhooks.h" |
140 #include "cgraph.h" | 140 #include "cgraph.h" |
141 #include "diagnostic.h" | 141 #include "diagnostic.h" |
142 #include "tree-pretty-print.h" | |
142 #include "tree-pass.h" | 143 #include "tree-pass.h" |
143 #include "timevar.h" | 144 #include "timevar.h" |
144 #include "tree-flow.h" | 145 #include "tree-flow.h" |
145 | 146 |
146 /* Provide defaults for stuff that may not be defined when using | 147 /* Provide defaults for stuff that may not be defined when using |
150 #endif | 151 #endif |
151 | 152 |
152 /* Protect cleanup actions with must-not-throw regions, with a call | 153 /* Protect cleanup actions with must-not-throw regions, with a call |
153 to the given failure handler. */ | 154 to the given failure handler. */ |
154 tree (*lang_protect_cleanup_actions) (void); | 155 tree (*lang_protect_cleanup_actions) (void); |
155 | |
156 /* Return true if type A catches type B. */ | |
157 int (*lang_eh_type_covers) (tree a, tree b); | |
158 | 156 |
159 static GTY(()) int call_site_base; | 157 static GTY(()) int call_site_base; |
160 static GTY ((param_is (union tree_node))) | 158 static GTY ((param_is (union tree_node))) |
161 htab_t type_to_runtime_map; | 159 htab_t type_to_runtime_map; |
162 | 160 |
972 | 970 |
973 start_sequence (); | 971 start_sequence (); |
974 | 972 |
975 lp->landing_pad = gen_label_rtx (); | 973 lp->landing_pad = gen_label_rtx (); |
976 emit_label (lp->landing_pad); | 974 emit_label (lp->landing_pad); |
975 LABEL_PRESERVE_P (lp->landing_pad) = 1; | |
977 | 976 |
978 #ifdef HAVE_exception_receiver | 977 #ifdef HAVE_exception_receiver |
979 if (HAVE_exception_receiver) | 978 if (HAVE_exception_receiver) |
980 emit_insn (gen_exception_receiver ()); | 979 emit_insn (gen_exception_receiver ()); |
981 else | 980 else |
1152 else | 1151 else |
1153 emit_move_insn (mem, const0_rtx); | 1152 emit_move_insn (mem, const0_rtx); |
1154 | 1153 |
1155 #ifdef DONT_USE_BUILTIN_SETJMP | 1154 #ifdef DONT_USE_BUILTIN_SETJMP |
1156 { | 1155 { |
1157 rtx x; | 1156 rtx x, last; |
1158 x = emit_library_call_value (setjmp_libfunc, NULL_RTX, LCT_RETURNS_TWICE, | 1157 x = emit_library_call_value (setjmp_libfunc, NULL_RTX, LCT_RETURNS_TWICE, |
1159 TYPE_MODE (integer_type_node), 1, | 1158 TYPE_MODE (integer_type_node), 1, |
1160 plus_constant (XEXP (fc, 0), | 1159 plus_constant (XEXP (fc, 0), |
1161 sjlj_fc_jbuf_ofs), Pmode); | 1160 sjlj_fc_jbuf_ofs), Pmode); |
1162 | 1161 |
1163 emit_cmp_and_jump_insns (x, const0_rtx, NE, 0, | 1162 emit_cmp_and_jump_insns (x, const0_rtx, NE, 0, |
1164 TYPE_MODE (integer_type_node), 0, dispatch_label); | 1163 TYPE_MODE (integer_type_node), 0, dispatch_label); |
1165 add_reg_br_prob_note (get_insns (), REG_BR_PROB_BASE/100); | 1164 last = get_last_insn (); |
1165 if (JUMP_P (last) && any_condjump_p (last)) | |
1166 { | |
1167 gcc_assert (!find_reg_note (last, REG_BR_PROB, 0)); | |
1168 add_reg_note (last, REG_BR_PROB, GEN_INT (REG_BR_PROB_BASE / 100)); | |
1169 } | |
1166 } | 1170 } |
1167 #else | 1171 #else |
1168 expand_builtin_setjmp_setup (plus_constant (XEXP (fc, 0), sjlj_fc_jbuf_ofs), | 1172 expand_builtin_setjmp_setup (plus_constant (XEXP (fc, 0), sjlj_fc_jbuf_ofs), |
1169 dispatch_label); | 1173 dispatch_label); |
1170 #endif | 1174 #endif |