This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: GCC 3.3 Prelease broken on s390
- From: Ulrich Weigand <weigand at immd1 dot informatik dot uni-erlangen dot de>
- To: rth at redhat dot com (Richard Henderson)
- Cc: weigand at immd1 dot informatik dot uni-erlangen dot de (Ulrich Weigand), mark at codesourcery dot com, gcc at gcc dot gnu dot org
- Date: Wed, 7 May 2003 02:24:34 +0200 (MET DST)
- Subject: Re: GCC 3.3 Prelease broken on s390
Richard Henderson wrote:
> Try this. It's vs mainline, if that works, we can
> adjust it as necessary for 3.3.
Interestingly, mainline works fine without any patch.
This is because mainline contains this if:
if (!_Unwind_GetGRPtr (&orig_context, __builtin_dwarf_sp_column ()))
and since on s390 there is always a CFA record to restore
the stack pointer from, that new code to fiddle with the
stack pointer is never even entered ...
In any case, shouldn't these two:
> @@ -1096,7 +1101,7 @@ uw_update_context_1 (struct _Unwind_Cont
> the value over from one frame to another doesn't make sense. */
> if (!_Unwind_GetGRPtr (&orig_context, __builtin_dwarf_sp_column ()))
> {
> - tmp_sp = (_Unwind_Ptr) context->cfa;
> + tmp_sp = (_Unwind_Ptr) context->cfa + RUNTIME_SP_CFA_OFFSET;
> _Unwind_SetGRPtr (&orig_context, __builtin_dwarf_sp_column (), &tmp_sp);
> }
> _Unwind_SetGRPtr (context, __builtin_dwarf_sp_column (), NULL);
> @@ -1267,6 +1272,7 @@ uw_install_context_1 (struct _Unwind_Con
> if (_Unwind_GetGRPtr (target, __builtin_dwarf_sp_column ()))
> target_cfa = (void *)(_Unwind_Ptr)
> _Unwind_GetGR (target, __builtin_dwarf_sp_column ());
> + + RUNTIME_SP_CFA_OFFSET;
> else
> target_cfa = target->cfa;
have different signs for the offset? The one adds to cfa in order
to get sp, the other adds to sp to get cfa ... Which direction
is the macro supposed to represent?
Bye,
Ulrich
--
Dr. Ulrich Weigand
weigand@informatik.uni-erlangen.de