From: Eric Botcazou Date: Fri, 11 Dec 2009 21:06:18 +0000 (+0000) Subject: linux-unwind.h (MD_FROB_UPDATE_CONTEXT, 64-bit): Define. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=77cb940117db0b1873ccb4587b74499a0c1c4b73;p=gcc.git linux-unwind.h (MD_FROB_UPDATE_CONTEXT, 64-bit): Define. * config/sparc/linux-unwind.h (MD_FROB_UPDATE_CONTEXT, 64-bit): Define. (sparc64_frob_update_context): New function. From-SVN: r155178 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index ba3f0d36101..b8bc619c8ec 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2009-12-11 Eric Botcazou + + * config/sparc/linux-unwind.h (MD_FROB_UPDATE_CONTEXT, 64-bit): Define. + (sparc64_frob_update_context): New function. + 2009-12-11 Richard Guenther PR lto/41658 diff --git a/gcc/config/sparc/linux-unwind.h b/gcc/config/sparc/linux-unwind.h index 44420663c50..adfef6ec29d 100644 --- a/gcc/config/sparc/linux-unwind.h +++ b/gcc/config/sparc/linux-unwind.h @@ -98,6 +98,23 @@ sparc64_fallback_frame_state (struct _Unwind_Context *context, return _URC_NO_REASON; } +#define MD_FROB_UPDATE_CONTEXT sparc64_frob_update_context + +static void +sparc64_frob_update_context (struct _Unwind_Context *context, + _Unwind_FrameState *fs) +{ + /* The column of %sp contains the old CFA, not the old value of %sp. + The CFA offset already comprises the stack bias so, when %sp is the + CFA register, we must avoid counting the stack bias twice. Do not + do that for signal frames as the offset is artificial for them. */ + if (fs->regs.cfa_reg == __builtin_dwarf_sp_column () + && fs->regs.cfa_how == CFA_REG_OFFSET + && fs->regs.cfa_offset != 0 + && !fs->signal_frame) + context->cfa -= 2047; +} + #else /* 32-bit SPARC version */