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

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



Hi Florian,


On Sat, Aug 29, 2009 at 07:13:19AM +0200, Florian Lohoff wrote:
> 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.

Well, it looks like the offending file is new, after all.  


> 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.
 
Thanks for the tip; I would never have found it myself.  Does the
attached patch look correct?

Is this something specific to Debian; i.e. other mips systems would
compile in mips2 mode and not have this problem?  I'm wondering whether
this patch should be propagated upstream or not.

Thanks,
-Steve
--- boost1.39-1.39.0.orig/boost/smart_ptr/detail/sp_counted_base_gcc_mips.hpp
+++ boost1.39-1.39.0/boost/smart_ptr/detail/sp_counted_base_gcc_mips.hpp
@@ -37,9 +37,12 @@
     __asm__ __volatile__
     (
         "0:\n\t"
+	.set push
+	.set mips2
         "ll %0, %1\n\t"
         "addiu %0, 1\n\t"
         "sc %0, %1\n\t"
+	.set pop
         "beqz %0, 0b":
         "=&r"( tmp ), "=m"( *pw ):
         "m"( *pw )
@@ -55,9 +58,12 @@
     __asm__ __volatile__
     (
         "0:\n\t"
+	.set push
+	.set mips2
         "ll %1, %2\n\t"
         "addiu %0, %1, -1\n\t"
         "sc %0, %2\n\t"
+	.set pop
         "beqz %0, 0b\n\t"
         "addiu %0, %1, -1":
         "=&r"( rv ), "=&r"( tmp ), "=m"( *pw ):
@@ -78,10 +84,13 @@
     __asm__ __volatile__
     (
         "0:\n\t"
+	.set push
+	.set mips2
         "ll %0, %2\n\t"
         "beqz %0, 1f\n\t"
         "addiu %1, %0, 1\n\t"
         "sc %1, %2\n\t"
+	.set pop
         "beqz %1, 0b\n\t"
         "addiu %0, %0, 1\n\t"
         "1:":

Attachment: signature.asc
Description: Digital signature


Reply to: