This is how the two routines need to be modified:
The code block needs to be wrapped by dmb (memory barrier instruction)
register int nCount __asm__ ("r1");
int nResult;
__asm__ __volatile__ (
"dmb\n" <- here
"1: ldrex %0, [%3]\n"
" add %0, %0, #1\n"
" strex %1, %0, [%3]\n"
" teq %1, #0\n"
" bne 1b\n"
"dmb\n" <-here
: "=&r" (nCount), "=&r" (nResult), "=m" (*pCount)
: "r" (pCount)
: "memory");
I also sent a patch against LibO in email
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/726529
Title:
use arm assembly bits only for gcc < 4.6 on ARM > 6
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs