X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;f=include%2Fasm-h8300%2Fsemaphore.h;h=9efd009de29a4876d8399619d84160ad3a127c1c;hb=918425d07b2fe2087ee7dabf90e69a17e914649c;hp=283f0860a2af04a358a33130fe9e71aa6934c653;hpb=86090fcac5e27b630656fe3d963a6b80e26dac44;p=linux-2.6.git diff --git a/include/asm-h8300/semaphore.h b/include/asm-h8300/semaphore.h index 283f0860a..9efd009de 100644 --- a/include/asm-h8300/semaphore.h +++ b/include/asm-h8300/semaphore.h @@ -96,7 +96,7 @@ static inline void down(struct semaphore * sem) __asm__ __volatile__( "stc ccr,r3l\n\t" "orc #0x80,ccr\n\t" - "mov.l %0, er1\n\t" + "mov.l %2, er1\n\t" "dec.l #1,er1\n\t" "mov.l er1,%0\n\t" "bpl 1f\n\t" @@ -107,8 +107,8 @@ static inline void down(struct semaphore * sem) "1:\n\t" "ldc r3l,ccr\n" "2:" - : "+m"(*count) - : "g"(sem) + : "=m"(*count) + : "g"(sem),"m"(*count) : "cc", "er1", "er2", "er3"); } @@ -125,7 +125,7 @@ static inline int down_interruptible(struct semaphore * sem) __asm__ __volatile__( "stc ccr,r1l\n\t" "orc #0x80,ccr\n\t" - "mov.l %1, er2\n\t" + "mov.l %3, er2\n\t" "dec.l #1,er2\n\t" "mov.l er2,%1\n\t" "bpl 1f\n\t" @@ -137,8 +137,8 @@ static inline int down_interruptible(struct semaphore * sem) "ldc r1l,ccr\n\t" "sub.l %0,%0\n\t" "2:\n\t" - : "=r" (count),"+m" (*count) - : "g"(sem) + : "=r" (count),"=m" (*count) + : "g"(sem),"m"(*count) : "cc", "er1", "er2", "er3"); return (int)count; } @@ -155,7 +155,7 @@ static inline int down_trylock(struct semaphore * sem) __asm__ __volatile__( "stc ccr,r3l\n\t" "orc #0x80,ccr\n\t" - "mov.l %0,er2\n\t" + "mov.l %3,er2\n\t" "dec.l #1,er2\n\t" "mov.l er2,%0\n\t" "bpl 1f\n\t" @@ -171,8 +171,8 @@ static inline int down_trylock(struct semaphore * sem) "ldc r3l,ccr\n\t" "sub.l %1,%1\n" "2:" - : "+m" (*count),"=r"(count) - : "g"(sem) + : "=m" (*count),"=r"(count) + : "g"(sem),"m"(*count) : "cc", "er1","er2", "er3"); return (int)count; } @@ -195,7 +195,7 @@ static inline void up(struct semaphore * sem) __asm__ __volatile__( "stc ccr,r3l\n\t" "orc #0x80,ccr\n\t" - "mov.l %0,er1\n\t" + "mov.l %2,er1\n\t" "inc.l #1,er1\n\t" "mov.l er1,%0\n\t" "ldc r3l,ccr\n\t" @@ -205,8 +205,8 @@ static inline void up(struct semaphore * sem) "mov.l %1,er0\n\t" "jsr @___up\n" "1:" - : "+m"(*count) - : "g"(sem) + : "=m"(*count) + : "g"(sem),"m"(*count) : "cc", "er1", "er2", "er3"); }