diff options
author | rth <rth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-03-28 11:09:20 +0000 |
---|---|---|
committer | rth <rth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-03-28 11:09:20 +0000 |
commit | c92c328f66808f36f048271b39dc4565426fe8f0 (patch) | |
tree | 566a8ac346a56763949b3cca3f06c4c74aa23fba /gcc/config/alpha/linux.h | |
parent | df4b504cae7856b864a073ab9e6e61cf2ad23a97 (diff) | |
download | gcc-c92c328f66808f36f048271b39dc4565426fe8f0.tar.gz |
* config/alpha/alpha.c (alpha_sa_mask): Add EH_RETURN_DATA_REGNOs.
(alpha_mark_machine_status): No eh_epilogue_sp_ofs ...
(alpha_expand_epilogue): ... use EH_RETURN_STACKADJ_RTX instead.
* config/alpha/alpha.h (machine_function): Remove eh_epilogue_sp_ofs.
(EH_RETURN_DATA_REGNO): New.
(EH_RETURN_STACKADJ_RTX, EH_RETURN_HANDLER_RTX): New.
* config/alpha/alpha.md (eh_epilogue): Remove.
(exception_receiver): Use $26 for ldgp input.
* config/alpha/linux.h (MD_FALLBACK_FRAME_STATE_FOR): New.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@40925 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/config/alpha/linux.h')
-rw-r--r-- | gcc/config/alpha/linux.h | 51 |
1 files changed, 51 insertions, 0 deletions
diff --git a/gcc/config/alpha/linux.h b/gcc/config/alpha/linux.h index c8f649a7582..1be967e680e 100644 --- a/gcc/config/alpha/linux.h +++ b/gcc/config/alpha/linux.h @@ -44,3 +44,54 @@ SUB_CPP_PREDEFINES /* Define this so that all GNU/Linux targets handle the same pragmas. */ #define HANDLE_PRAGMA_PACK_PUSH_POP + +/* Do code reading to identify a signal frame, and set the frame + state data appropriately. See unwind-dw2.c for the structs. */ + +#ifdef IN_LIBGCC2 +#include <signal.h> +#include <sys/ucontext.h> +#endif + +#define MD_FALLBACK_FRAME_STATE_FOR(CONTEXT, FS, SUCCESS) \ + do { \ + unsigned int *pc_ = (CONTEXT)->ra; \ + struct sigcontext *sc_; \ + long new_cfa_, i_; \ + \ + if (pc_[0] != 0x47fe0410 /* mov $30,$16 */ \ + || pc_[2] != 0x00000083 /* callsys */) \ + break; \ + if (pc_[1] == 0x201f0067) /* lda $0,NR_sigreturn */ \ + sc_ = (CONTEXT)->cfa; \ + else if (pc_[1] == 0x201f015f) /* lda $0,NR_rt_sigreturn */ \ + { \ + struct rt_sigframe { \ + struct siginfo info; \ + struct ucontext uc; \ + } *rt_ = (CONTEXT)->cfa; \ + sc_ = &rt_->uc.uc_mcontext; \ + } \ + else \ + break; \ + new_cfa_ = sc_->sc_regs[30]; \ + (FS)->cfa_how = CFA_REG_OFFSET; \ + (FS)->cfa_reg = 30; \ + (FS)->cfa_offset = new_cfa_ - (long) (CONTEXT)->cfa; \ + for (i_ = 0; i_ < 30; ++i_) \ + { \ + (FS)->regs.reg[i_].how = REG_SAVED_OFFSET; \ + (FS)->regs.reg[i_].loc.offset \ + = (long)&sc_->sc_regs[i_] - new_cfa_; \ + } \ + for (i_ = 0; i_ < 31; ++i_) \ + { \ + (FS)->regs.reg[i_+32].how = REG_SAVED_OFFSET; \ + (FS)->regs.reg[i_+32].loc.offset \ + = (long)&sc_->sc_fpregs[i_] - new_cfa_; \ + } \ + (FS)->regs.reg[31].how = REG_SAVED_OFFSET; \ + (FS)->regs.reg[31].loc.offset = (long)&sc_->sc_pc - new_cfa_; \ + (FS)->retaddr_column = 31; \ + goto SUCCESS; \ + } while (0) |