mirror of
https://github.com/VectorCamp/vectorscan.git
synced 2025-09-29 19:24:25 +03:00
Add SVE2 support for dvermicelli
Change-Id: I056ef15e162ab6fb1f78964321ce893f4096367e
This commit is contained in:
committed by
Konstantinos Margaritis
parent
a38324a5a3
commit
c7086cb7f1
@@ -126,24 +126,6 @@ hwlm_error_t scanSingle(const struct noodTable *n, const u8 *buf, size_t len,
|
||||
return scanSingleLoop(n, buf, len, cbi, chars, d1, e);
|
||||
}
|
||||
|
||||
static really_inline
|
||||
svuint16_t getCharMaskDouble(const struct noodTable *n, bool noCase) {
|
||||
if (noCase) {
|
||||
const uint64_t lowerFirst = n->key0 & 0xdf;
|
||||
const uint64_t upperFirst = n->key0 | 0x20;
|
||||
const uint64_t lowerSecond = n->key1 & 0xdf;
|
||||
const uint64_t upperSecond = n->key1 | 0x20;
|
||||
const uint64_t chars = lowerFirst | (lowerSecond << 8)
|
||||
| (lowerFirst << 16) | (upperSecond) << 24
|
||||
| (upperFirst << 32) | (lowerSecond) << 40
|
||||
| (upperFirst << 48) | (upperSecond) << 56;
|
||||
return svreinterpret_u16(svdup_u64(chars));
|
||||
} else {
|
||||
uint16_t chars_u16 = n->key0 | (n->key1 << 8);
|
||||
return svdup_u16(chars_u16);
|
||||
}
|
||||
}
|
||||
|
||||
static really_inline
|
||||
hwlm_error_t doubleCheckMatched(const struct noodTable *n, const u8 *buf,
|
||||
size_t len, const struct cb_info *cbi,
|
||||
@@ -238,7 +220,7 @@ hwlm_error_t scanDouble(const struct noodTable *n, const u8 *buf, size_t len,
|
||||
}
|
||||
++d;
|
||||
|
||||
svuint16_t chars = getCharMaskDouble(n, noCase);
|
||||
svuint16_t chars = getCharMaskDouble(n->key0, n->key1, noCase);
|
||||
|
||||
if (scan_len <= svcntb()) {
|
||||
return scanDoubleOnce(n, buf, len, cbi, chars, d, e);
|
||||
|
Reference in New Issue
Block a user