diff options
Diffstat (limited to 'contrib/gcc/config/ia64/unwind-ia64.c')
-rw-r--r-- | contrib/gcc/config/ia64/unwind-ia64.c | 27 |
1 files changed, 25 insertions, 2 deletions
diff --git a/contrib/gcc/config/ia64/unwind-ia64.c b/contrib/gcc/config/ia64/unwind-ia64.c index ca91539..12e46ae 100644 --- a/contrib/gcc/config/ia64/unwind-ia64.c +++ b/contrib/gcc/config/ia64/unwind-ia64.c @@ -143,7 +143,7 @@ typedef struct unw_state_record 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 char *imask; /* imask of spill_mask record or NULL */ unsigned long pr_val; /* predicate values */ unsigned long pr_mask; /* predicate mask */ long spill_offset; /* psp-relative offset for spill base */ @@ -1401,7 +1401,7 @@ unw_decode_b3_x4 (unsigned char *dp, unsigned char code, void *arg) typedef unsigned char *(*unw_decoder) (unsigned char *, unsigned char, void *); -static unw_decoder unw_decode_table[2][8] = +static const unw_decoder unw_decode_table[2][8] = { /* prologue table: */ { @@ -1642,6 +1642,29 @@ _Unwind_GetRegionStart (struct _Unwind_Context *context) return context->region_start; } +void * +_Unwind_FindEnclosingFunction (void *pc) +{ + struct unw_table_entry *ent; + unsigned long segment_base, gp; + + ent = _Unwind_FindTableEntry (pc, &segment_base, &gp); + if (ent == NULL) + return NULL; + else + return (void *)(segment_base + ent->start_offset); +} + +/* Get the value of the CFA as saved in CONTEXT. In GCC/Dwarf2 parlance, + the CFA is the value of the stack pointer on entry; In IA-64 unwind + parlance, this is the PSP. */ + +_Unwind_Word +_Unwind_GetCFA (struct _Unwind_Context *context) +{ + return (_Unwind_Ptr) context->psp; +} + static _Unwind_Reason_Code uw_frame_state_for (struct _Unwind_Context *context, _Unwind_FrameState *fs) |