Ulrich Hecht wrote:
[snip]
> > > +#ifdef __s390__
> > > +    retaddr = (void*)((unsigned long)retaddr & 0x7fffffffUL);
> > > +#endif
> >
> > All of those look weird. Is this a null-extension vs. sign-extension
> > issue?
> 
> S/390 has a 31 (thirty-one) bit address space; the MSB of the PSW is not 
> part of the address and must be masked out. This is simply part of the 
> architecture, there's no way around it.

It looks like the retaddr value is always acquired via the GETPC macro,
which does a __builtin_return_address(0). Could you check that
 - Gcc's __builtin_return_address isn't just broken
 - If the compiler is ok, test if twiddling the bit in the GETPC macro
   works for s390. I suspect this catches more instances of the problem
   and might even explain the odd breakage you saw.

> > > +#ifdef __s390__
> > > +            func = NULL; /* does not work on S/390 for unknown
> > > reasons */ +#else
> > >              func = gen_jcc_sub[s->cc_op - CC_OP_SUBB][jcc_op];
> > > +#endif
> >
> > Hum. It wold be good to know what happens here.
> 
> Indeed. :)


Thiemo


Reply via email to