Commit 3e6cb2d3 authored by Ralf Baechle's avatar Ralf Baechle

[MIPS] Use "=R" constraint to avoid compiler errors in cmpxchg().

Signed-off-by: default avatarRalf Baechle <ralf@linux-mips.org>
parent e95a9ec1
...@@ -322,7 +322,7 @@ static inline unsigned long __cmpxchg_u32(volatile int * m, unsigned long old, ...@@ -322,7 +322,7 @@ static inline unsigned long __cmpxchg_u32(volatile int * m, unsigned long old,
#endif #endif
"2: \n" "2: \n"
" .set pop \n" " .set pop \n"
: "=&r" (retval), "=m" (*m) : "=&r" (retval), "=R" (*m)
: "R" (*m), "Jr" (old), "Jr" (new) : "R" (*m), "Jr" (old), "Jr" (new)
: "memory"); : "memory");
} else if (cpu_has_llsc) { } else if (cpu_has_llsc) {
...@@ -342,7 +342,7 @@ static inline unsigned long __cmpxchg_u32(volatile int * m, unsigned long old, ...@@ -342,7 +342,7 @@ static inline unsigned long __cmpxchg_u32(volatile int * m, unsigned long old,
#endif #endif
"2: \n" "2: \n"
" .set pop \n" " .set pop \n"
: "=&r" (retval), "=m" (*m) : "=&r" (retval), "=R" (*m)
: "R" (*m), "Jr" (old), "Jr" (new) : "R" (*m), "Jr" (old), "Jr" (new)
: "memory"); : "memory");
} else { } else {
...@@ -379,7 +379,7 @@ static inline unsigned long __cmpxchg_u64(volatile int * m, unsigned long old, ...@@ -379,7 +379,7 @@ static inline unsigned long __cmpxchg_u64(volatile int * m, unsigned long old,
#endif #endif
"2: \n" "2: \n"
" .set pop \n" " .set pop \n"
: "=&r" (retval), "=m" (*m) : "=&r" (retval), "=R" (*m)
: "R" (*m), "Jr" (old), "Jr" (new) : "R" (*m), "Jr" (old), "Jr" (new)
: "memory"); : "memory");
} else if (cpu_has_llsc) { } else if (cpu_has_llsc) {
...@@ -397,7 +397,7 @@ static inline unsigned long __cmpxchg_u64(volatile int * m, unsigned long old, ...@@ -397,7 +397,7 @@ static inline unsigned long __cmpxchg_u64(volatile int * m, unsigned long old,
#endif #endif
"2: \n" "2: \n"
" .set pop \n" " .set pop \n"
: "=&r" (retval), "=m" (*m) : "=&r" (retval), "=R" (*m)
: "R" (*m), "Jr" (old), "Jr" (new) : "R" (*m), "Jr" (old), "Jr" (new)
: "memory"); : "memory");
} else { } else {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment