[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: libqalculate FTBFS on mips* (ball, rem)

Richard B. Kreckel wrote:
> On Sun, 28 Aug 2005, Thiemo Seufer wrote:
> [...]
> > > > This looks like the library tries to garbage collect from a global
> > > > constructor while the data it works on is still NULL.
> > >
> > > Sounds like it, but is there a reason why it happens only on mips ?
> >
> > I haven't seen anything mips-specific there. The compiler flags
> > settings in cln's debian/rules don't exactly inspire confidence in
> > the source code,
> ...or the compiler, to be precise.  :)
> Anyway, that problem above is fixed by changing the inline asm for the
> jump instructions CLN uses to order static object initialization from
>     __asm__ __volatile__ ("%*j %0" : : "d" ((void*)(addr)))
> to
>     __asm__ __volatile__ ("b " #addr)
> Just out of curiousity: there was an ABI change or why did I have to
> modify that?

Are you sure this is a fix? "%*j" is no valid mips instruction, which
poses the question why it ever appeared to work. "b" is, but is it a
branch with a code offset limit of +- 128k. I think what's really
wanted in that place for mips is

   __asm__ __volatile__ ("jr %0" : : "r" ((void*)(addr)))

for a jump to an arbitrary address.


Reply to: