arm64: asm: remove redundant "cc" clobbers
cbnz/tbnz don't update the condition flags, so remove the "cc" clobbers from inline asm blocks that only use these instructions to implement conditional branches. Signed-off-by: Will Deacon <will.deacon@arm.com> Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Цей коміт міститься в:

зафіксовано
Catalin Marinas

джерело
8e86f0b409
коміт
95c4189689
@@ -54,8 +54,7 @@ static inline void atomic_add(int i, atomic_t *v)
|
||||
" stxr %w1, %w0, %2\n"
|
||||
" cbnz %w1, 1b"
|
||||
: "=&r" (result), "=&r" (tmp), "+Q" (v->counter)
|
||||
: "Ir" (i)
|
||||
: "cc");
|
||||
: "Ir" (i));
|
||||
}
|
||||
|
||||
static inline int atomic_add_return(int i, atomic_t *v)
|
||||
@@ -70,7 +69,7 @@ static inline int atomic_add_return(int i, atomic_t *v)
|
||||
" cbnz %w1, 1b"
|
||||
: "=&r" (result), "=&r" (tmp), "+Q" (v->counter)
|
||||
: "Ir" (i)
|
||||
: "cc", "memory");
|
||||
: "memory");
|
||||
|
||||
smp_mb();
|
||||
return result;
|
||||
@@ -87,8 +86,7 @@ static inline void atomic_sub(int i, atomic_t *v)
|
||||
" stxr %w1, %w0, %2\n"
|
||||
" cbnz %w1, 1b"
|
||||
: "=&r" (result), "=&r" (tmp), "+Q" (v->counter)
|
||||
: "Ir" (i)
|
||||
: "cc");
|
||||
: "Ir" (i));
|
||||
}
|
||||
|
||||
static inline int atomic_sub_return(int i, atomic_t *v)
|
||||
@@ -103,7 +101,7 @@ static inline int atomic_sub_return(int i, atomic_t *v)
|
||||
" cbnz %w1, 1b"
|
||||
: "=&r" (result), "=&r" (tmp), "+Q" (v->counter)
|
||||
: "Ir" (i)
|
||||
: "cc", "memory");
|
||||
: "memory");
|
||||
|
||||
smp_mb();
|
||||
return result;
|
||||
@@ -125,7 +123,7 @@ static inline int atomic_cmpxchg(atomic_t *ptr, int old, int new)
|
||||
"2:"
|
||||
: "=&r" (tmp), "=&r" (oldval), "+Q" (ptr->counter)
|
||||
: "Ir" (old), "r" (new)
|
||||
: "cc", "memory");
|
||||
: "cc");
|
||||
|
||||
smp_mb();
|
||||
return oldval;
|
||||
@@ -178,8 +176,7 @@ static inline void atomic64_add(u64 i, atomic64_t *v)
|
||||
" stxr %w1, %0, %2\n"
|
||||
" cbnz %w1, 1b"
|
||||
: "=&r" (result), "=&r" (tmp), "+Q" (v->counter)
|
||||
: "Ir" (i)
|
||||
: "cc");
|
||||
: "Ir" (i));
|
||||
}
|
||||
|
||||
static inline long atomic64_add_return(long i, atomic64_t *v)
|
||||
@@ -194,7 +191,7 @@ static inline long atomic64_add_return(long i, atomic64_t *v)
|
||||
" cbnz %w1, 1b"
|
||||
: "=&r" (result), "=&r" (tmp), "+Q" (v->counter)
|
||||
: "Ir" (i)
|
||||
: "cc", "memory");
|
||||
: "memory");
|
||||
|
||||
smp_mb();
|
||||
return result;
|
||||
@@ -211,8 +208,7 @@ static inline void atomic64_sub(u64 i, atomic64_t *v)
|
||||
" stxr %w1, %0, %2\n"
|
||||
" cbnz %w1, 1b"
|
||||
: "=&r" (result), "=&r" (tmp), "+Q" (v->counter)
|
||||
: "Ir" (i)
|
||||
: "cc");
|
||||
: "Ir" (i));
|
||||
}
|
||||
|
||||
static inline long atomic64_sub_return(long i, atomic64_t *v)
|
||||
@@ -227,7 +223,7 @@ static inline long atomic64_sub_return(long i, atomic64_t *v)
|
||||
" cbnz %w1, 1b"
|
||||
: "=&r" (result), "=&r" (tmp), "+Q" (v->counter)
|
||||
: "Ir" (i)
|
||||
: "cc", "memory");
|
||||
: "memory");
|
||||
|
||||
smp_mb();
|
||||
return result;
|
||||
@@ -249,7 +245,7 @@ static inline long atomic64_cmpxchg(atomic64_t *ptr, long old, long new)
|
||||
"2:"
|
||||
: "=&r" (res), "=&r" (oldval), "+Q" (ptr->counter)
|
||||
: "Ir" (old), "r" (new)
|
||||
: "cc", "memory");
|
||||
: "cc");
|
||||
|
||||
smp_mb();
|
||||
return oldval;
|
||||
|
Посилання в новій задачі
Заблокувати користувача