mirror of
https://github.com/fluencelabs/redis
synced 2025-03-19 09:00:51 +00:00
Merge branch 'arm' into unstable
This commit is contained in:
commit
e084b5a39f
10
src/Makefile
10
src/Makefile
@ -14,6 +14,7 @@
|
|||||||
|
|
||||||
release_hdr := $(shell sh -c './mkreleasehdr.sh')
|
release_hdr := $(shell sh -c './mkreleasehdr.sh')
|
||||||
uname_S := $(shell sh -c 'uname -s 2>/dev/null || echo not')
|
uname_S := $(shell sh -c 'uname -s 2>/dev/null || echo not')
|
||||||
|
uname_M := $(shell sh -c 'uname -m 2>/dev/null || echo not')
|
||||||
OPTIMIZATION?=-O2
|
OPTIMIZATION?=-O2
|
||||||
DEPENDENCY_TARGETS=hiredis linenoise lua
|
DEPENDENCY_TARGETS=hiredis linenoise lua
|
||||||
NODEPS:=clean distclean
|
NODEPS:=clean distclean
|
||||||
@ -27,11 +28,14 @@ PREFIX?=/usr/local
|
|||||||
INSTALL_BIN=$(PREFIX)/bin
|
INSTALL_BIN=$(PREFIX)/bin
|
||||||
INSTALL=install
|
INSTALL=install
|
||||||
|
|
||||||
# Default allocator
|
# Default allocator defaults to Jemalloc if it's not an ARM
|
||||||
|
MALLOC=libc
|
||||||
|
ifneq ($(uname_M),armv6l)
|
||||||
|
ifneq ($(uname_M),armv7l)
|
||||||
ifeq ($(uname_S),Linux)
|
ifeq ($(uname_S),Linux)
|
||||||
MALLOC=jemalloc
|
MALLOC=jemalloc
|
||||||
else
|
endif
|
||||||
MALLOC=libc
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# Backwards compatibility for selecting an allocator
|
# Backwards compatibility for selecting an allocator
|
||||||
|
@ -654,8 +654,11 @@ void bitopCommand(client *c) {
|
|||||||
|
|
||||||
/* Fast path: as far as we have data for all the input bitmaps we
|
/* Fast path: as far as we have data for all the input bitmaps we
|
||||||
* can take a fast path that performs much better than the
|
* can take a fast path that performs much better than the
|
||||||
* vanilla algorithm. */
|
* vanilla algorithm. On ARM we skip the fast path since it will
|
||||||
|
* result in GCC compiling the code using multiple-words load/store
|
||||||
|
* operations that are not supported even in ARM >= v6. */
|
||||||
j = 0;
|
j = 0;
|
||||||
|
#ifndef __arm__
|
||||||
if (minlen >= sizeof(unsigned long)*4 && numkeys <= 16) {
|
if (minlen >= sizeof(unsigned long)*4 && numkeys <= 16) {
|
||||||
unsigned long *lp[16];
|
unsigned long *lp[16];
|
||||||
unsigned long *lres = (unsigned long*) res;
|
unsigned long *lres = (unsigned long*) res;
|
||||||
@ -716,6 +719,7 @@ void bitopCommand(client *c) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
/* j is set to the next byte to process by the previous loop. */
|
/* j is set to the next byte to process by the previous loop. */
|
||||||
for (; j < maxlen; j++) {
|
for (; j < maxlen; j++) {
|
||||||
|
@ -206,4 +206,13 @@ void setproctitle(const char *fmt, ...);
|
|||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
/* Make sure we can test for ARM just checking for __arm__, since sometimes
|
||||||
|
* __arm is defined but __arm__ is not. */
|
||||||
|
#if defined(__arm) && !defined(__arm__)
|
||||||
|
#define __arm__
|
||||||
|
#endif
|
||||||
|
#if defined (__aarch64__) && !defined(__arm64__)
|
||||||
|
#define __arm64__
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -401,7 +401,11 @@ uint64_t MurmurHash64A (const void * key, int len, unsigned int seed) {
|
|||||||
uint64_t k;
|
uint64_t k;
|
||||||
|
|
||||||
#if (BYTE_ORDER == LITTLE_ENDIAN)
|
#if (BYTE_ORDER == LITTLE_ENDIAN)
|
||||||
|
#if defined(__arm__) && !defined(__arm64__)
|
||||||
|
memcpy(&k,data,sizeof(uint64_t));
|
||||||
|
#else
|
||||||
k = *((uint64_t*)data);
|
k = *((uint64_t*)data);
|
||||||
|
#endif
|
||||||
#else
|
#else
|
||||||
k = (uint64_t) data[0];
|
k = (uint64_t) data[0];
|
||||||
k |= (uint64_t) data[1] << 8;
|
k |= (uint64_t) data[1] << 8;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user