Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
ruanhaishen
redis
Commits
b3391fd8
"components/lua/llex.c" did not exist on "e49f2bb13f72d50674aa3ca72d10eff5432c5ca4"
Commit
b3391fd8
authored
Feb 23, 2017
by
Salvatore Sanfilippo
Browse files
Use ARM unaligned accesses ifdefs for SPARC as well.
parent
d7826823
Changes
3
Hide whitespace changes
Inline
Side-by-side
src/bitops.c
View file @
b3391fd8
...
...
@@ -665,7 +665,7 @@ void bitopCommand(client *c) {
* result in GCC compiling the code using multiple-words load/store
* operations that are not supported even in ARM >= v6. */
j
=
0
;
#ifndef
__arm__
#ifndef
USE_ALIGNED_ACCESS
if
(
minlen
>=
sizeof
(
unsigned
long
)
*
4
&&
numkeys
<=
16
)
{
unsigned
long
*
lp
[
16
];
unsigned
long
*
lres
=
(
unsigned
long
*
)
res
;
...
...
src/config.h
View file @
b3391fd8
...
...
@@ -215,4 +215,13 @@ void setproctitle(const char *fmt, ...);
#define __arm64__
#endif
/* Make sure we can test for SPARC just checking for __sparc__. */
#if defined(__sparc) && !defined(__sparc__)
#define __sparc__
#endif
#if defined(__sparc__) || defined(__arm__)
#define USE_ALIGNED_ACCESS
#endif
#endif
src/hyperloglog.c
View file @
b3391fd8
...
...
@@ -401,7 +401,7 @@ uint64_t MurmurHash64A (const void * key, int len, unsigned int seed) {
uint64_t
k
;
#if (BYTE_ORDER == LITTLE_ENDIAN)
#if
def
ined(__arm__) && !defined(__arm64__)
#ifdef
USE_ALIGNED_ACCESS
memcpy
(
&
k
,
data
,
sizeof
(
uint64_t
));
#else
k
=
*
((
uint64_t
*
)
data
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment