summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorian <ian@FreeBSD.org>2014-10-26 03:13:19 +0000
committerian <ian@FreeBSD.org>2014-10-26 03:13:19 +0000
commit9e4d760d5e42cf365506328c7ea8fd73cc6a0e96 (patch)
treeae017b1ce95f7dd629c69c8fe9f9828352f6c333
parent3eae765afaf08f9c271c03e29dd692f51bbea201 (diff)
downloadFreeBSD-src-9e4d760d5e42cf365506328c7ea8fd73cc6a0e96.zip
FreeBSD-src-9e4d760d5e42cf365506328c7ea8fd73cc6a0e96.tar.gz
MFC r271310:
Rename new to newval in inline asm code, to avoid clashes with C++ new.
-rw-r--r--sys/arm/include/atomic.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/sys/arm/include/atomic.h b/sys/arm/include/atomic.h
index a62ca00..b3af198 100644
--- a/sys/arm/include/atomic.h
+++ b/sys/arm/include/atomic.h
@@ -268,12 +268,12 @@ atomic_cmpset_64(volatile uint64_t *p, uint64_t cmpval, uint64_t newval)
__asm __volatile(
"1: \n"
" ldrexd %[tmp], [%[ptr]]\n"
- " teq %Q[tmp], %Q[cmp]\n"
+ " teq %Q[tmp], %Q[cmpval]\n"
" itee eq \n"
- " teqeq %R[tmp], %R[cmp]\n"
+ " teqeq %R[tmp], %R[cmpval]\n"
" movne %[ret], #0\n"
" bne 2f\n"
- " strexd %[ret], %[new], [%[ptr]]\n"
+ " strexd %[ret], %[newval], [%[ptr]]\n"
" teq %[ret], #0\n"
" it ne \n"
" bne 1b\n"
@@ -282,8 +282,8 @@ atomic_cmpset_64(volatile uint64_t *p, uint64_t cmpval, uint64_t newval)
: [ret] "=&r" (ret),
[tmp] "=&r" (tmp)
: [ptr] "r" (p),
- [cmp] "r" (cmpval),
- [new] "r" (newval)
+ [cmpval] "r" (cmpval),
+ [newval] "r" (newval)
: "cc", "memory");
return (ret);
}
OpenPOWER on IntegriCloud