This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]