Remove first check from scanDouble Noodle.

Change-Id: I00eabb3cb06ef6a2060df52c26fa8591907a2711
This commit is contained in:
George Wort 2021-06-30 14:13:27 +01:00 committed by Konstantinos Margaritis
parent 89b123d003
commit b48ea2c1a6

View File

@ -242,17 +242,12 @@ hwlm_error_t scanDouble(const struct noodTable *n, const u8 *buf, size_t len,
assert(d < e); assert(d < e);
assert(d >= buf); assert(d >= buf);
// Check first position in scalar so as to remove underflow possibilities. if (e - d < 2) {
size_t matchPos = d - buf;
DEBUG_PRINTF("Test match pos %zu\n", matchPos);
RETURN_IF_TERMINATED(final(n, buf, len, true, cbi, matchPos));
d += 2;
if (d >= e) {
return HWLM_SUCCESS; return HWLM_SUCCESS;
} }
++d;
svuint16_t chars = getCharMaskDouble(n, noCase); svuint16_t chars = getCharMaskDouble(n, noCase);
// peel off first part to align to the vector size // peel off first part to align to the vector size
const u8 *d1 = ROUNDUP_PTR(d, svcntb_pat(SV_POW2)); const u8 *d1 = ROUNDUP_PTR(d, svcntb_pat(SV_POW2));
if (d != d1) { if (d != d1) {