aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorEric Botcazou <ebotcazou@adacore.com>2009-12-11 21:06:18 +0000
committerEric Botcazou <ebotcazou@gcc.gnu.org>2009-12-11 21:06:18 +0000
commit77cb940117db0b1873ccb4587b74499a0c1c4b73 (patch)
treefbf7e8679a8901f29a2f9348e16b57791b02cbf8 /gcc
parentd4684c007a26cbfe71548b1173dd642b8daab1c2 (diff)
downloadgcc-77cb940117db0b1873ccb4587b74499a0c1c4b73.zip
gcc-77cb940117db0b1873ccb4587b74499a0c1c4b73.tar.gz
gcc-77cb940117db0b1873ccb4587b74499a0c1c4b73.tar.bz2
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
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog5
-rw-r--r--gcc/config/sparc/linux-unwind.h17
2 files changed, 22 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index ba3f0d3..b8bc619 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,8 @@
+2009-12-11 Eric Botcazou <ebotcazou@adacore.com>
+
+ * config/sparc/linux-unwind.h (MD_FROB_UPDATE_CONTEXT, 64-bit): Define.
+ (sparc64_frob_update_context): New function.
+
2009-12-11 Richard Guenther <rguenther@suse.de>
PR lto/41658
diff --git a/gcc/config/sparc/linux-unwind.h b/gcc/config/sparc/linux-unwind.h
index 4442066..adfef6e 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 */