Skip to content
Snippets Groups Projects
Commit 34b963d5 authored by pbrook's avatar pbrook
Browse files

* unwind-dw2.c (uw_install_context_1): Update target saved stack

	pointer.


git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@85723 138bc75d-0d04-0410-961f-82ee72b054a4
parent 4cb2b0dd
No related branches found
No related tags found
No related merge requests found
2004-08-09 Paul Brook <paul@codesourcery.com>
Richard Henderson <rth@redhat.com>
* unwind-dw2.c (uw_install_context_1): Update target saved stack
pointer.
2004-08-09 Geoffrey Keating <geoffk@apple.com> 2004-08-09 Geoffrey Keating <geoffk@apple.com>
* ggc-common.c (ggc_rlimit_bound): Don't check RSS limit. * ggc-common.c (ggc_rlimit_bound): Don't check RSS limit.
......
...@@ -1274,6 +1274,12 @@ uw_install_context_1 (struct _Unwind_Context *current, ...@@ -1274,6 +1274,12 @@ uw_install_context_1 (struct _Unwind_Context *current,
struct _Unwind_Context *target) struct _Unwind_Context *target)
{ {
long i; long i;
_Unwind_SpTmp sp_slot;
/* If the target frame does not have a saved stack pointer,
then set up the target's CFA. */
if (!_Unwind_GetGRPtr (target, __builtin_dwarf_sp_column ()))
_Unwind_SetSpColumn (target, target->cfa, &sp_slot);
for (i = 0; i < DWARF_FRAME_REGISTERS; ++i) for (i = 0; i < DWARF_FRAME_REGISTERS; ++i)
{ {
...@@ -1284,25 +1290,22 @@ uw_install_context_1 (struct _Unwind_Context *current, ...@@ -1284,25 +1290,22 @@ uw_install_context_1 (struct _Unwind_Context *current,
memcpy (c, t, dwarf_reg_size_table[i]); memcpy (c, t, dwarf_reg_size_table[i]);
} }
#ifdef EH_RETURN_STACKADJ_RTX /* If the current frame doesn't have a saved stack pointer, then we
{ need to rely on EH_RETURN_STACKADJ_RTX to get our target stack
void *target_cfa; pointer value reloaded. */
if (!_Unwind_GetGRPtr (current, __builtin_dwarf_sp_column ()))
{
void *target_cfa;
/* If the last frame records a saved stack pointer, use it. */
if (_Unwind_GetGRPtr (target, __builtin_dwarf_sp_column ()))
target_cfa = _Unwind_GetPtr (target, __builtin_dwarf_sp_column ()); target_cfa = _Unwind_GetPtr (target, __builtin_dwarf_sp_column ());
else
target_cfa = target->cfa; /* We adjust SP by the difference between CURRENT and TARGET's CFA. */
if (STACK_GROWS_DOWNWARD)
/* We adjust SP by the difference between CURRENT and TARGET's CFA. */ return target_cfa - current->cfa + target->args_size;
if (STACK_GROWS_DOWNWARD) else
return target_cfa - current->cfa + target->args_size; return current->cfa - target_cfa - target->args_size;
else }
return current->cfa - target_cfa - target->args_size;
}
#else
return 0; return 0;
#endif
} }
static inline _Unwind_Ptr static inline _Unwind_Ptr
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment