projects
/
oweals
/
musl.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
bcad484
)
fix missing barrier instructions in powerpc atomic asm
author
Rich Felker
<dalias@aerifal.cx>
Sat, 19 Jul 2014 19:57:48 +0000
(15:57 -0400)
committer
Rich Felker
<dalias@aerifal.cx>
Sat, 19 Jul 2014 19:57:48 +0000
(15:57 -0400)
arch/powerpc/atomic.h
patch
|
blob
|
history
diff --git
a/arch/powerpc/atomic.h
b/arch/powerpc/atomic.h
index a1049bdb391af733b591417af39173283dc9a60f..c4ad40cd5d5e098b6242aaa362911f5414e8af32 100644
(file)
--- a/
arch/powerpc/atomic.h
+++ b/
arch/powerpc/atomic.h
@@
-25,11
+25,14
@@
static inline int a_ctz_64(uint64_t x)
static inline int a_cas(volatile int *p, int t, int s)
{
- __asm__("1: lwarx %0, 0, %4\n"
+ __asm__("\n"
+ " sync\n"
+ "1: lwarx %0, 0, %4\n"
" cmpw %0, %2\n"
" bne 1f\n"
" stwcx. %3, 0, %4\n"
" bne- 1b\n"
+ " isync\n"
"1: \n"
: "=&r"(t), "+m"(*p) : "r"(t), "r"(s), "r"(p) : "cc", "memory" );
return t;