Use strexeq instead of needlessly branch.
Suggested by: ian
This commit is contained in:
parent
2bbd06fc33
commit
14dd14fc00
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=312932
@ -201,9 +201,8 @@ atomic_fcmpset_32(volatile uint32_t *p, uint32_t *cmpval, uint32_t newval)
|
|||||||
"1: mov %0, #1 \n"
|
"1: mov %0, #1 \n"
|
||||||
" ldrex %1, [%2] \n"
|
" ldrex %1, [%2] \n"
|
||||||
" cmp %1, %3 \n"
|
" cmp %1, %3 \n"
|
||||||
" it ne \n"
|
" it eq \n"
|
||||||
" bne 2f \n"
|
" strexeq %0, %4, [%2] \n"
|
||||||
" strex %0, %4, [%2] \n"
|
|
||||||
"2:"
|
"2:"
|
||||||
: "=&r" (ret), "=&r" (tmp), "+r" (p), "+r" (_cmpval), "+r" (newval)
|
: "=&r" (ret), "=&r" (tmp), "+r" (p), "+r" (_cmpval), "+r" (newval)
|
||||||
: : "cc", "memory");
|
: : "cc", "memory");
|
||||||
|
Loading…
Reference in New Issue
Block a user