Arm/atomic: correct asm() constraints in build_add_sized()

The memory operand is an in/out one, and the auxiliary register gets
written to early.

Take the opportunity and also drop the redundant cast (the inline
functions' parameters are already of the casted-to type).

Signed-off-by: Jan Beulich <jbeulich@suse.com>
Reviewed-by: Julien Grall <julien.grall@arm.com>
(cherry picked from commit 51ceb1623b)
This commit is contained in:
Jan Beulich authored and Stefano Stabellini committed 2019-04-19 14:03:32 -07:00
1 parent 7842419a6b
commit b2bbd34257
1 file changed
+1 -1
+1 -1
View File
@@ -30,7 +30,7 @@ static inline void name(volatile type *addr, type val) \
asm volatile("ldr" size " %"width"1,%0\n" \
"add %"width"1,%"width"1,%"width"2\n" \
"str" size " %"width"1,%0" \
: "=m" (*(volatile type *)addr), "=r" (t) \
: "+m" (*addr), "=&r" (t) \
: reg (val)); \
}
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.