From 354a24e2ef4b3eeed4a72bc4a628a42ad1103add Mon Sep 17 00:00:00 2001 From: Ken Steele Date: Tue, 15 Apr 2014 10:18:30 -0400 Subject: [PATCH] Fix unaligned load in AC-TILE MPM. 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 | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/util-mpm-ac-tile-small.c b/src/util-mpm-ac-tile-small.c index ee5aa6da8f..cb468e5a2b 100644 --- a/src/util-mpm-ac-tile-small.c +++ b/src/util-mpm-ac-tile-small.c @@ -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 @@ -29,10 +29,6 @@ * */ #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,