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-2016, 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:
@@ -101,6 +102,52 @@ char nfaExecLbrNVerm_expandState(const struct NFA *nfa, void *dest,
#define nfaExecLbrNVerm_B_Reverse NFA_API_NO_IMPL
#define nfaExecLbrNVerm_zombie_status NFA_API_ZOMBIE_NO_IMPL
#ifdef HAVE_SVE2
// LBR Verm16
char nfaExecLbrVerm16_Q(const struct NFA *n, struct mq *q, s64a end);
char nfaExecLbrVerm16_Q2(const struct NFA *n, struct mq *q, s64a end);
char nfaExecLbrVerm16_QR(const struct NFA *n, struct mq *q, ReportID report);
char nfaExecLbrVerm16_reportCurrent(const struct NFA *n, struct mq *q);
char nfaExecLbrVerm16_inAccept(const struct NFA *n, ReportID report,
struct mq *q);
char nfaExecLbrVerm16_inAnyAccept(const struct NFA *n, struct mq *q);
char nfaExecLbrVerm16_queueInitState(const struct NFA *n, struct mq *q);
char nfaExecLbrVerm16_initCompressedState(const struct NFA *n, u64a offset,
void *state, u8 key);
char nfaExecLbrVerm16_queueCompressState(const struct NFA *nfa,
const struct mq *q, s64a loc);
char nfaExecLbrVerm16_expandState(const struct NFA *nfa, void *dest,
const void *src, u64a offset, u8 key);
#define nfaExecLbrVerm16_testEOD NFA_API_NO_IMPL
#define nfaExecLbrVerm16_B_Reverse NFA_API_NO_IMPL
#define nfaExecLbrVerm16_zombie_status NFA_API_ZOMBIE_NO_IMPL
// LBR Negated Verm16
char nfaExecLbrNVerm16_Q(const struct NFA *n, struct mq *q, s64a end);
char nfaExecLbrNVerm16_Q2(const struct NFA *n, struct mq *q, s64a end);
char nfaExecLbrNVerm16_QR(const struct NFA *n, struct mq *q, ReportID report);
char nfaExecLbrNVerm16_reportCurrent(const struct NFA *n, struct mq *q);
char nfaExecLbrNVerm16_inAccept(const struct NFA *n, ReportID report,
struct mq *q);
char nfaExecLbrNVerm16_inAnyAccept(const struct NFA *n, struct mq *q);
char nfaExecLbrNVerm16_queueInitState(const struct NFA *n, struct mq *q);
char nfaExecLbrNVerm16_initCompressedState(const struct NFA *n, u64a offset,
void *state, u8 key);
char nfaExecLbrNVerm16_queueCompressState(const struct NFA *nfa,
const struct mq *q, s64a loc);
char nfaExecLbrNVerm16_expandState(const struct NFA *nfa, void *dest,
const void *src, u64a offset, u8 key);
#define nfaExecLbrNVerm16_testEOD NFA_API_NO_IMPL
#define nfaExecLbrNVerm16_B_Reverse NFA_API_NO_IMPL
#define nfaExecLbrNVerm16_zombie_status NFA_API_ZOMBIE_NO_IMPL
#endif // HAVE_SVE2
// LBR Shuf
char nfaExecLbrShuf_Q(const struct NFA *n, struct mq *q, s64a end);