diff --git a/sys/arm/include/atomic.h b/sys/arm/include/atomic.h index 9785ba68a8bc..ec1fd9f1ee0b 100644 --- a/sys/arm/include/atomic.h +++ b/sys/arm/include/atomic.h @@ -75,7 +75,7 @@ static __inline uint32_t __swp(uint32_t val, volatile uint32_t *ptr) { __asm __volatile("swp %0, %1, [%2]" - : "=r" (val) : "r" (val) , "r" (ptr) : "memory"); + : "=&r" (val) : "r" (val) , "r" (ptr) : "memory"); return (val); }