diff -urN qt-embedded-linux-opensource-src-4.5.1.orig/src/corelib/arch/mips/qatomic_mips32.s qt-embedded-linux-opensource-src-4.5.1/src/corelib/arch/mips/qatomic_mips32.s
--- qt-embedded-linux-opensource-src-4.5.1.orig/src/corelib/arch/mips/qatomic_mips32.s	2009-05-08 09:21:56.000000000 +0100
+++ qt-embedded-linux-opensource-src-4.5.1/src/corelib/arch/mips/qatomic_mips32.s	2009-05-08 11:05:23.000000000 +0100
@@ -7,10 +7,12 @@
 	.ent	q_atomic_test_and_set_int
         .set mips2
 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
@@ -24,14 +26,17 @@
 	.ent	q_atomic_test_and_set_acquire_int
         .set mips2
 q_atomic_test_and_set_acquire_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
 	nop
+	.set mips2
 2:	sync
 	jr   $31
 	move $2,$0
@@ -42,11 +47,13 @@
 	.ent	q_atomic_test_and_set_release_int
         .set mips2
 q_atomic_test_and_set_release_int:
+	.set mips2
 	sync
 1:	ll   $8,0($4)
 	bne  $8,$5,2f
 	move $2,$6
 	sc   $2,0($4)
+	.set mips0
 	beqz $2,1b
 	nop
 	jr   $31
@@ -60,10 +67,12 @@
 	.ent	q_atomic_test_and_set_ptr
         .set mips2
 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
@@ -77,14 +86,17 @@
 	.ent	q_atomic_test_and_set_acquire_ptr
         .set mips2
 q_atomic_test_and_set_acquire_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
 	nop
+	.set mips2
 2:	sync
 	jr   $31
 	move $2,$0
@@ -95,11 +107,13 @@
 	.ent	q_atomic_test_and_set_release_ptr
         .set mips2
 q_atomic_test_and_set_release_ptr:
+	.set mips2
 	sync
 1:	ll   $8,0($4)
 	bne  $8,$5,2f
 	move $2,$6
 	sc   $2,0($4)
+	.set mips0
 	beqz $2,1b
 	nop
 	jr   $31
diff -urN qt-embedded-linux-opensource-src-4.5.1.orig/src/corelib/arch/qatomic_mips.h qt-embedded-linux-opensource-src-4.5.1/src/corelib/arch/qatomic_mips.h
--- qt-embedded-linux-opensource-src-4.5.1.orig/src/corelib/arch/qatomic_mips.h	2009-04-22 01:02:01.000000000 +0100
+++ qt-embedded-linux-opensource-src-4.5.1/src/corelib/arch/qatomic_mips.h	2009-05-08 11:20:56.000000000 +0100
@@ -108,9 +108,11 @@
     register int originalValue;
     register int newValue;
     asm volatile("0:\n"
+		 ".set mips2\n"
                  "ll %[originalValue], %[_q_value]\n"
                  "addiu %[newValue], %[originalValue], %[one]\n"
                  "sc %[newValue], %[_q_value]\n"
+		 ".set mips0\n"
                  "beqz %[newValue], 0b\n"
                  "nop\n"
                  : [originalValue] "=&r" (originalValue),
@@ -126,9 +128,11 @@
     register int originalValue;
     register int newValue;
     asm volatile("0:\n"
+		 ".set mips2\n"
                  "ll %[originalValue], %[_q_value]\n"
                  "addiu %[newValue], %[originalValue], %[minusOne]\n"
                  "sc %[newValue], %[_q_value]\n"
+		 ".set mips0\n"
                  "beqz %[newValue], 0b\n"
                  "nop\n"
                  : [originalValue] "=&r" (originalValue),
@@ -144,12 +148,14 @@
     register int result;
     register int tempValue;
     asm volatile("0:\n"
+		 ".set mips2\n"
                  "ll %[result], %[_q_value]\n"
                  "xor %[result], %[result], %[expectedValue]\n"
                  "bnez %[result], 0f\n"
                  "nop\n"
                  "move %[tempValue], %[newValue]\n"
                  "sc %[tempValue], %[_q_value]\n"
+		 ".set mips0\n"
                  "beqz %[tempValue], 0b\n"
                  "nop\n"
                  "0:\n"
@@ -167,6 +173,7 @@
     register int result;
     register int tempValue;
     asm volatile("0:\n"
+		 ".set mips2\n"
                  "ll %[result], %[_q_value]\n"
                  "xor %[result], %[result], %[expectedValue]\n"
                  "bnez %[result], 0f\n"
@@ -176,6 +183,7 @@
                  "beqz %[tempValue], 0b\n"
                  "nop\n"
                  "sync\n"
+		 ".set mips0\n"
                  "0:\n"
                  : [result] "=&r" (result),
                    [tempValue] "=&r" (tempValue),
@@ -190,7 +198,8 @@
 {
     register int result;
     register int tempValue;
-    asm volatile("sync\n"
+    asm volatile(".set mips2\n"
+		 "sync\n"
                  "0:\n"
                  "ll %[result], %[_q_value]\n"
                  "xor %[result], %[result], %[expectedValue]\n"
@@ -198,6 +207,7 @@
                  "nop\n"
                  "move %[tempValue], %[newValue]\n"
                  "sc %[tempValue], %[_q_value]\n"
+		 ".set mips0\n"
                  "beqz %[tempValue], 0b\n"
                  "nop\n"
                  "0:\n"
@@ -220,9 +230,11 @@
     register int originalValue;
     register int tempValue;
     asm volatile("0:\n"
+		 ".set mips2\n"
                  "ll %[originalValue], %[_q_value]\n"
                  "move %[tempValue], %[newValue]\n"
                  "sc %[tempValue], %[_q_value]\n"
+		 ".set mips0\n"
                  "beqz %[tempValue], 0b\n"
                  "nop\n"
                  : [originalValue] "=&r" (originalValue),
@@ -238,12 +250,14 @@
     register int originalValue;
     register int tempValue;
     asm volatile("0:\n"
+		 ".set mips2\n"
                  "ll %[originalValue], %[_q_value]\n"
                  "move %[tempValue], %[newValue]\n"
                  "sc %[tempValue], %[_q_value]\n"
                  "beqz %[tempValue], 0b\n"
                  "nop\n"
                  "sync\n"
+		 ".set mips0\n"
                  : [originalValue] "=&r" (originalValue),
                    [tempValue] "=&r" (tempValue),
                    [_q_value] "+m" (_q_value)
@@ -256,11 +270,13 @@
 {
     register int originalValue;
     register int tempValue;
-    asm volatile("sync\n"
+    asm volatile(".set mips2\n"
+		 "sync\n"
                  "0:\n"
                  "ll %[originalValue], %[_q_value]\n"
                  "move %[tempValue], %[newValue]\n"
                  "sc %[tempValue], %[_q_value]\n"
+		 ".set mips0\n"
                  "beqz %[tempValue], 0b\n"
                  "nop\n"
                  : [originalValue] "=&r" (originalValue),
@@ -281,9 +297,11 @@
     register int originalValue;
     register int newValue;
     asm volatile("0:\n"
+		 ".set mips2\n"
                  "ll %[originalValue], %[_q_value]\n"
                  "addu %[newValue], %[originalValue], %[valueToAdd]\n"
                  "sc %[newValue], %[_q_value]\n"
+		 ".set mips0\n"
                  "beqz %[newValue], 0b\n"
                  "nop\n"
                  : [originalValue] "=&r" (originalValue),
@@ -299,12 +317,14 @@
     register int originalValue;
     register int newValue;
     asm volatile("0:\n"
+		 ".set mips2\n"
                  "ll %[originalValue], %[_q_value]\n"
                  "addu %[newValue], %[originalValue], %[valueToAdd]\n"
                  "sc %[newValue], %[_q_value]\n"
                  "beqz %[newValue], 0b\n"
                  "nop\n"
                  "sync\n"
+		 ".set mips0\n"
                  : [originalValue] "=&r" (originalValue),
                    [_q_value] "+m" (_q_value),
                    [newValue] "=&r" (newValue)
@@ -317,11 +337,13 @@
 {
     register int originalValue;
     register int newValue;
-    asm volatile("sync\n"
+    asm volatile(".set mips2\n"
+		 "sync\n"
                  "0:\n"
                  "ll %[originalValue], %[_q_value]\n"
                  "addu %[newValue], %[originalValue], %[valueToAdd]\n"
                  "sc %[newValue], %[_q_value]\n"
+		 ".set mips0\n"
                  "beqz %[newValue], 0b\n"
                  "nop\n"
                  : [originalValue] "=&r" (originalValue),
@@ -351,12 +373,14 @@
     register T *result;
     register T *tempValue;
     asm volatile("0:\n"
+		 ".set mips2\n"
                  LLP" %[result], %[_q_value]\n"
                  "xor %[result], %[result], %[expectedValue]\n"
                  "bnez %[result], 0f\n"
                  "nop\n"
                  "move %[tempValue], %[newValue]\n"
                  SCP" %[tempValue], %[_q_value]\n"
+		 ".set mips0\n"
                  "beqz %[tempValue], 0b\n"
                  "nop\n"
                  "0:\n"
@@ -375,6 +399,7 @@
     register T *result;
     register T *tempValue;
     asm volatile("0:\n"
+		 ".set mips2\n"
                  LLP" %[result], %[_q_value]\n"
                  "xor %[result], %[result], %[expectedValue]\n"
                  "bnez %[result], 0f\n"
@@ -384,6 +409,7 @@
                  "beqz %[tempValue], 0b\n"
                  "nop\n"
                  "sync\n"
+		 ".set mips0\n"
                  "0:\n"
                  : [result] "=&r" (result),
                    [tempValue] "=&r" (tempValue),
@@ -399,14 +425,16 @@
 {
     register T *result;
     register T *tempValue;
-    asm volatile("sync\n"
+    asm volatile(".set mips2\n"
+		 "sync\n"
                  "0:\n"
-                 LLP" %[result], %[_q_value]\n"
+		 LLP" %[result], %[_q_value]\n"
                  "xor %[result], %[result], %[expectedValue]\n"
                  "bnez %[result], 0f\n"
                  "nop\n"
                  "move %[tempValue], %[newValue]\n"
                  SCP" %[tempValue], %[_q_value]\n"
+		 ".set mips0\n"
                  "beqz %[tempValue], 0b\n"
                  "nop\n"
                  "0:\n"
@@ -431,9 +459,11 @@
     register T *originalValue;
     register T *tempValue;
     asm volatile("0:\n"
+		 ".set mips2\n"
                  LLP" %[originalValue], %[_q_value]\n"
                  "move %[tempValue], %[newValue]\n"
                  SCP" %[tempValue], %[_q_value]\n"
+		 ".set mips0\n"
                  "beqz %[tempValue], 0b\n"
                  "nop\n"
                  : [originalValue] "=&r" (originalValue),
@@ -450,12 +480,14 @@
     register T *originalValue;
     register T *tempValue;
     asm volatile("0:\n"
+		 ".set mips2\n"
                  LLP" %[originalValue], %[_q_value]\n"
                  "move %[tempValue], %[newValue]\n"
                  SCP" %[tempValue], %[_q_value]\n"
                  "beqz %[tempValue], 0b\n"
                  "nop\n"
                  "sync\n"
+		 ".set mips0\n"
                  : [originalValue] "=&r" (originalValue),
                    [tempValue] "=&r" (tempValue),
                    [_q_value] "+m" (_q_value)
@@ -469,11 +501,13 @@
 {
     register T *originalValue;
     register T *tempValue;
-    asm volatile("sync\n"
+    asm volatile(".set mips2\n"
+		 "sync\n"
                  "0:\n"
                  LLP" %[originalValue], %[_q_value]\n"
                  "move %[tempValue], %[newValue]\n"
                  SCP" %[tempValue], %[_q_value]\n"
+		 ".set mips0\n"
                  "beqz %[tempValue], 0b\n"
                  "nop\n"
                  : [originalValue] "=&r" (originalValue),
@@ -496,9 +530,11 @@
     register T *originalValue;
     register T *newValue;
     asm volatile("0:\n"
+		 ".set mips2\n"
                  LLP" %[originalValue], %[_q_value]\n"
                  "addu %[newValue], %[originalValue], %[valueToAdd]\n"
                  SCP" %[newValue], %[_q_value]\n"
+		 ".set mips0\n"
                  "beqz %[newValue], 0b\n"
                  "nop\n"
                  : [originalValue] "=&r" (originalValue),
@@ -515,12 +551,14 @@
     register T *originalValue;
     register T *newValue;
     asm volatile("0:\n"
+		 ".set mips2\n"
                  LLP" %[originalValue], %[_q_value]\n"
                  "addu %[newValue], %[originalValue], %[valueToAdd]\n"
                  SCP" %[newValue], %[_q_value]\n"
                  "beqz %[newValue], 0b\n"
                  "nop\n"
                  "sync\n"
+		 ".set mips0\n"
                  : [originalValue] "=&r" (originalValue),
                    [_q_value] "+m" (_q_value),
                    [newValue] "=&r" (newValue)
@@ -534,11 +572,13 @@
 {
     register T *originalValue;
     register T *newValue;
-    asm volatile("sync\n"
+    asm volatile(".set mips2\n"
+		 "sync\n"
                  "0:\n"
                  LLP" %[originalValue], %[_q_value]\n"
                  "addu %[newValue], %[originalValue], %[valueToAdd]\n"
                  SCP" %[newValue], %[_q_value]\n"
+		 ".set mips0\n"
                  "beqz %[newValue], 0b\n"
                  "nop\n"
                  : [originalValue] "=&r" (originalValue),
