voron

experimental ARM OS
git clone git://git.2f30.org/voron.git
Log | Files | Refs | LICENSE

commit 87c996caabb6a92cbc8586758c0c5028b64de8d7
parent 9a6fa3211305d7d3b4cf8216fbc27e7d3eec9cb2
Author: oblique <psyberbits@gmail.com>
Date:   Thu Nov  1 17:10:05 +0200

atomic.h, spinlock.h: put "cc" in clobber list

Diffstat:
include/atomic.h | 16++++++++--------
include/spinlock.h | 10+++++-----
2 files changed, 13 insertions(+), 13 deletions(-)
diff --git a/include/atomic.h b/include/atomic.h @@ -25,8 +25,8 @@ __uatomic_read(uatomic_t *v) * register so GCC will not produce assembly code * like this one: ldrex r5, [r5] */ : "=&r" (r) - : "r" (v) - : "v1", "memory" + : "r" (&v->counter) + : "v1", "memory", "cc" ); return r; } @@ -41,8 +41,8 @@ uatomic_set(uatomic_t *v, u32 i) "teq v1, #0 \n\t" "bne 1b \n\t" : - : "r" (i), "r" (v) - : "v1", "memory" + : "r" (i), "r" (&v->counter) + : "v1", "memory", "cc" ); } @@ -57,8 +57,8 @@ uatomic_add(u32 i, uatomic_t *v) "teq v2, #0 \n\t" "bne 1b \n\t" : - : "r" (i), "r" (v) - : "v1", "v2", "memory" + : "r" (i), "r" (&v->counter) + : "v1", "v2", "memory", "cc" ); } @@ -74,8 +74,8 @@ __uatomic_add_return(u32 i, uatomic_t *v) "teq v1, #0 \n\t" "bne 1b \n\t" : "=&r" (r) - : "r" (i), "r" (v) - : "v1", "memory" + : "r" (i), "r" (&v->counter) + : "v1", "memory", "cc" ); return r; } diff --git a/include/spinlock.h b/include/spinlock.h @@ -23,8 +23,8 @@ spinlock_lock(spinlock_t *sl) "teq v1, #0 \n\t" "bne 1b \n\t" : - : "r" (sl), "r" (0x80000000) - : "v1", "memory" + : "r" (&sl->lock), "r" (0x80000000) + : "v1", "memory", "cc" ); dmb(); } @@ -36,7 +36,7 @@ spinlock_unlock(spinlock_t *sl) asm volatile ( "str %1, [%0]" : - : "r" (sl), "r" (0) + : "r" (&sl->lock), "r" (0) : "memory" ); dsb(); @@ -55,8 +55,8 @@ spinlock_trylock(spinlock_t *sl) "teq %0, #0 \n\t" "strexeq %0, %2, [%1] \n\t" : "=&r" (tmp) - : "r" (sl), "r" (0x80000000) - : "memory" + : "r" (&sl->lock), "r" (0x80000000) + : "memory", "cc" ); if (tmp == 0) {