Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions snappy-internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -79,8 +79,8 @@ char* CompressFragment(const char* input,
// Does not read *(s1 + (s2_limit - s2)) or beyond.
// Requires that s2_limit >= s2.
//
// Separate implementation for x86_64, for speed. Uses the fact that
// x86_64 is little endian.
// Separate implementation for x86_64/AArch64, for speed. Uses the fact that
// x86_64/AArch64 is little endian.
#if defined(ARCH_K8)
static inline int FindMatchLength(const char* s1,
const char* s2,
Expand Down
9 changes: 5 additions & 4 deletions snappy-stubs-internal.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,12 +47,12 @@

#include "snappy-stubs-public.h"

#if defined(__x86_64__)
#if defined(__x86_64__) || defined(__aarch64__)

// Enable 64-bit optimized versions of some routines.
#define ARCH_K8 1

#endif
#endif //__x86_64__ || __aarch64__

// Needed by OS X, among others.
#ifndef MAP_ANONYMOUS
Expand Down Expand Up @@ -96,9 +96,10 @@ static const int64 kint64max = static_cast<int64>(0x7FFFFFFFFFFFFFFFLL);

// Potentially unaligned loads and stores.

// x86 and PowerPC can simply do these loads and stores native.
// x86, ARM64 and PowerPC can simply do these loads and stores native.

#if defined(__i386__) || defined(__x86_64__) || defined(__powerpc__)
#if defined(__i386__) || defined(__x86_64__) || defined(__powerpc__) \
|| defined(__aarch64__)

#define UNALIGNED_LOAD16(_p) (*reinterpret_cast<const uint16 *>(_p))
#define UNALIGNED_LOAD32(_p) (*reinterpret_cast<const uint32 *>(_p))
Expand Down