summaryrefslogtreecommitdiffstats
path: root/include/asm-mips
diff options
context:
space:
mode:
authorRalf Baechle <ralf@linux-mips.org>2001-03-10 22:34:00 +0000
committerRalf Baechle <ralf@linux-mips.org>2001-03-10 22:34:00 +0000
commit72897c4ebcbad0a5b1cb834d486fd15ac269083f (patch)
tree6a59b07bce17ded60e8ffc941b7e9514f26d708f /include/asm-mips
parent05d66f13fd1c16283893589e9014a132bcfc9709 (diff)
Fix more gcc 3.0 warnings.
Diffstat (limited to 'include/asm-mips')
-rw-r--r--include/asm-mips/semaphore-helper.h43
-rw-r--r--include/asm-mips/semaphore.h42
2 files changed, 39 insertions, 46 deletions
diff --git a/include/asm-mips/semaphore-helper.h b/include/asm-mips/semaphore-helper.h
index c281a4f3e..ad49f94f3 100644
--- a/include/asm-mips/semaphore-helper.h
+++ b/include/asm-mips/semaphore-helper.h
@@ -134,29 +134,26 @@ waking_non_zero_interruptible(struct semaphore *sem, struct task_struct *tsk)
{
long ret, tmp;
- __asm__ __volatile__("
- .set push
- .set mips3
- .set noat
-0: lld %1, %2
- li %0, 0
- sll $1, %1, 0
- blez $1, 1f
- daddiu %1, %1, -1
- li %0, 1
- b 2f
-1:
- beqz %3, 2f
- li %0, %4
- dli $1, 0x0000000100000000
- daddu %1, %1, $1
-2:
- scd %1, %2
- beqz %1, 0b
-
- .set pop"
- : "=&r"(ret), "=&r"(tmp), "=m"(*sem)
- : "r"(signal_pending(tsk)), "i"(-EINTR));
+ __asm__ __volatile__(
+ ".set\tpush\n\t"
+ ".set\tmips3\n\t"
+ ".set\tnoat\n"
+ "0:\tlld\t%1, %2\n\t"
+ "li\t%0, 0\n\t"
+ "sll\t$1, %1, 0\n\t"
+ "blez\t$1, 1f\n\t"
+ "daddiu\t%1, %1, -1\n\t"
+ "li\t%0, 1\n\t"
+ "b\t2f\n"
+ "1:\tbeqz\t%3, 2f\n\t"
+ "li\t%0, %4\n\t"
+ "dli\t$1, 0x0000000100000000\n\t"
+ "daddu\t%1, %1, $1\n"
+ "2:\tscd\t%1, %2\n\t"
+ "beqz\t%1, 0b\n\t"
+ ".set\tpop"
+ : "=&r" (ret), "=&r" (tmp), "=m" (*sem)
+ : "r" (signal_pending(tsk)), "i" (-EINTR));
return ret;
}
diff --git a/include/asm-mips/semaphore.h b/include/asm-mips/semaphore.h
index ebd77bd39..5321da452 100644
--- a/include/asm-mips/semaphore.h
+++ b/include/asm-mips/semaphore.h
@@ -147,29 +147,25 @@ static inline int down_trylock(struct semaphore * sem)
CHECK_MAGIC(sem->__magic);
#endif
- __asm__ __volatile__("
- .set mips3
-
- 0: lld %1, %4
- dli %3, 0x0000000100000000
- dsubu %1, %3
- li %0, 0
- bgez %1, 2f
- sll %2, %1, 0
- blez %2, 1f
- daddiu %1, %1, -1
- b 2f
- 1:
- daddu %1, %1, %3
- li %0, 1
- 2:
- scd %1, %4
- beqz %1, 0b
-
- .set mips0"
- : "=&r"(ret), "=&r"(tmp), "=&r"(tmp2), "=&r"(sub)
- : "m"(*sem)
- : "memory");
+ __asm__ __volatile__(
+ ".set\tmips3\t\t\t# down_trylock\n"
+ "0:\tlld\t%1, %4\n\t"
+ "dli\t%3, 0x0000000100000000\n\t"
+ "dsubu\t%1, %3\n\t"
+ "li\t%0, 0\n\t"
+ "bgez\t%1, 2f\n\t"
+ "sll\t%2, %1, 0\n\t"
+ "blez\t%2, 1f\n\t"
+ "daddiu\t%1, %1, -1\n\t"
+ "b\t2f\n\t"
+ "1:\tdaddu\t%1, %1, %3\n"
+ "li\t%0, 1\n"
+ "2:\tscd\t%1, %4\n\t"
+ "beqz\t%1, 0b\n\t"
+ ".set mips0"
+ : "=&r"(ret), "=&r"(tmp), "=&r"(tmp2), "=&r"(sub)
+ : "m"(*sem)
+ : "memory");
return ret;
}