Index: uspace/lib/libc/arch/mips32/include/atomic.h
===================================================================
--- uspace/lib/libc/arch/mips32/include/atomic.h	(revision f2ef7fd587b7ec8f9d3293862101dfa7dbf2ecf6)
+++ uspace/lib/libc/arch/mips32/include/atomic.h	(revision 48c3d504fc31a177cd3f40efea0b99148bde9b18)
@@ -60,11 +60,12 @@
 		"1:\n"
 		"	ll %0, %1\n"
-		"	addiu %0, %0, %3\n"	/* same as addi, but never traps on overflow */
+		"	addu %0, %0, %3\n"	/* same as add, but never traps on overflow */
 		"       move %2, %0\n"
 		"	sc %0, %1\n"
 		"	beq %0, %4, 1b\n"	/* if the atomic operation failed, try again */
 		/*	nop	*/		/* nop is inserted automatically by compiler */
+		"	nop\n"
 		: "=&r" (tmp), "+m" (val->count), "=&r" (v)
-		: "i" (i), "i" (0)
+		: "r" (i), "i" (0)
 		);
 
