Use strexeq instead of needlessly branch.

Suggested by:	ian
This commit is contained in:
Olivier Houchard 2017-01-28 17:46:04 +00:00
parent 2bbd06fc33
commit 14dd14fc00
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=312932

View File

@ -201,9 +201,8 @@ atomic_fcmpset_32(volatile uint32_t *p, uint32_t *cmpval, uint32_t newval)
"1: mov %0, #1 \n"
" ldrex %1, [%2] \n"
" cmp %1, %3 \n"
" it ne \n"
" bne 2f \n"
" strex %0, %4, [%2] \n"
" it eq \n"
" strexeq %0, %4, [%2] \n"
"2:"
: "=&r" (ret), "=&r" (tmp), "+r" (p), "+r" (_cmpval), "+r" (newval)
: : "cc", "memory");