Port-mips archive

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

Re: Can't compile longson kernels



On Thu, Nov 28, 2013 at 05:42:43PM +0100, Manuel Bouyer wrote:
> On Thu, Nov 28, 2013 at 02:22:47PM +0100, Martin Husemann wrote:
> > Hey folks,
> > 
> > the bulk builds for evbmips64 have been failing since a long time.
> > Problem is: the compiler generates code like:
> > 
> >         ld      $31,24($sp)  
> >         ld      $16,16($sp) 
> > $LVL2 = .
> >         j       $31
> >         daddiu  $sp,$sp,32
> > 
> > and "j" is a macro, expanding to multiple instructions in this case, which
> > causes a warning. The assembler is invoked with -mips3,
> > or to be precise:
> > 
> > tools/lib/gcc/mips64el--netbsd/4.5.4/../../../../mips64el--netbsd/bin/as -G 
> > 0 -EL -mips3 -O2 -g -no-mdebug -mabi=64 -msym32 -v -mfix-loongson2f-btb 
> > --fatal-warnings -o compat_util.o
> > 
> > I somehow thought load delay slots would be mips1 only?
> 
> i'm not sure about this. In fact, I'm almost sure mips32r2 still has them.
> 
> > 
> > Is the warning bogus? Am I missing something?
> 
> I don't understand why j would expand to a macro in this case.
> It should just be a jr (jump register). Or maybe the compiler is wrong and
> should generate a jr and not a plain j.

The problem seems to be -Wa,-mfix-loongson2f-jump.
The jump will indeed expand to multiple instructions. But it's also supposed
to not cause a warning (it's harmless in this case because the jump will
still be at the end of the exanded macro), see gas/config/tc-mips.c.
I wonder is something changed here, that cause the warning workaround to
not work any more (-Wa,-mfix-loongson2f-jump is from upstream, but
this warning workaround is a local change).

-- 
Manuel Bouyer <bouyer%antioche.eu.org@localhost>
     NetBSD: 26 ans d'experience feront toujours la difference
--


Home | Main Index | Thread Index | Old Index