summaryrefslogtreecommitdiffstats
path: root/sys/amd64/include
diff options
context:
space:
mode:
authorjkim <jkim@FreeBSD.org>2013-08-21 21:30:06 +0000
committerjkim <jkim@FreeBSD.org>2013-08-21 21:30:06 +0000
commita0c0cc666e2c63f47c8d9dbf63c256d26e646579 (patch)
tree68085be00345a34698e2e16178f5f0c81608e342 /sys/amd64/include
parent8c10ae99f831cad18194c571d5e44e22bb1001cd (diff)
downloadFreeBSD-src-a0c0cc666e2c63f47c8d9dbf63c256d26e646579.zip
FreeBSD-src-a0c0cc666e2c63f47c8d9dbf63c256d26e646579.tar.gz
- Remove the "a" constraint from main output operand for atomic_cmpset().
- Use "+" modifier for the "expect" because it is also an output (unused).
Diffstat (limited to 'sys/amd64/include')
-rw-r--r--sys/amd64/include/atomic.h20
1 files changed, 10 insertions, 10 deletions
diff --git a/sys/amd64/include/atomic.h b/sys/amd64/include/atomic.h
index 11e7b57..7d8d839 100644
--- a/sys/amd64/include/atomic.h
+++ b/sys/amd64/include/atomic.h
@@ -138,13 +138,13 @@ atomic_cmpset_int(volatile u_int *dst, u_int expect, u_int src)
__asm __volatile(
" " MPLOCKED " "
- " cmpxchgl %2,%1 ; "
+ " cmpxchgl %3,%1 ; "
" sete %0 ; "
"# atomic_cmpset_int"
- : "=a" (res), /* 0 */
- "+m" (*dst) /* 1 */
- : "r" (src), /* 2 */
- "a" (expect) /* 3 */
+ : "=q" (res), /* 0 */
+ "+m" (*dst), /* 1 */
+ "+a" (expect) /* 2 */
+ : "r" (src) /* 3 */
: "memory", "cc");
return (res);
@@ -157,13 +157,13 @@ atomic_cmpset_long(volatile u_long *dst, u_long expect, u_long src)
__asm __volatile(
" " MPLOCKED " "
- " cmpxchgq %2,%1 ; "
+ " cmpxchgq %3,%1 ; "
" sete %0 ; "
"# atomic_cmpset_long"
- : "=a" (res), /* 0 */
- "+m" (*dst) /* 1 */
- : "r" (src), /* 2 */
- "a" (expect) /* 3 */
+ : "=q" (res), /* 0 */
+ "+m" (*dst), /* 1 */
+ "+a" (expect) /* 2 */
+ : "r" (src) /* 3 */
: "memory", "cc");
return (res);
OpenPOWER on IntegriCloud