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

Re: Bug#543975: FTBFS: mips/mipsel -- Assembler errors

On Fri, Aug 28, 2009 at 09:38:45PM -0500, Steve M. Robbins:
> Hi,
> Boost failed to build this week, with numerous files spewing out
> assembler errors such as
>   Error: opcode not supported on this processor: mips1 (mips1) `ll $3,4($16)'
> What causes the compiler to emit opcodes that the assembler cannot
> process?  Boost (v 1.38) built OK on june 30, and I'm sure that many
> of the files in question have not changed in v 1.39.

ll/sc are mips2 opcodes - Debian used to be mips1 to support
the pre R4k (R3/R2k arch). For atomic ops the only solution was to
use ll/sc from mips2 and for r2/r3k emulate them in kernel.

For the assembler to emit mips2 opcodes although it was told to
do mips1 you need to instruct the assembler:


> I'd appreciate help debugging this.
> See
> https://buildd.debian.org/fetch.cgi?&pkg=boost1.39&ver=1.39.0-1&arch=mips&stamp=1249965048&file=log
> https://buildd.debian.org/fetch.cgi?&pkg=boost1.39&ver=1.39.0-1&arch=mipsel&stamp=1250006828&file=log
> https://buildd.debian.org/fetch.cgi?&pkg=boost1.39&ver=1.39.0-2&arch=mips&stamp=1251393955&file=log

A quick grep revealed this file and some functions using ll/sc:


inline void atomic_increment( int * pw )
    // ++*pw;

    int tmp;

    __asm__ __volatile__
        "ll %0, %1\n\t"
        "addiu %0, 1\n\t"
        "sc %0, %1\n\t"
        "beqz %0, 0b":
        "=&r"( tmp ), "=m"( *pw ):
        "m"( *pw )

Florian Lohoff                                         flo@rfc822.org
"Es ist ein grobes Missverständnis und eine Fehlwahrnehmung, dem Staat
im Internet Zensur- und Überwachungsabsichten zu unterstellen."
- - Bundesminister Dr. Wolfgang Schäuble -- 10. Juli in Berlin 

Attachment: signature.asc
Description: Digital signature

Reply to: