mirror of
https://github.com/fluencelabs/redis
synced 2025-03-19 00:50:50 +00:00
ARM: Avoid memcpy() in MurmurHash64A() if we are using 64 bit ARM.
However note that in architectures supporting 64 bit unaligned accesses memcpy(...,...,8) is likely translated to a simple word memory movement anyway.
This commit is contained in:
parent
1e272a6b52
commit
72d6d64771
@ -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
|
||||||
|
@ -211,5 +211,8 @@ void setproctitle(const char *fmt, ...);
|
|||||||
#if defined(__arm) && !defined(__arm__)
|
#if defined(__arm) && !defined(__arm__)
|
||||||
#define __arm__
|
#define __arm__
|
||||||
#endif
|
#endif
|
||||||
|
#if defined (__aarch64__) && !defined(__arm64__)
|
||||||
|
#define __arm64__
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -401,7 +401,7 @@ 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)
|
||||||
#ifdef __arm__
|
#if defined(__arm__) && !defined(__arm64__)
|
||||||
memcpy(&k,data,sizeof(uint64_t));
|
memcpy(&k,data,sizeof(uint64_t));
|
||||||
#else
|
#else
|
||||||
k = *((uint64_t*)data);
|
k = *((uint64_t*)data);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user