diff options
author | rth <rth@138bc75d-0d04-0410-961f-82ee72b054a4> | 1998-02-02 19:28:57 +0000 |
---|---|---|
committer | rth <rth@138bc75d-0d04-0410-961f-82ee72b054a4> | 1998-02-02 19:28:57 +0000 |
commit | 0d179e03a9188621b28d235fa4f836af619e20c2 (patch) | |
tree | 6fde390bee19acf841e5ec6c02e403d195086099 /gcc/except.c | |
parent | 0722b5c976b8844f5121fbfb820c517d24d50ab2 (diff) | |
download | gcc-0d179e03a9188621b28d235fa4f836af619e20c2.tar.gz |
* expr.c (expand_builtin_setjmp): Accept two new arguments for
the labels to branch to on first and subsequent executions. Don't
play with __dummy. Rename `setjmp' insn to `builtin_setjmp_setup',
and provide it with the jmp_buf. Use only one of
`builtin_setjmp_receiver' or `nonlocal_goto_receiver',
and provide the former with the target label.
(expand_builtin) [BUILTIN_SETJMP]: Generate a label for use by setjmp.
(expand_builtin) [BUILTIN_LONGJMP]: Split out to ...
(expand_builtin_longjmp): ... here. Recognize a `builtin_longjmp'
insn to replace all of the normal nonlocal_goto code. Don't play
with __dummy. Correct arguments to nonlocal_goto.
* expr.h (expand_builtin_setjmp): Update prototype.
* except.c (start_dynamic_handler): When using builtin_setjmp,
generate more accurate flow information.
* alpha.md (nonlocal_goto_receiver_osf): Delete.
(nonlocal_goto_receiver_vms): Rename to nonlocal_goto_receiver.
(builtin_longjmp, builtin_setjmp_receiver): New.
* sparc.md (update_return): Disambiguate unspec number.
(nonlocal_goto): Rearrange arguments to match caller in except.c.
(builtin_setjmp_setup): Rename from setjmp. Match and ignore the
jmp_buf operand.
* mips.md (nonlocal_goto_receiver, builtin_setjmp_receiver): Remove.
(builtin_setjmp_setup*, builtin_longjmp): New.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@17602 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/except.c')
-rw-r--r-- | gcc/except.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/gcc/except.c b/gcc/except.c index fce1b723806..12abb103d65 100644 --- a/gcc/except.c +++ b/gcc/except.c @@ -945,15 +945,18 @@ start_dynamic_handler () #ifdef DONT_USE_BUILTIN_SETJMP x = emit_library_call_value (setjmp_libfunc, NULL_RTX, 1, SImode, 1, buf, Pmode); + /* If we come back here for a catch, transfer control to the handler. */ + jumpif_rtx (x, ehstack.top->entry->exception_handler_label); #else - x = expand_builtin_setjmp (buf, NULL_RTX); + { + /* A label to continue execution for the no exception case. */ + rtx noex = gen_label_rtx(); + x = expand_builtin_setjmp (buf, NULL_RTX, noex, + ehstack.top->entry->exception_handler_label); + emit_label (noex); + } #endif - /* If we come back here for a catch, transfer control to the - handler. */ - - jumpif_rtx (x, ehstack.top->entry->exception_handler_label); - /* We are committed to this, so update the handler chain. */ emit_move_insn (dhc, XEXP (arg, 0)); |