This commit is contained in:
Geoff Langdale 2019-04-01 02:08:15 -04:00
commit 0250352139
2 changed files with 2 additions and 1 deletions

View File

@ -98,7 +98,6 @@ really_inline bool parse_string(UNUSED const uint8_t *buf, UNUSED size_t len,
auto quote_mask = _mm256_cmpeq_epi8(v, _mm256_set1_epi8('"'));
auto quote_bits =
static_cast<uint32_t>(_mm256_movemask_epi8(quote_mask));
const size_t LOOP_SIZE = 32;
#else
uint8x16_t v0 = vld1q_u8(src);
uint8x16_t v1 = vld1q_u8(src+16);

View File

@ -84,6 +84,7 @@ really_inline void check_utf8(simd_input in,
}
#endif
#ifdef __ARM_NEON
uint16_t neonmovemask(uint8x16_t input) {
const uint8x16_t bitmask = { 0x01, 0x02, 0x4, 0x8, 0x10, 0x20, 0x40, 0x80,
0x01, 0x02, 0x4, 0x8, 0x10, 0x20, 0x40, 0x80};
@ -133,6 +134,7 @@ uint64_t neonmovemask_bulk(uint8x16_t p0, uint8x16_t p1, uint8x16_t p2, uint8x16
return vgetq_lane_u64(vreinterpretq_u64_u8(sum), 0);
#endif
}
#endif
// a straightforward comparison of a mask against input. 5 uops; would be
// cheaper in AVX512.