aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorHans Boehm <Hans_Boehm@hp.com>2002-03-26 21:27:12 +0000
committerHans Boehm <hboehm@gcc.gnu.org>2002-03-26 21:27:12 +0000
commitd7e60e95f87835d0dd704e05ac38520aa333e61f (patch)
tree01f993857ea63fb867e361ce496881729f4c71fb /gcc
parentef83161cd8c6e5cb95bb621d1ed2b3831f2648be (diff)
downloadgcc-d7e60e95f87835d0dd704e05ac38520aa333e61f.zip
gcc-d7e60e95f87835d0dd704e05ac38520aa333e61f.tar.gz
gcc-d7e60e95f87835d0dd704e05ac38520aa333e61f.tar.bz2
linux.h (MD_FALLBACK_FRAME_STATE_FOR): Restore more of the signal context.
* config/ia64/linux.h (MD_FALLBACK_FRAME_STATE_FOR): Restore more of the signal context. Set no_reg_stack_frame. * config/ia64/unwind-ia64.c (unw_state_record): Add no_reg_stack_frame, comments. (uw_frame_state_for): Initialize when field to UNW_WHEN_NEVER. (uw_update_context): Adjust bsp when unwinding from leaf, but not signal frame. From-SVN: r51407
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog9
-rw-r--r--gcc/config/ia64/linux.h8
-rw-r--r--gcc/config/ia64/unwind-ia64.c17
3 files changed, 29 insertions, 5 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index 90b3bab..df46d03 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,12 @@
+2002-03-26 Hans Boehm <Hans_Boehm@hp.com>
+ * config/ia64/linux.h (MD_FALLBACK_FRAME_STATE_FOR):
+ Restore more of the signal context. Set no_reg_stack_frame.
+ * config/ia64/unwind-ia64.c (unw_state_record):
+ Add no_reg_stack_frame, comments.
+ (uw_frame_state_for): Initialize when field to UNW_WHEN_NEVER.
+ (uw_update_context): Adjust bsp when unwinding from leaf,
+ but not signal frame.
+
2002-03-26 David Edelsohn <edelsohn@gnu.org>
* config/rs6000/aix51.h (WCHAR_TYPE): Define.
diff --git a/gcc/config/ia64/linux.h b/gcc/config/ia64/linux.h
index 1889ef6..ac77af2 100644
--- a/gcc/config/ia64/linux.h
+++ b/gcc/config/ia64/linux.h
@@ -98,10 +98,16 @@
(CONTEXT)->pfs_loc = &(sc_->sc_ar_pfs); \
(CONTEXT)->lc_loc = &(sc_->sc_ar_lc); \
(CONTEXT)->unat_loc = &(sc_->sc_ar_unat); \
+ (CONTEXT)->br_loc[0] = &(sc_->sc_br[0]); \
+ (CONTEXT)->bsp = sc_->sc_ar_bsp; \
(CONTEXT)->pr = sc_->sc_pr; \
(CONTEXT)->psp = sc_->sc_gr[12]; \
+ (CONTEXT)->gp = sc_->sc_gr[1]; \
+ /* Signal frame doesn't have an associated reg. stack frame \
+ other than what we adjust for below. */ \
+ (FS) -> no_reg_stack_frame = 1; \
\
- /* Don't touch the branch registers. The kernel doesn't \
+ /* Don't touch the branch registers o.t. b0. The kernel doesn't \
pass the preserved branch registers in the sigcontext but \
leaves them intact, so there's no need to do anything \
with them here. */ \
diff --git a/gcc/config/ia64/unwind-ia64.c b/gcc/config/ia64/unwind-ia64.c
index b9bcf48..52db9ac 100644
--- a/gcc/config/ia64/unwind-ia64.c
+++ b/gcc/config/ia64/unwind-ia64.c
@@ -138,7 +138,7 @@ typedef struct unw_state_record
unsigned int done : 1; /* are we done scanning descriptors? */
unsigned int any_spills : 1; /* got any register spills? */
unsigned int in_body : 1; /* are we inside a body? */
-
+ unsigned int no_reg_stack_frame : 1; /* Don't adjust bsp for i&l regs */
unsigned char *imask; /* imask of of spill_mask record or NULL */
unsigned long pr_val; /* predicate values */
unsigned long pr_mask; /* predicate mask */
@@ -192,9 +192,12 @@ struct _Unwind_Context
void *lsda; /* language specific data area */
/* Preserved state. */
- unsigned long *bsp_loc; /* previous bsp save location */
+ unsigned long *bsp_loc; /* previous bsp save location
+ Appears to be write-only? */
unsigned long *bspstore_loc;
- unsigned long *pfs_loc;
+ unsigned long *pfs_loc; /* Save location for pfs in current
+ (corr. to sp) frame. Target
+ contains cfm for caller. */
unsigned long *pri_unat_loc;
unsigned long *unat_loc;
unsigned long *lc_loc;
@@ -1510,8 +1513,11 @@ uw_frame_state_for (struct _Unwind_Context *context, _Unwind_FrameState *fs)
unsigned long *unw, header, length;
unsigned char *insn, *insn_end;
unsigned long segment_base;
+ struct unw_reg_info *r;
memset (fs, 0, sizeof (*fs));
+ for (r = fs->curr.reg; r < fs->curr.reg + UNW_NUM_REGS; ++r)
+ r->when = UNW_WHEN_NEVER;
context->lsda = 0;
ent = _Unwind_FindTableEntry ((void *) context->rp,
@@ -1769,7 +1775,10 @@ uw_update_context (struct _Unwind_Context *context, _Unwind_FrameState *fs)
/* Unwind BSP for the local registers allocated this frame. */
/* ??? What to do with stored BSP or BSPSTORE registers. */
- if (fs->when_target > fs->curr.reg[UNW_REG_PFS].when)
+ /* We assert that we are either at a call site, or we have
+ just unwound through a signal frame. In either case
+ pfs_loc is valid. */
+ if (!(fs -> no_reg_stack_frame))
{
unsigned long pfs = *context->pfs_loc;
unsigned long sol = (pfs >> 7) & 0x7f;