Bug#335831: [mips/mipsel] FTBFS due to invalid assembler code
Package: qt4-x11
Version: 4.0.1-2
Tags: patch
qt4-x11 currently FTBFS for mips/mipsel because the assembler code for
atomic operations attempts to use MIPS II ll/sc instructions in MIPS I
assembly. The appended patch switches the atomic loops to assume MIPS II,
this works even for MIPS I CPUs because Linux emulates the ll/sc
instructions there.
Thiemo
#! /bin/sh /usr/share/dpatch/dpatch-run
## 12_mips_atomic_ops.dpatch by Thiemo Seufer <ths@debian.org>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: Fix compilation for Linux MIPS-I code.
@DPATCH@
--- ./src/corelib/arch/mips/qatomic32.s.old 2005-10-26 02:28:44.000000000 +0200
+++ ./src/corelib/arch/mips/qatomic32.s 2005-10-26 02:29:34.000000000 +0200
@@ -6,10 +6,12 @@
.globl q_atomic_test_and_set_int
.ent q_atomic_test_and_set_int
q_atomic_test_and_set_int:
+ .set mips2
1: ll $8,0($4)
bne $8,$5,2f
move $2,$6
sc $2,0($4)
+ .set mips0
beqz $2,1b
nop
jr $31
@@ -21,10 +23,12 @@ q_atomic_test_and_set_int:
.globl q_atomic_test_and_set_ptr
.ent q_atomic_test_and_set_ptr
q_atomic_test_and_set_ptr:
+ .set mips2
1: ll $8,0($4)
bne $8,$5,2f
move $2,$6
sc $2,0($4)
+ .set mips0
beqz $2,1b
nop
jr $31
Reply to: