Implement new Vermicelli16 acceleration functions using SVE2.

The scheme utilises the MATCH and NMATCH instructions to
scan for 16 characters at the same rate as vermicelli
scans for one.

Change-Id: Ie2cef904c56651e6108593c668e9b65bc001a886
This commit is contained in:
George Wort
2021-06-28 16:29:43 +01:00
committed by Konstantinos Margaritis
parent b6a7ee7e84
commit b54710d208
25 changed files with 1153 additions and 8 deletions

View File

@@ -1,5 +1,6 @@
/*
* Copyright (c) 2015-2020, Intel Corporation
* Copyright (c) 2021, Arm Limited
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met:
@@ -65,6 +66,10 @@ enum NFAEngineType {
LBR_NFA_DOT, /**< magic pseudo nfa */
LBR_NFA_VERM, /**< magic pseudo nfa */
LBR_NFA_NVERM, /**< magic pseudo nfa */
#ifdef HAVE_SVE2
LBR_NFA_VERM16, /**< magic pseudo nfa */
LBR_NFA_NVERM16, /**< magic pseudo nfa */
#endif // HAVE_SVE2
LBR_NFA_SHUF, /**< magic pseudo nfa */
LBR_NFA_TRUF, /**< magic pseudo nfa */
CASTLE_NFA, /**< magic pseudo nfa */
@@ -218,6 +223,9 @@ static really_inline int isNfaType(u8 t) {
static really_inline
int isLbrType(u8 t) {
return t == LBR_NFA_DOT || t == LBR_NFA_VERM || t == LBR_NFA_NVERM ||
#ifdef HAVE_SVE2
t == LBR_NFA_VERM16 || t == LBR_NFA_NVERM16 ||
#endif // HAVE_SVE2
t == LBR_NFA_SHUF || t == LBR_NFA_TRUF;
}