]> git.ipfire.org Git - thirdparty/vectorscan.git/commitdiff
LimEx NFA: unify flush br/estate behaviour
authorJustin Viiret <justin.viiret@intel.com>
Mon, 2 Nov 2015 01:00:09 +0000 (12:00 +1100)
committerMatthew Barr <matthew.barr@intel.com>
Tue, 10 Nov 2015 03:36:14 +0000 (14:36 +1100)
Make the GPR NFA models only clear cached_estate conditionally based on
cached_br, as per the SIMD models.

src/nfa/limex_native.c

index 49c101999a49fd4680571d7319ab52f41c0d9d86..471e4bf0a48c4c9f31542ef91f517295a0482348 100644 (file)
@@ -120,7 +120,9 @@ int processExceptional32(u32 s, u32 estate, UNUSED u32 diffmask, u32 *succ,
         ctx->cached_reports = new_cache.reports;
         ctx->cached_br = new_cache.br;
     } else if (cacheable == DO_NOT_CACHE_RESULT_AND_FLUSH_BR_ENTRIES) {
-        ctx->cached_estate = 0U;
+        if (ctx->cached_br) {
+            ctx->cached_estate = 0U;
+        }
     }
 
     return 0;