Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 42608
b: refs/heads/master
c: c03c696
h: refs/heads/master
v: v3
  • Loading branch information
Paul Mundt committed Dec 6, 2006
1 parent a71b96f commit f7c4622
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 25 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: bd156147eb63ae525e0ac67868e41a808f03c532
refs/heads/master: c03c69610bfa728805deceeb624ee4268c722a5a
48 changes: 24 additions & 24 deletions trunk/include/asm-sh/atomic.h
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@ static inline void atomic_add(int i, atomic_t *v)
unsigned long tmp;

__asm__ __volatile__ (
"1: movli.l @%3, %0 ! atomic_add \n"
" add %2, %0 \n"
" movco.l %0, @%3 \n"
"1: movli.l @%2, %0 ! atomic_add \n"
" add %1, %0 \n"
" movco.l %0, @%2 \n"
" bf 1b \n"
: "=&z" (tmp), "=r" (&v->counter)
: "=&z" (tmp)
: "r" (i), "r" (&v->counter)
: "t");
#else
Expand All @@ -50,11 +50,11 @@ static inline void atomic_sub(int i, atomic_t *v)
unsigned long tmp;

__asm__ __volatile__ (
"1: movli.l @%3, %0 ! atomic_sub \n"
" sub %2, %0 \n"
" movco.l %0, @%3 \n"
"1: movli.l @%2, %0 ! atomic_sub \n"
" sub %1, %0 \n"
" movco.l %0, @%2 \n"
" bf 1b \n"
: "=&z" (tmp), "=r" (&v->counter)
: "=&z" (tmp)
: "r" (i), "r" (&v->counter)
: "t");
#else
Expand All @@ -80,12 +80,12 @@ static inline int atomic_add_return(int i, atomic_t *v)

#ifdef CONFIG_CPU_SH4A
__asm__ __volatile__ (
"1: movli.l @%3, %0 ! atomic_add_return \n"
" add %2, %0 \n"
" movco.l %0, @%3 \n"
"1: movli.l @%2, %0 ! atomic_add_return \n"
" add %1, %0 \n"
" movco.l %0, @%2 \n"
" bf 1b \n"
" synco \n"
: "=&z" (temp), "=r" (&v->counter)
: "=&z" (temp)
: "r" (i), "r" (&v->counter)
: "t");
#else
Expand All @@ -109,12 +109,12 @@ static inline int atomic_sub_return(int i, atomic_t *v)

#ifdef CONFIG_CPU_SH4A
__asm__ __volatile__ (
"1: movli.l @%3, %0 ! atomic_sub_return \n"
" sub %2, %0 \n"
" movco.l %0, @%3 \n"
"1: movli.l @%2, %0 ! atomic_sub_return \n"
" sub %1, %0 \n"
" movco.l %0, @%2 \n"
" bf 1b \n"
" synco \n"
: "=&z" (temp), "=r" (&v->counter)
: "=&z" (temp)
: "r" (i), "r" (&v->counter)
: "t");
#else
Expand Down Expand Up @@ -186,11 +186,11 @@ static inline void atomic_clear_mask(unsigned int mask, atomic_t *v)
unsigned long tmp;

__asm__ __volatile__ (
"1: movli.l @%3, %0 ! atomic_clear_mask \n"
" and %2, %0 \n"
" movco.l %0, @%3 \n"
"1: movli.l @%2, %0 ! atomic_clear_mask \n"
" and %1, %0 \n"
" movco.l %0, @%2 \n"
" bf 1b \n"
: "=&z" (tmp), "=r" (&v->counter)
: "=&z" (tmp)
: "r" (~mask), "r" (&v->counter)
: "t");
#else
Expand All @@ -208,11 +208,11 @@ static inline void atomic_set_mask(unsigned int mask, atomic_t *v)
unsigned long tmp;

__asm__ __volatile__ (
"1: movli.l @%3, %0 ! atomic_set_mask \n"
" or %2, %0 \n"
" movco.l %0, @%3 \n"
"1: movli.l @%2, %0 ! atomic_set_mask \n"
" or %1, %0 \n"
" movco.l %0, @%2 \n"
" bf 1b \n"
: "=&z" (tmp), "=r" (&v->counter)
: "=&z" (tmp)
: "r" (mask), "r" (&v->counter)
: "t");
#else
Expand Down

0 comments on commit f7c4622

Please sign in to comment.