From 800da97743ec985d0de0215afcf6bb44b7cd23c8 Mon Sep 17 00:00:00 2001 From: Arnaud Charlet Date: Mon, 20 Jan 2014 16:13:01 +0100 Subject: [multiple changes] 2014-01-20 Robert Dewar * gnat1drv.adb: Minor comment update. 2014-01-20 Tristan Gingold * raise-gcc.c (PERSONALITY_FUNCTION/arm): Remove unused variables, comment out unused code. * a-exexpr-gcc.adb: Move declarations to s-excmac-gcc.ads * s-excmac-gcc.ads: New file, extracted from a-exexpr-gcc.adb * s-excmac-arm.ads: New file. 2014-01-20 Hristian Kirtchev * exp_ch4.adb (Expand_N_Slice): Remove constant D and variables Drange and Index_Typ. Remove the circuitry which creates a range check to compare the index type of the array against the discrete_range. * sem_res.adb (Resolve_Slice): Add local variable Dexpr. Update the circuitry which creates a range check to handle a discrete_range denoted by a subtype indication. 2014-01-20 Pierre-Marie Derodat * sinput.adb, sinput.ads (Sloc_Range): Traverse the tree of original nodes to get the original sloc range. 2014-01-20 Hristian Kirtchev * sem_prag.adb (Analyze_Pragma): Use Defining_Entity to obtain the entity of a [library level] package. From-SVN: r206817 --- gcc/ada/raise-gcc.c | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) (limited to 'gcc/ada/raise-gcc.c') diff --git a/gcc/ada/raise-gcc.c b/gcc/ada/raise-gcc.c index 53fc070..fda51cc 100644 --- a/gcc/ada/raise-gcc.c +++ b/gcc/ada/raise-gcc.c @@ -878,6 +878,8 @@ exception_class_eq (const _GNAT_Exception *except, unsigned long long ec) #endif } +/* Return how CHOICE matches PROPAGATED_EXCEPTION. */ + static enum action_kind is_handled_by (_Unwind_Ptr choice, _GNAT_Exception *propagated_exception) { @@ -937,7 +939,8 @@ is_handled_by (_Unwind_Ptr choice, _GNAT_Exception *propagated_exception) void *choice_typeinfo = Foreign_Data_For (choice); void *except_typeinfo = (((struct __cxa_exception *) - ((_Unwind_Exception *)propagated_exception + 1)) - 1)->exceptionType; + ((_Unwind_Exception *)propagated_exception + 1)) - 1) + ->exceptionType; /* Typeinfo are directly compared, which might not be correct if they aren't merged. ??? We should call the == operator if this module is @@ -995,7 +998,6 @@ get_action_description_for (_Unwind_Ptr ip, else { const unsigned char * p = action->table_entry; - _sleb128_t ar_filter, ar_disp; action->kind = nothing; @@ -1028,7 +1030,8 @@ get_action_description_for (_Unwind_Ptr ip, /* See if the filter we have is for an exception which matches the one we are propagating. */ - _Unwind_Ptr choice = get_ttype_entry_for (region, ar_filter); + _Unwind_Ptr choice = + get_ttype_entry_for (region, ar_filter); act = is_handled_by (choice, gnat_exception); if (act != nothing) @@ -1105,7 +1108,7 @@ extern void __gnat_notify_unhandled_exception (struct Exception_Occurrence *); #endif /* Code executed to continue unwinding. With the ARM unwinder, the - personality routine must unwind one frame. */ + personality routine must unwind one frame (per EHABI 7.3 4.). */ static _Unwind_Reason_Code continue_unwind (struct _Unwind_Exception* ue_header, @@ -1294,9 +1297,6 @@ PERSONALITY_FUNCTION (_Unwind_State state, struct _Unwind_Context* uw_context) { _Unwind_Action uw_phases; - region_descriptor region; - action_descriptor action; - _Unwind_Ptr ip; switch (state & _US_ACTION_MASK) { @@ -1306,14 +1306,21 @@ PERSONALITY_FUNCTION (_Unwind_State state, break; case _US_UNWIND_FRAME_STARTING: + /* Phase 2, to call a cleanup. */ uw_phases = _UA_CLEANUP_PHASE; +#if 0 + /* ??? We don't use UA_HANDLER_FRAME (except to debug). Futhermore, + barrier_cache.sp isn't yet set. */ if (!(state & _US_FORCE_UNWIND) && (uw_exception->barrier_cache.sp == _Unwind_GetGR (uw_context, UNWIND_STACK_REG))) uw_phases |= _UA_HANDLER_FRAME; +#endif break; case _US_UNWIND_FRAME_RESUME: + /* Phase 2, called at the return of a cleanup. In the GNU + implementation, there is nothing left to do, so we simply go on. */ return continue_unwind (uw_exception, uw_context); default: -- cgit v1.1