ck_pr/arm: Don't use ldrexd/strexd if we're building for armv6.

ck_pring
Olivier Houchard 10 years ago
parent 881e427d20
commit b002ed5f11

@ -91,7 +91,9 @@
#define CK_F_PR_INC_UINT #define CK_F_PR_INC_UINT
#define CK_F_PR_LOAD_16 #define CK_F_PR_LOAD_16
#define CK_F_PR_LOAD_32 #define CK_F_PR_LOAD_32
#if defined(__ARM_ARCH_7__) || defined(__ARM_ARCH_7A__)
#define CK_F_PR_LOAD_64 #define CK_F_PR_LOAD_64
#endif
#define CK_F_PR_LOAD_8 #define CK_F_PR_LOAD_8
#define CK_F_PR_LOAD_CHAR #define CK_F_PR_LOAD_CHAR
#define CK_F_PR_LOAD_INT #define CK_F_PR_LOAD_INT
@ -125,7 +127,9 @@
#define CK_F_PR_STALL #define CK_F_PR_STALL
#define CK_F_PR_STORE_16 #define CK_F_PR_STORE_16
#define CK_F_PR_STORE_32 #define CK_F_PR_STORE_32
#if defined(__ARM_ARCH_7__) || defined(__ARM_ARCH_7A__)
#define CK_F_PR_STORE_64 #define CK_F_PR_STORE_64
#endif
#define CK_F_PR_STORE_8 #define CK_F_PR_STORE_8
#define CK_F_PR_STORE_CHAR #define CK_F_PR_STORE_CHAR
#define CK_F_PR_STORE_INT #define CK_F_PR_STORE_INT

@ -131,6 +131,8 @@ CK_PR_LOAD_S(char, char, "ldrb")
#undef CK_PR_LOAD_S #undef CK_PR_LOAD_S
#undef CK_PR_LOAD #undef CK_PR_LOAD
#if defined(__ARM_ARCH_7__) || defined(__ARM_ARCH_7A__)
CK_CC_INLINE static uint64_t CK_CC_INLINE static uint64_t
ck_pr_md_load_64(const uint64_t *target) ck_pr_md_load_64(const uint64_t *target)
{ {
@ -143,6 +145,8 @@ ck_pr_md_load_64(const uint64_t *target)
return (ret); return (ret);
} }
#endif
#define CK_PR_STORE(S, M, T, C, I) \ #define CK_PR_STORE(S, M, T, C, I) \
CK_CC_INLINE static void \ CK_CC_INLINE static void \
ck_pr_md_store_##S(M *target, T v) \ ck_pr_md_store_##S(M *target, T v) \
@ -170,6 +174,8 @@ CK_PR_STORE_S(char, char, "strb")
#undef CK_PR_STORE_S #undef CK_PR_STORE_S
#undef CK_PR_STORE #undef CK_PR_STORE
#if defined(__ARM_ARCH_7__) || defined(__ARM_ARCH_7A__)
CK_CC_INLINE static void CK_CC_INLINE static void
ck_pr_md_store_64(const uint64_t *target, uint64_t value) ck_pr_md_store_64(const uint64_t *target, uint64_t value)
{ {
@ -186,6 +192,8 @@ ck_pr_md_store_64(const uint64_t *target, uint64_t value)
: "memory", "cc"); : "memory", "cc");
} }
#endif
CK_CC_INLINE static bool CK_CC_INLINE static bool
ck_pr_cas_64_value(uint64_t *target, uint64_t compare, uint64_t set, uint64_t *value) ck_pr_cas_64_value(uint64_t *target, uint64_t compare, uint64_t set, uint64_t *value)
{ {

Loading…
Cancel
Save