ck_pr/sparcv9: Assume TSO by default.

ck_pring
Samy Al Bahra 12 years ago
parent 9d1540e586
commit fedc2f6e47

@ -32,6 +32,7 @@
#endif
#include <ck_cc.h>
#include <ck_md.h>
/*
* The following represent supported atomic operations.
@ -50,8 +51,23 @@ ck_pr_stall(void)
return;
}
/*
* We must assume RMO.
#ifndef CK_MD_RMO
/*
* By default, we will assume TSO model is used on SPARCv9.
*/
#define CK_PR_FENCE(T, I) \
CK_CC_INLINE static void \
ck_pr_fence_strict_##T(void) \
{ \
__asm__ __volatile__(I ::: "memory"); \
} \
CK_CC_INLINE static void ck_pr_fence_##T(void) \
{ \
__asm__ __volatile__("" ::: "memory"); \
}
#else
/*
* If RMO is forced, then do not assume TSO model.
*/
#define CK_PR_FENCE(T, I) \
CK_CC_INLINE static void \
@ -63,6 +79,7 @@ ck_pr_stall(void)
{ \
__asm__ __volatile__(I ::: "memory"); \
}
#endif /* CK_MD_RMO */
CK_PR_FENCE(load_depends, "")
CK_PR_FENCE(store, "membar #StoreStore")

Loading…
Cancel
Save