Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
xindoo
redis
提交
e084b5a3
R
redis
项目概览
xindoo
/
redis
通知
2
Star
2
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
redis
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
e084b5a3
编写于
2月 21, 2017
作者:
A
antirez
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'arm' into unstable
上级
cd90389b
7329cc39
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
25 addition
and
4 deletion
+25
-4
src/Makefile
src/Makefile
+7
-3
src/bitops.c
src/bitops.c
+5
-1
src/config.h
src/config.h
+9
-0
src/hyperloglog.c
src/hyperloglog.c
+4
-0
未找到文件。
src/Makefile
浏览文件 @
e084b5a3
...
...
@@ -14,6 +14,7 @@
release_hdr
:=
$(
shell
sh
-c
'./mkreleasehdr.sh'
)
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
DEPENDENCY_TARGETS
=
hiredis linenoise lua
NODEPS
:=
clean distclean
...
...
@@ -27,11 +28,14 @@ PREFIX?=/usr/local
INSTALL_BIN
=
$(PREFIX)
/bin
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)
MALLOC
=
jemalloc
e
lse
MALLOC
=
libc
e
ndif
endif
endif
# Backwards compatibility for selecting an allocator
...
...
src/bitops.c
浏览文件 @
e084b5a3
...
...
@@ -654,8 +654,11 @@ void bitopCommand(client *c) {
/* 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
* 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
;
#ifndef __arm__
if
(
minlen
>=
sizeof
(
unsigned
long
)
*
4
&&
numkeys
<=
16
)
{
unsigned
long
*
lp
[
16
];
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. */
for
(;
j
<
maxlen
;
j
++
)
{
...
...
src/config.h
浏览文件 @
e084b5a3
...
...
@@ -206,4 +206,13 @@ void setproctitle(const char *fmt, ...);
#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
src/hyperloglog.c
浏览文件 @
e084b5a3
...
...
@@ -401,7 +401,11 @@ uint64_t MurmurHash64A (const void * key, int len, unsigned int seed) {
uint64_t
k
;
#if (BYTE_ORDER == LITTLE_ENDIAN)
#if defined(__arm__) && !defined(__arm64__)
memcpy
(
&
k
,
data
,
sizeof
(
uint64_t
));
#else
k
=
*
((
uint64_t
*
)
data
);
#endif
#else
k
=
(
uint64_t
)
data
[
0
];
k
|=
(
uint64_t
)
data
[
1
]
<<
8
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录