diff options
author | cognet <cognet@FreeBSD.org> | 2004-12-18 17:43:01 +0000 |
---|---|---|
committer | cognet <cognet@FreeBSD.org> | 2004-12-18 17:43:01 +0000 |
commit | 5b61dc111e6171dc28242aa537716d02b68408cc (patch) | |
tree | 421fc6028036a743ab3c93d0887a121555cb7bf0 /sys/arm | |
parent | b0de3be535f1444640ce9fcba86a8d0c06dd606a (diff) | |
download | FreeBSD-src-5b61dc111e6171dc28242aa537716d02b68408cc.zip FreeBSD-src-5b61dc111e6171dc28242aa537716d02b68408cc.tar.gz |
Make sure gcc doesn't generate something such as swp r3, r4, [r3] for __swp,
as it has unpredictable results.
Diffstat (limited to 'sys/arm')
-rw-r--r-- | sys/arm/include/atomic.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/sys/arm/include/atomic.h b/sys/arm/include/atomic.h index 9785ba6..ec1fd9f 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); } |