Skip to content
Snippets Groups Projects
Commit 8b641c50 authored by Claudio Fontana's avatar Claudio Fontana Committed by Avi Kivity
Browse files

aarch64: bsd: atomic.h: use STLR for atomic_store_rel_int


Signed-off-by: default avatarClaudio Fontana <claudio.fontana@huawei.com>
Cc: Avi Kivity <avi@cloudius-systems.com>
Signed-off-by: default avatarAvi Kivity <avi@cloudius-systems.com>
parent 96996da2
No related branches found
No related tags found
No related merge requests found
...@@ -109,14 +109,12 @@ static __inline u_long atomic_fetchadd_long(volatile u_long *p, u_long val) ...@@ -109,14 +109,12 @@ static __inline u_long atomic_fetchadd_long(volatile u_long *p, u_long val)
static __inline void atomic_store_rel_int(volatile u_int *p, u_int val) static __inline void atomic_store_rel_int(volatile u_int *p, u_int val)
{ {
__asm __volatile("" : : : "memory"); __asm __volatile("stlr %w1, %0 ; " : "+Q"(*p) : "r"(val));
*p = val;
} }
static __inline void atomic_store_rel_long(volatile u_long *p, u_long val) static __inline void atomic_store_rel_long(volatile u_long *p, u_long val)
{ {
__asm __volatile("" : : : "memory"); __asm __volatile("stlr %1, %0 ; " : "+Q"(*p) : "r"(val));
*p = val;
} }
static __inline void atomic_add_int(volatile u_int *p, u_int val) static __inline void atomic_add_int(volatile u_int *p, u_int val)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment