@@ -33,13 +33,30 @@
|
||||
|
||||
#include "snappy-stubs-internal.h"
|
||||
|
||||
#if SNAPPY_HAVE_SSSE3
|
||||
// Please do not replace with <x86intrin.h> or with headers that assume more
|
||||
// advanced SSE versions without checking with all the OWNERS.
|
||||
#include <emmintrin.h>
|
||||
#include <tmmintrin.h>
|
||||
#endif
|
||||
|
||||
#if SNAPPY_HAVE_NEON
|
||||
#include <arm_neon.h>
|
||||
#endif
|
||||
|
||||
#if SNAPPY_HAVE_SSSE3 || SNAPPY_HAVE_NEON
|
||||
#define SNAPPY_HAVE_VECTOR_BYTE_SHUFFLE 1
|
||||
#else
|
||||
#define SNAPPY_HAVE_VECTOR_BYTE_SHUFFLE 0
|
||||
#endif
|
||||
|
||||
namespace snappy {
|
||||
namespace internal {
|
||||
|
||||
#if SNAPPY_HAVE_VECTOR_BYTE_SHUFFLE
|
||||
#if SNAPPY_HAVE_SSSE3
|
||||
using V128 = __m128i;
|
||||
#else
|
||||
#elif SNAPPY_HAVE_NEON
|
||||
using V128 = uint8x16_t;
|
||||
#endif
|
||||
|
||||
@@ -72,7 +89,7 @@ inline V128 V128_Shuffle(V128 input, V128 shuffle_mask) {
|
||||
|
||||
inline V128 V128_DupChar(char c) { return _mm_set1_epi8(c); }
|
||||
|
||||
#else
|
||||
#elif SNAPPY_HAVE_NEON
|
||||
inline V128 V128_Load(const V128* src) {
|
||||
return vld1q_u8(reinterpret_cast<const uint8_t*>(src));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user