mpm: fix ac-ks compilation on cygwin

pull/1978/head
Victor Julien 10 years ago
parent 58e533858b
commit 262abbb49f

@ -46,12 +46,12 @@ uint32_t FUNC_NAME(SCACTileSearchCtx *ctx, MpmThreadCtx *mpm_thread_ctx,
int c = xlate[buf[0]];
/* If buflen at least 4 bytes and buf 4-byte aligned. */
if (buflen >= (4 + EXTRA) && ((uintptr_t)buf & 0x3) == 0) {
BTYPE data = *(BTYPE* restrict)(&buf[0]);
BUF_TYPE data = *(BUF_TYPE* restrict)(&buf[0]);
uint64_t index = 0;
/* Process 4*floor(buflen/4) bytes. */
i = 0;
while ((i + EXTRA) < (buflen & ~0x3)) {
BTYPE data1 = *(BTYPE* restrict)(&buf[i + 4]);
BUF_TYPE data1 = *(BUF_TYPE* restrict)(&buf[i + 4]);
index = SINDEX(index, state);
state = SLOAD(state_table + index + c);
c = xlate[BYTE1(data)];

@ -1476,7 +1476,7 @@ void SCACTileDestroyCtx(MpmCtx *mpm_ctx)
*/
#define SCHECK(x) ((x) > 0)
#define BTYPE int32_t
#define BUF_TYPE int32_t
// Extract byte N=0,1,2,3 from x
#ifdef __tile__
#define BYTE0(x) __insn_bfextu(x, 0, 7)

Loading…
Cancel
Save