Add SH4 and mips architecture support.
Submitted by Andreas Vinsander.
This commit is contained in:
parent
6684cacfa8
commit
3492daf1ce
@ -160,6 +160,22 @@ atomic_sub_uint32(uint32_t *p, uint32_t x)
|
|||||||
|
|
||||||
return (x);
|
return (x);
|
||||||
}
|
}
|
||||||
|
#elif (defined __SH4__ || defined __mips__) && (__GNUC__ > 4 || \
|
||||||
|
(__GNUC__ == 4 && (__GNUC_MINOR__ > 1 || (__GNUC_MINOR__ == 1 && \
|
||||||
|
__GNUC_PATCHLEVEL__ > 1))))
|
||||||
|
JEMALLOC_INLINE uint32_t
|
||||||
|
atomic_add_uint32(uint32_t *p, uint32_t x)
|
||||||
|
{
|
||||||
|
|
||||||
|
return (__sync_add_and_fetch(p, x));
|
||||||
|
}
|
||||||
|
|
||||||
|
JEMALLOC_INLINE uint32_t
|
||||||
|
atomic_sub_uint32(uint32_t *p, uint32_t x)
|
||||||
|
{
|
||||||
|
|
||||||
|
return (__sync_sub_and_fetch(p, x));
|
||||||
|
}
|
||||||
#else
|
#else
|
||||||
# error "Missing implementation for 32-bit atomic operations"
|
# error "Missing implementation for 32-bit atomic operations"
|
||||||
#endif
|
#endif
|
||||||
|
@ -254,6 +254,9 @@ extern void (*je_malloc_message)(void *wcbopaque, const char *s);
|
|||||||
# ifdef __s390x__
|
# ifdef __s390x__
|
||||||
# define LG_QUANTUM 4
|
# define LG_QUANTUM 4
|
||||||
# endif
|
# endif
|
||||||
|
# ifdef __SH4__
|
||||||
|
# define LG_QUANTUM 4
|
||||||
|
# endif
|
||||||
# ifdef __tile__
|
# ifdef __tile__
|
||||||
# define LG_QUANTUM 4
|
# define LG_QUANTUM 4
|
||||||
# endif
|
# endif
|
||||||
|
Loading…
Reference in New Issue
Block a user