diff options
author | Mike Stump <mrs@gcc.gnu.org> | 1997-05-16 01:00:58 +0000 |
---|---|---|
committer | Mike Stump <mrs@gcc.gnu.org> | 1997-05-16 01:00:58 +0000 |
commit | c133e33c68938cc2b9e6de3fc73e672654513bed (patch) | |
tree | bceaa95a86e8d130cd3662e224ef9e5689d7be49 /gcc | |
parent | f51430ed7aa820f0c77e0095a5b7a1a7846fc345 (diff) | |
download | gcc-c133e33c68938cc2b9e6de3fc73e672654513bed.zip gcc-c133e33c68938cc2b9e6de3fc73e672654513bed.tar.gz gcc-c133e33c68938cc2b9e6de3fc73e672654513bed.tar.bz2 |
except.c (expand_start_all_catch): If the machine needs to perform any actions at the start of an expcetion...
* except.c (expand_start_all_catch): If the machine needs to
perform any actions at the start of an expcetion handler that
hasn't already been done, use gen_exception_receiver to emit it.
(expand_leftover_cleanups): Likewise.
* alpha/alpha.md (exception_receiver): Use it.
* pa/pa.h (exception_receiver): Use it.
From-SVN: r14071
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/config/alpha/alpha.md | 5 | ||||
-rw-r--r-- | gcc/config/pa/pa.md | 20 |
2 files changed, 25 insertions, 0 deletions
diff --git a/gcc/config/alpha/alpha.md b/gcc/config/alpha/alpha.md index 61e0738..7b7cb09 100644 --- a/gcc/config/alpha/alpha.md +++ b/gcc/config/alpha/alpha.md @@ -4382,6 +4382,11 @@ } }") +(define_insn "exception_receiver" + [(unspec_volatile [(const_int 0)] 2)] + "! TARGET_OPEN_VMS && ! TARGET_WINDOWS_NT" + ".long 0xc3a00000\;ldgp $29,0($29)") + (define_expand "nonlocal_goto_receiver" [(unspec_volatile [(const_int 0)] 1) (set (reg:DI 27) (mem:DI (reg:DI 29))) diff --git a/gcc/config/pa/pa.md b/gcc/config/pa/pa.md index 3bb9794..3ac0bec 100644 --- a/gcc/config/pa/pa.md +++ b/gcc/config/pa/pa.md @@ -5155,4 +5155,24 @@ ;; Out of range and PIC (const_int 44)))]) +;; On the PA, the PIC register is call clobbered, so it must +;; be saved & restored around calls by the caller. If the call +;; doesn't return normally (nonlocal goto, or an exception is +;; thrown), then the code at the exception handler label must +;; restore the PIC register. +(define_expand "exception_receiver" + [(const_int 4)] + "!TARGET_PORTABLE_RUNTIME && flag_pic" + " +{ + /* Load the PIC register from the stack slot (in our caller's + frame). */ + emit_move_insn (pic_offset_table_rtx, + gen_rtx (MEM, SImode, + plus_constant (stack_pointer_rtx, -32))); + emit_insn (gen_rtx (USE, VOIDmode, pic_offset_table_rtx)); + emit_insn (gen_blockage ()); + DONE; +}") + |