1703 Commits

Author SHA1 Message Date
Justin Viiret
f7cc8a618d fdr: reduce confirm size to a u8
Also removes the flexible array member from the LitInfo structure.
2016-10-28 14:52:52 +11:00
Justin Viiret
98c791dc6e noodle: correct history req calculation 2016-10-28 14:52:48 +11:00
Justin Viiret
8869dee643 rose: simplify long lit table, add bloom filter
Replaces the original long lit hash table (used in streaming mode) with a
smaller, simpler linear probing approach. Adds a bloom filter in front
of it to reduce time spent on false positives.

Sizing of both the hash table and bloom filter are done based on max
load.
2016-10-28 14:52:45 +11:00
Justin Viiret
68bf473e2e fdr: move long literal handling into Rose
Move the hash table used for long literal support in streaming mode from
FDR to Rose, and introduce new instructions CHECK_LONG_LIT and
CHECK_LONG_LIT_NOCASE for doing literal confirm for long literals.

This simplifies FDR confirm, and guarantees that HWLM matchers will only
be used for literals < 256 bytes long.
2016-10-28 14:52:26 +11:00
Matthew Barr
6ed30194ce Disable asserts everywhere when we say so 2016-10-28 14:52:15 +11:00
Alex Coyte
648a3c4824 UE-3025: There is no need to prune tops from non-triggered graphs 2016-10-28 14:52:01 +11:00
Matthew Barr
7d3eff8648 extern "C" for mask1bit table 2016-10-28 14:51:49 +11:00
Alex Coyte
c94899dd44 allow sets of tops on edges 2016-10-28 14:51:46 +11:00
Alex Coyte
aca89e66d2 hinted insert operations for flat_set 2016-10-28 14:48:55 +11:00
Matthew Barr
707fe675ea Operator precedence matters 2016-10-28 14:48:46 +11:00
Matthew Barr
7849b9d611 MSVC prefers the attrib at the beginning 2016-10-28 14:48:31 +11:00
Matthew Barr
2e5a2ab2a9 cmake: don't be so heavyhanded with flags 2016-10-28 14:47:11 +11:00
Justin Viiret
6e533589bb rose: move END instruction to start of enum
Stop overloading END as the last Rose interpreter instruction, use new
sentinel LAST_ROSE_INSTRUCTION for that.

This change will also make it easier to add new instructions without
renumbering END and thus changing all generated bytecodes.
2016-10-28 14:47:07 +11:00
Xu, Chi
997787bd4b rose: add CHECK_SINGLE_LOOKAROUND instruction
This specialisation is cheaper than the shufti-based variants, so we
prefer it for single character class tests.
2016-10-28 14:47:04 +11:00
Justin Viiret
385f71b44e rose: enable generation of shufti32x16 case 2016-10-28 14:46:37 +11:00
Alex Coyte
efa3299774 remove code preventing firing callbacks in the history buffer 2016-10-28 14:46:34 +11:00
Matthew Barr
c3b5efefb6 Add short avx2 shufti form 2016-10-28 14:46:31 +11:00
Xu, Chi
04d79629de rose: add shufti-based lookaround instructions
More lookaround specialisations that use the shufti approach.
2016-10-28 14:46:27 +11:00
Justin Viiret
5e3fa7a266 limex: make NFAAccept::squash rel to LimEx base 2016-10-28 14:46:23 +11:00
Justin Viiret
77fe1ef6e5 limex: rework accept handling
Rather that iterating over NFAAccept structures and testing individual
bits in the state structure, iterate over the state vector and index
into accept structures.

Adds report list support to this path, unified with the report lists
used for exception handling.
2016-10-28 14:46:19 +11:00
Justin Viiret
3dcfea19e0 limex: fold TESTEOD_REV_FN use into TESTEOD_FN 2016-10-28 14:45:57 +11:00
Justin Viiret
9c99a923a1 limex: remove constant do_br arg from TESTEOD_FN 2016-10-28 14:45:54 +11:00
Justin Viiret
9139123642 rose: move sparse iter cache to RoseEngineBlob
This enables its use for iterators written by instructions.
2016-10-28 14:45:32 +11:00
Justin Viiret
13b6023a18 hash: add hash_all variadic tpl func, use in rose 2016-10-28 14:45:28 +11:00
Justin Viiret
13af3bfb74 rose: decouple build-time program representation
This commit replaces the build-time representation of the Rose
interpreter programs, from a class containing a discriminated union of
the bytecode structures to a class hierarchy of build-time prototypes.

This makes it easier to reason about and manipulate Rose programs during
compilation.
2016-10-28 14:45:15 +11:00
Justin Viiret
3bfef988fe container.h: include <vector> 2016-10-28 14:45:11 +11:00
Alex Coyte
97483eee5b UE-3019: limex_compile: correctly access the dominator map 2016-10-28 14:45:02 +11:00
Justin Viiret
f4fa6cd4dd rose: tighten up requirements for catch up
We only need to catch up when there is an actual anchored table, not
merely when there are successors of anchored_root in the Rose graph.
2016-10-28 14:44:20 +11:00
Alex Coyte
e74b141e95 rework load_m128_from_u64a() 2016-10-28 14:44:16 +11:00
Alex Coyte
bcf40c5136 Limex: don't not build accel schemes for impossible state sets 2016-10-28 14:44:12 +11:00
Alex Coyte
a08e1dd690 Introduce a 64-bit LimEx model.
On 64-bit platforms, the Limex 64 model is implemented in normal GPRs.
On 32-bit platforms, however, 128-bit SSE registers are used for the
runtime implementation.
2016-10-28 14:44:12 +11:00
Justin Viiret
3cf4199879 debug: always use %zu in format string for size_t 2016-10-28 14:43:34 +11:00
Justin Viiret
0cc941dfd5 limex_dump: silence gcc large alignment warning
Passing mask by const ref silences the warning: "The ABI for passing
parameters with 32-byte alignment has changed in GCC 4.6".
2016-10-28 14:43:34 +11:00
Justin Viiret
c8868fb9c7 rose: remove CHECK_LIT_MASK instruction 2016-10-28 14:43:33 +11:00
Justin Viiret
4ce306864e rose: use lookarounds to implement benefits masks
This replaces the CHECK_LIT_MASK instruction.
2016-10-28 14:43:33 +11:00
Xu, Chi
b96d5c23d1 rose: add new instruction CHECK_MASK_32
This is a specialisation of the "lookaround" code.
2016-10-28 14:43:33 +11:00
Justin Viiret
8be6c8b2ca rose: don't merge large acyclic suffixes
Check earlier on in mergeSuffixes that we're not proposing to merge
suffixes above our limit from the acyclic merge path.
2016-10-28 14:43:33 +11:00
jason taylor
b859e5cb8a Updated nfa source file permissions
Resolves issue github issue #37
2016-09-04 19:25:59 -04:00
Matthew Barr
d2e5089dc3 Update changelog for 4.3.1 v4.3.1 2016-08-29 13:51:17 +10:00
Matthew Barr
adef6d1a51 Merge branch develop into master 2016-08-29 11:30:51 +10:00
Matthew Barr
d21fcbfa92 Bump version number for release 2016-08-29 11:30:24 +10:00
Matthew Barr
f05e833e10 Only initialise stream state history when required.
This fixes 01org/hyperscan#30.
2016-08-29 11:30:15 +10:00
Matthew Barr
c1bc6acdea unit test for github issue #30 2016-08-29 11:30:15 +10:00
Matthew Barr
bf99ad00eb Merge branch develop into master v4.3.0 2016-08-24 14:29:28 +10:00
Matthew Barr
8cf0c41552 Bump version number for release 2016-08-24 14:27:59 +10:00
Justin Viiret
896618fda1 changelog: updates for 4.3 release 2016-08-24 14:25:48 +10:00
Matthew Barr
34d6a0d683 Change SONAME to only use the major version number
Hyperscan will only break ABI on major version changes, and the SONAME
used for shared library versions should reflect this.
2016-08-22 16:04:48 +10:00
Matthew Barr
0a1491d907 Remove problematic debug output 2016-08-22 16:04:44 +10:00
Justin Viiret
87e32c9037 tamarama: check for match halt in _Q2 as well 2016-08-22 16:04:27 +10:00
Alex Coyte
e6c05d5a55 set an appropriate default value for RoleInfo::score
Coverity CID 131843
2016-08-22 16:03:51 +10:00