diff options
author | Ralf Baechle <ralf@linux-mips.org> | 2001-03-10 22:34:00 +0000 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2001-03-10 22:34:00 +0000 |
commit | 72897c4ebcbad0a5b1cb834d486fd15ac269083f (patch) | |
tree | 6a59b07bce17ded60e8ffc941b7e9514f26d708f /include | |
parent | 05d66f13fd1c16283893589e9014a132bcfc9709 (diff) |
Fix more gcc 3.0 warnings.
Diffstat (limited to 'include')
-rw-r--r-- | include/asm-mips/semaphore-helper.h | 43 | ||||
-rw-r--r-- | include/asm-mips/semaphore.h | 42 | ||||
-rw-r--r-- | include/asm-mips64/semaphore-helper.h | 87 | ||||
-rw-r--r-- | include/asm-mips64/semaphore.h | 46 |
4 files changed, 100 insertions, 118 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; } diff --git a/include/asm-mips64/semaphore-helper.h b/include/asm-mips64/semaphore-helper.h index 91799d486..9a67a5842 100644 --- a/include/asm-mips64/semaphore-helper.h +++ b/include/asm-mips64/semaphore-helper.h @@ -3,8 +3,8 @@ * * (C) Copyright 1996 Linus Torvalds * (C) Copyright 1999 Andrea Arcangeli - * (C) Copyright 1999 Ralf Baechle - * (C) Copyright 1999 Silicon Graphics, Inc. + * (C) Copyright 1999, 2001 Ralf Baechle + * (C) Copyright 1999, 2001 Silicon Graphics, Inc. */ #ifndef _ASM_SEMAPHORE_HELPER_H #define _ASM_SEMAPHORE_HELPER_H @@ -68,63 +68,56 @@ waking_non_zero_interruptible(struct semaphore *sem, struct task_struct *tsk) #ifdef __MIPSEB__ - __asm__ __volatile__(" - .set push - .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" + __asm__ __volatile__( + ".set\tpush\t\t\t# waking_non_zero_interruptible\n\t" + ".set\tnoat\n\t" + "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\t" + "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\t" + "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)); #elif defined(__MIPSEL__) - __asm__ __volatile__(" - .set push - .set noat -0: - lld %1, %2 - li %0, 0 - blez %1, 1f - dli $1, 0x0000000100000000 - dsubu %1, %1, $1 - li %0, 1 - b 2f -1: - beqz %3, 2f - li %0, %4 + __asm__ __volatile__( + ".set\tpush\t\t\t# waking_non_zero_interruptible\n\t" + ".set\t noat\n" + "0:\tlld\t%1, %2\n\t" + "li\t%0, 0\n\t" + "blez\t%1, 1f\n\t" + "dli\t$1, 0x0000000100000000\n\t" + "dsubu\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" /* * It would be nice to assume that sem->count * is != -1, but we will guard against that case */ - daddiu $1, %1, 1 - dsll32 $1, $1, 0 - dsrl32 $1, $1, 0 - dsrl32 %1, %1, 0 - dsll32 %1, %1, 0 - or %1, %1, $1 -2: - scd %1, %2 - beqz %1, 0b - .set pop" + "daddiu\t$1, %1, 1\n\t" + "dsll32\t$1, $1, 0\n\t" + "dsrl32\t$1, $1, 0\n\t" + "dsrl32\t%1, %1, 0\n\t" + "dsll32\t%1, %1, 0\n\t" + "or\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)); -#else -#error "MIPS but neither __MIPSEL__ nor __MIPSEB__?" #endif return ret; diff --git a/include/asm-mips64/semaphore.h b/include/asm-mips64/semaphore.h index 67c7b8772..c1c5ab4cb 100644 --- a/include/asm-mips64/semaphore.h +++ b/include/asm-mips64/semaphore.h @@ -3,8 +3,8 @@ * for more details. * * Copyright (C) 1996 Linus Torvalds - * Copyright (C) 1998, 1999, 2000 Ralf Baechle - * Copyright (C) 1999, 2000 Silicon Graphics, Inc. + * Copyright (C) 1998, 1999, 2000, 2001 Ralf Baechle + * Copyright (C) 1999, 2000, 2001 Silicon Graphics, Inc. */ #ifndef _ASM_SEMAPHORE_H #define _ASM_SEMAPHORE_H @@ -129,29 +129,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" + "\tdli\t%3, 0x0000000100000000\n\t" + "\tdsubu\t%1, %3\n\t" + "\tli\t%0, 0\n\t" + "\tbgez\t%1, 2f\n\t" + "\tsll\t%2, %1, 0\n\t" + "\tblez\t%2, 1f\n\t" + "\tdaddiu\t%1, %1, -1\n\t" + "\tb\t2f\n" + "1:\tdaddu\t%1, %1, %3\n\t" + "\tli\t%0, 1\n" + "2:\tscd\t%1, %4\n\t" + "\tbeqz\t%1, 0b\n\t" + "\t.set\tmips0" + : "=&r"(ret), "=&r"(tmp), "=&r"(tmp2), "=&r"(sub) + : "m"(*sem) + : "memory"); return ret; } |