From 98ce21b3b388f4f93b1926c1bac451ead787292a Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Tue, 11 Dec 2001 18:58:23 -0800 Subject: [PATCH] except.c (sjlj_find_directly_reachable_regions): Don't consider RNL_BLOCKED a directly reachable region. * except.c (sjlj_find_directly_reachable_regions): Don't consider RNL_BLOCKED a directly reachable region. (sjlj_assign_call_site_values): Trust directly_reachable. (sjlj_emit_dispatch_table): Likewise. From-SVN: r47915 --- gcc/ChangeLog | 75 ++++++++++++++++++++++++++++----------------------- gcc/except.c | 18 +++++++------ 2 files changed, 51 insertions(+), 42 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 2755fa146fe..95d55b1e84d 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2001-12-11 Richard Henderson + + * except.c (sjlj_find_directly_reachable_regions): Don't + consider RNL_BLOCKED a directly reachable region. + (sjlj_assign_call_site_values): Trust directly_reachable. + (sjlj_emit_dispatch_table): Likewise. + 2001-12-11 Richard Henderson * config/alpha/alpha.md (divmodsi_internal_er): Split, so that @@ -22,9 +29,9 @@ 2001-12-11 Aldy Hernandez - * output.h (regno_uninitialized): Make argument unsigned. + * output.h (regno_uninitialized): Make argument unsigned. - * flow.c (regno_uninitialized): Make regno unsigned. + * flow.c (regno_uninitialized): Make regno unsigned. 2001-12-11 David O'Brien @@ -69,8 +76,8 @@ 2001-12-11 Aldy Hernandez - * flow.c (find_regno_partial): Indent properly. Add a default to - switch. + * flow.c (find_regno_partial): Indent properly. Add a default to + switch. 2001-12-11 Neil Booth @@ -300,7 +307,7 @@ Sun Dec 9 18:40:07 2001 Douglas B. Rupp * ia64.md: Add missing braces. * rs6000-protos.h (s8bit_cint_operand): Prototype. * s390.h (INITIAL_ELIMINATION_OFFSET): Add abort clause in - if-else statement. + if-else statement. * stormy16.h (REG_CLASS_CONTENTS): Add missing braces. * v850.h (OUTPUT_ADDR_CONST_EXTRA): Don't issue a `return'. * dbxout.c (dbxout_source_file): Move a variable into the scope @@ -336,17 +343,17 @@ Sun Dec 9 18:40:07 2001 Douglas B. Rupp 2001-10-08 Aldy Hernandez * c-common.h (rid): Add RID_CHOOSE_EXPR and - RID_TYPES_COMPATIBLE_P. + RID_TYPES_COMPATIBLE_P. - * c-parse.in (reswords): Add __builtin_choose_expr. - Add __builtin_types_compatible_p. - Add CHOOSE_EXPR token. + * c-parse.in (reswords): Add __builtin_choose_expr. + Add __builtin_types_compatible_p. + Add CHOOSE_EXPR token. Add TYPES_COMPATIBLE_P token. - Add production for CHOOSE_EXPR. - Add production for TYPES_COMPATIBLE_P. + Add production for CHOOSE_EXPR. + Add production for TYPES_COMPATIBLE_P. - * doc/extend.texi (__builtin_choose_expr): Add documentation. - (__builtin_types_compatible_p): Likewise. + * doc/extend.texi (__builtin_choose_expr): Add documentation. + (__builtin_types_compatible_p): Likewise. 2001-12-08 David Edelsohn @@ -404,19 +411,19 @@ Sun Dec 9 18:40:07 2001 Douglas B. Rupp 2001-12-07 Dale Johannesen - * config/rs6000/darwin.h: Set MAX_LONG_TYPE_SIZE to 32. - * config/rs6000/rs6000.c (rs6000_emit_move): In Darwin- - specific codegen, eliminate a register copy. - (print_operand_address): Add support for Darwin's lo16(constant) + * config/rs6000/darwin.h: Set MAX_LONG_TYPE_SIZE to 32. + * config/rs6000/rs6000.c (rs6000_emit_move): In Darwin- + specific codegen, eliminate a register copy. + (print_operand_address): Add support for Darwin's lo16(constant) syntax. - (rs6000_machopic_legitimize_pic_address): Fix darwin-specific - generation of addresses within very large data objects. - (s8bit_cint_operand): New. - * config/rs6000/rs6000.md: Remove "iu" reference for 750/7400. - Move "mtjmpr" to correct functional unit for 750/7400/7450. - Add imul2 and imul3 insn types for multiplication by 16- and + (rs6000_machopic_legitimize_pic_address): Fix darwin-specific + generation of addresses within very large data objects. + (s8bit_cint_operand): New. + * config/rs6000/rs6000.md: Remove "iu" reference for 750/7400. + Move "mtjmpr" to correct functional unit for 750/7400/7450. + Add imul2 and imul3 insn types for multiplication by 16- and 8-bit constants. - Change tablejump patterns to strongly discourage using LR + Change tablejump patterns to strongly discourage using LR rather than CTR. Add %lo16 patterns for Darwin loads and stores. @@ -440,9 +447,9 @@ Sun Dec 9 18:40:07 2001 Douglas B. Rupp * doc/extend.texi (Variable Attributes): Document vector_size. - * attribs.c (c_common_attribute_table): Add vector_size. + * attribs.c (c_common_attribute_table): Add vector_size. (handle_vector_size_attribute): New. - (vector_size_helper): New. + (vector_size_helper): New. (decl_attributes): Relayout the decl after calculating attribs. 2001-12-07 Joseph S. Myers @@ -482,7 +489,7 @@ Fri Dec 7 07:06:17 2001 Richard Kenner 2001-12-06 Aldy Hernandez * rs6000.h (PRE_GCC3_DWARF_FRAME_REGISTERS): New. - (DWARF_FRAME_REGISTERS): Delete. + (DWARF_FRAME_REGISTERS): Delete. 2001-12-06 Janis Johnson @@ -501,14 +508,14 @@ Fri Dec 7 07:06:17 2001 Richard Kenner Fixes PR libf2c/4826. 2001-12-06 Aldy Hernandez - Richard Henderson + Richard Henderson * doc/tm.texi (DWARF_FRAME_REGISTERS): Add documentation. - (PRE_GCC3_DWARF_FRAME_REGISTERS): Same. + (PRE_GCC3_DWARF_FRAME_REGISTERS): Same. - * unwind-dw2.c (__frame_state_for): Change DWARF_FRAME_REGISTERS - to PRE_GCC3_DWARF_FRAME_REGISTERS. - (frame_state): Same. + * unwind-dw2.c (__frame_state_for): Change DWARF_FRAME_REGISTERS + to PRE_GCC3_DWARF_FRAME_REGISTERS. + (frame_state): Same. (PRE_GCC3_DWARF_FRAME_REGISTERS): Define if not already defined. 2001-12-06 Kaveh R. Ghazi @@ -563,9 +570,9 @@ Thu Dec 6 09:24:12 2001 Richard Kenner 2001-12-06 Nick Clifton * config/arm/arm.c (load_multiple_sequence): Pass pointer to - RTX when calling alter_subreg(). + RTX when calling alter_subreg(). (store_multiple_sequence): Pass pointer to RTX when calling - alter_subreg(). + alter_subreg(). Thu Dec 6 06:55:13 2001 Richard Kenner diff --git a/gcc/except.c b/gcc/except.c index cc7177d0a27..98e5e24f948 100644 --- a/gcc/except.c +++ b/gcc/except.c @@ -2014,6 +2014,7 @@ sjlj_find_directly_reachable_regions (lp_info) for (insn = get_insns (); insn ; insn = NEXT_INSN (insn)) { struct eh_region *region; + enum reachable_code rc; tree type_thrown; rtx note; @@ -2035,11 +2036,14 @@ sjlj_find_directly_reachable_regions (lp_info) /* Find the first containing region that might handle the exception. That's the landing pad to which we will transfer control. */ + rc = RNL_NOT_CAUGHT; for (; region; region = region->outer) - if (reachable_next_level (region, type_thrown, 0) != RNL_NOT_CAUGHT) - break; - - if (region) + { + rc = reachable_next_level (region, type_thrown, 0); + if (rc != RNL_NOT_CAUGHT) + break; + } + if (rc == RNL_MAYBE_CAUGHT || rc == RNL_CAUGHT) { lp_info[region->region_number].directly_reachable = 1; found_one = true; @@ -2086,8 +2090,7 @@ sjlj_assign_call_site_values (dispatch_label, lp_info) index = 0; for (i = cfun->eh->last_region_number; i > 0; --i) - if (lp_info[i].directly_reachable - && lp_info[i].action_index >= 0) + if (lp_info[i].directly_reachable) lp_info[i].dispatch_index = index++; /* Finally: assign call-site values. If dwarf2 terms, this would be @@ -2316,8 +2319,7 @@ sjlj_emit_dispatch_table (dispatch_label, lp_info) first_reachable = 0; for (i = cfun->eh->last_region_number; i > 0; --i) { - if (! lp_info[i].directly_reachable - || lp_info[i].action_index < 0) + if (! lp_info[i].directly_reachable) continue; if (! first_reachable) -- 2.30.2