|
|
@ -32,6 +32,7 @@
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
|
|
|
|
|
|
|
#include <ck_cc.h>
|
|
|
|
#include <ck_cc.h>
|
|
|
|
|
|
|
|
#include <ck_md.h>
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
/*
|
|
|
|
* The following represent supported atomic operations.
|
|
|
|
* The following represent supported atomic operations.
|
|
|
@ -50,9 +51,24 @@ ck_pr_stall(void)
|
|
|
|
return;
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
/*
|
|
|
|
#ifndef CK_MD_RMO
|
|
|
|
* We must assume 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) \
|
|
|
|
#define CK_PR_FENCE(T, I) \
|
|
|
|
CK_CC_INLINE static void \
|
|
|
|
CK_CC_INLINE static void \
|
|
|
|
ck_pr_fence_strict_##T(void) \
|
|
|
|
ck_pr_fence_strict_##T(void) \
|
|
|
@ -63,6 +79,7 @@ ck_pr_stall(void)
|
|
|
|
{ \
|
|
|
|
{ \
|
|
|
|
__asm__ __volatile__(I ::: "memory"); \
|
|
|
|
__asm__ __volatile__(I ::: "memory"); \
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
#endif /* CK_MD_RMO */
|
|
|
|
|
|
|
|
|
|
|
|
CK_PR_FENCE(load_depends, "")
|
|
|
|
CK_PR_FENCE(load_depends, "")
|
|
|
|
CK_PR_FENCE(store, "membar #StoreStore")
|
|
|
|
CK_PR_FENCE(store, "membar #StoreStore")
|
|
|
|