summaryrefslogtreecommitdiff
path: root/gcc/libgcc2.c
diff options
context:
space:
mode:
authorjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>1997-12-04 09:41:38 +0000
committerjason <jason@138bc75d-0d04-0410-961f-82ee72b054a4>1997-12-04 09:41:38 +0000
commit23ceb7b213c83177de7ebc9e593a91529d2066ad (patch)
tree952b95458e119610c40fb72e6d852f3a40843ba5 /gcc/libgcc2.c
parent639bdbf65ea3f0bed4f4b5f9760720101cbcc0e9 (diff)
downloadgcc-23ceb7b213c83177de7ebc9e593a91529d2066ad.tar.gz
./: * libgcc2.c (__throw): Use __builtin_return_addr instead of __eh_pc.
* except.c: Lose outer_context_label_stack. (expand_eh_region_end): Rethrow from outer_context here. (expand_fixup_region_end): Let expand_eh_region_end do the rethrow. (expand_internal_throw): Take no args. (expand_internal_throw_indirect): Lose. (expand_leftover_cleanups, expand_start_all_catch): Use expand_rethrow. (expand_start_all_catch): Start a rethrow region. (expand_end_all_catch): End it. (expand_rethrow): New fn. * except.h: Reflect above changes. cp/: * except.c (expand_end_catch_block): Lose rethrow region. (expand_start_catch_block): Likewise. (expand_end_catch_block): Don't expand_leftover_cleanups. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@16937 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/libgcc2.c')
-rw-r--r--gcc/libgcc2.c7
1 files changed, 4 insertions, 3 deletions
diff --git a/gcc/libgcc2.c b/gcc/libgcc2.c
index 53af01b0e31..faa3c14cf2e 100644
--- a/gcc/libgcc2.c
+++ b/gcc/libgcc2.c
@@ -3154,8 +3154,6 @@ __sjpopnthrow ()
/* This value identifies the place from which an exception is being
thrown. */
-void *__eh_pc;
-
#ifdef EH_TABLE_LOOKUP
EH_TABLE_LOOKUP
@@ -3212,6 +3210,8 @@ find_exception_handler (void *pc, exception_table *table)
/* Support code for exception handling using inline unwinders or
__unwind_function. */
+void *__eh_pc;
+
#ifndef EH_TABLE_LOOKUP
typedef struct exception_table_node {
exception_table *table;
@@ -3489,7 +3489,7 @@ in_reg_window (int reg, frame_state *udata)
void
__throw ()
{
- void *pc, *handler, *retaddr;
+ void *pc, *handler, *retaddr, *__eh_pc;
frame_state ustruct, ustruct2;
frame_state *udata = &ustruct;
frame_state *sub_udata = &ustruct2;
@@ -3524,6 +3524,7 @@ label:
__builtin_unwind_init ();
/* Now reset pc to the right throw point. */
+ __eh_pc = __builtin_extract_return_addr (__builtin_return_address (0)) - 1;
pc = __eh_pc;
handler = 0;