diff options
Diffstat (limited to 'include/asm-i386/local.h')
-rw-r--r-- | include/asm-i386/local.h | 14 |
1 files changed, 6 insertions, 8 deletions
diff --git a/include/asm-i386/local.h b/include/asm-i386/local.h index 3b4998c51d08..12060e22f7e2 100644 --- a/include/asm-i386/local.h +++ b/include/asm-i386/local.h | |||
@@ -17,32 +17,30 @@ static __inline__ void local_inc(local_t *v) | |||
17 | { | 17 | { |
18 | __asm__ __volatile__( | 18 | __asm__ __volatile__( |
19 | "incl %0" | 19 | "incl %0" |
20 | :"=m" (v->counter) | 20 | :"+m" (v->counter)); |
21 | :"m" (v->counter)); | ||
22 | } | 21 | } |
23 | 22 | ||
24 | static __inline__ void local_dec(local_t *v) | 23 | static __inline__ void local_dec(local_t *v) |
25 | { | 24 | { |
26 | __asm__ __volatile__( | 25 | __asm__ __volatile__( |
27 | "decl %0" | 26 | "decl %0" |
28 | :"=m" (v->counter) | 27 | :"+m" (v->counter)); |
29 | :"m" (v->counter)); | ||
30 | } | 28 | } |
31 | 29 | ||
32 | static __inline__ void local_add(long i, local_t *v) | 30 | static __inline__ void local_add(long i, local_t *v) |
33 | { | 31 | { |
34 | __asm__ __volatile__( | 32 | __asm__ __volatile__( |
35 | "addl %1,%0" | 33 | "addl %1,%0" |
36 | :"=m" (v->counter) | 34 | :"+m" (v->counter) |
37 | :"ir" (i), "m" (v->counter)); | 35 | :"ir" (i)); |
38 | } | 36 | } |
39 | 37 | ||
40 | static __inline__ void local_sub(long i, local_t *v) | 38 | static __inline__ void local_sub(long i, local_t *v) |
41 | { | 39 | { |
42 | __asm__ __volatile__( | 40 | __asm__ __volatile__( |
43 | "subl %1,%0" | 41 | "subl %1,%0" |
44 | :"=m" (v->counter) | 42 | :"+m" (v->counter) |
45 | :"ir" (i), "m" (v->counter)); | 43 | :"ir" (i)); |
46 | } | 44 | } |
47 | 45 | ||
48 | /* On x86, these are no better than the atomic variants. */ | 46 | /* On x86, these are no better than the atomic variants. */ |