]> git.ipfire.org Git - thirdparty/suricata.git/commitdiff
Fix unaligned load in AC-TILE MPM.
authorKen Steele <ken@tilera.com>
Tue, 15 Apr 2014 14:18:30 +0000 (10:18 -0400)
committerVictor Julien <victor@inliniac.net>
Thu, 17 Apr 2014 13:04:37 +0000 (15:04 +0200)
The SLOAD define using __insn_ld2s_L2 is used to provide a compiler
hint that the load will come from the L2 cache instead of the L1. It
also specifies that it is a 2 byte signed load. For the Tiny MPM, that
needs to be a 1-byte load, which is what is specified in util-ac-mpm-tile.c,
but the #undef was removing that definition.

src/util-mpm-ac-tile-small.c

index ee5aa6da8fc59f578d6093a39e117722b57965ee..cb468e5a2b19f617086a8560017fcd61205f60b0 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 2013 Open Information Security Foundation
+/* Copyright (C) 2013-2014 Open Information Security Foundation
  *
  * You can copy, redistribute or modify this Program under the terms of
  * the GNU General Public License version 2 as published by the Free
  *
  */
 #ifdef FUNC_NAME
-// Hint to compiler to expect L2 hit latency for Load int16_t
-#undef SLOAD
-#define SLOAD(x) __insn_ld2s_L2((STYPE* restrict)(x))
-
 
 /* This function handles (ctx->state_count < 32767) */
 uint32_t FUNC_NAME(SCACTileSearchCtx *ctx, MpmThreadCtx *mpm_thread_ctx,