summaryrefslogtreecommitdiff
path: root/core/cortex-m0/atomic.h
diff options
context:
space:
mode:
Diffstat (limited to 'core/cortex-m0/atomic.h')
-rw-r--r--core/cortex-m0/atomic.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/core/cortex-m0/atomic.h b/core/cortex-m0/atomic.h
index 32260ada07..e2df0f2a93 100644
--- a/core/cortex-m0/atomic.h
+++ b/core/cortex-m0/atomic.h
@@ -56,7 +56,7 @@ static inline uint32_t atomic_read_clear(uint32_t volatile *addr)
" ldr %0, [%1]\n"
" str %2, [%1]\n"
" cpsie i\n"
- : "=&r" (ret)
+ : "=&b" (ret)
: "b" (addr), "r" (0) : "cc");
return ret;