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
This commit is contained in:
Mike Stump 1997-05-16 01:00:58 +00:00
parent f51430ed7a
commit c133e33c68
2 changed files with 25 additions and 0 deletions

View File

@ -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)))

View File

@ -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;
}")