From 5ddfee749f07dd22d25b940956fe8f970046c7ab Mon Sep 17 00:00:00 2001 From: Haavard Skinnemoen Date: Tue, 24 Oct 2006 10:12:42 +0200 Subject: [PATCH] --- yaml --- r: 40352 b: refs/heads/master c: fa3522407f01ead1ec14bdd6b785ea08d17d500d h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/include/asm-avr32/atomic.h | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/[refs] b/[refs] index 4633ee579f00..3db0a50f5695 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: bee8ce809fb1c877388be032b468574a1cfff9ef +refs/heads/master: fa3522407f01ead1ec14bdd6b785ea08d17d500d diff --git a/trunk/include/asm-avr32/atomic.h b/trunk/include/asm-avr32/atomic.h index e0b9c44c126c..c40b6032c480 100644 --- a/trunk/include/asm-avr32/atomic.h +++ b/trunk/include/asm-avr32/atomic.h @@ -41,7 +41,7 @@ static inline int atomic_sub_return(int i, atomic_t *v) " stcond %1, %0\n" " brne 1b" : "=&r"(result), "=o"(v->counter) - : "m"(v->counter), "ir"(i) + : "m"(v->counter), "rKs21"(i) : "cc"); return result; @@ -58,7 +58,7 @@ static inline int atomic_add_return(int i, atomic_t *v) { int result; - if (__builtin_constant_p(i)) + if (__builtin_constant_p(i) && (i >= -1048575) && (i <= 1048576)) result = atomic_sub_return(-i, v); else asm volatile( @@ -101,7 +101,7 @@ static inline int atomic_sub_unless(atomic_t *v, int a, int u) " mov %1, 1\n" "1:" : "=&r"(tmp), "=&r"(result), "=o"(v->counter) - : "m"(v->counter), "ir"(a), "ir"(u) + : "m"(v->counter), "rKs21"(a), "rKs21"(u) : "cc", "memory"); return result; @@ -121,7 +121,7 @@ static inline int atomic_add_unless(atomic_t *v, int a, int u) { int tmp, result; - if (__builtin_constant_p(a)) + if (__builtin_constant_p(a) && (a >= -1048575) && (a <= 1048576)) result = atomic_sub_unless(v, -a, u); else { result = 0;