ck_pr: Implement ck_pr_fence_atomic in MD ck_pr.

ck_pring
Samy Al Bahra 12 years ago
parent 65f24e8860
commit 214d7aed66

@ -67,6 +67,8 @@ ck_pr_stall(void)
__asm__ __volatile__(I ::: "memory"); \
}
CK_PR_FENCE(atomic, "lwsync")
CK_PR_FENCE(atomic_atomic, "lwsync")
CK_PR_FENCE(atomic_store, "lwsync")
CK_PR_FENCE(atomic_load, "sync")
CK_PR_FENCE(store_atomic, "lwsync")

@ -70,6 +70,8 @@ ck_pr_stall(void)
* These are derived from:
* http://www.ibm.com/developerworks/systems/articles/powerpc.html
*/
CK_PR_FENCE(atomic, "lwsync")
CK_PR_FENCE(atomic_atomic, "lwsync")
CK_PR_FENCE(atomic_store, "lwsync")
CK_PR_FENCE(atomic_load, "sync")
CK_PR_FENCE(store_atomic, "lwsync")

@ -67,6 +67,8 @@ ck_pr_stall(void)
* Atomic operations are treated as both load and store
* operations on SPARCv9.
*/
CK_PR_FENCE(atomic_atomic, "membar #StoreStore")
CK_PR_FENCE(atomic, "membar #StoreStore")
CK_PR_FENCE(atomic_store, "membar #StoreStore")
CK_PR_FENCE(atomic_load, "membar #StoreLoad")
CK_PR_FENCE(store_atomic, "membar #StoreStore")

@ -70,6 +70,8 @@ ck_pr_stall(void)
__asm__ __volatile__(I ::: "memory"); \
}
CK_PR_FENCE(atomic, "sfence")
CK_PR_FENCE(atomic_atomic, "sfence")
CK_PR_FENCE(atomic_store, "sfence")
CK_PR_FENCE(atomic_load, "mfence")
CK_PR_FENCE(store_atomic, "sfence")

Loading…
Cancel
Save