Move hwlm literal len define

This commit is contained in:
Matthew Barr 2017-06-26 10:15:49 +10:00
parent 293f9fcc49
commit 9c538a7522
3 changed files with 6 additions and 5 deletions

View File

@ -1,5 +1,5 @@
/* /*
* Copyright (c) 2015-2016, Intel Corporation * Copyright (c) 2015-2017, Intel Corporation
* *
* Redistribution and use in source and binary forms, with or without * Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions are met: * modification, are permitted provided that the following conditions are met:
@ -71,6 +71,9 @@ typedef hwlm_group_t hwlmcb_rv_t;
* designed for a different architecture). */ * designed for a different architecture). */
#define HWLM_ERROR_UNKNOWN 2 #define HWLM_ERROR_UNKNOWN 2
/** \brief Max length of the literal passed to HWLM. */
#define HWLM_LITERAL_MAX_LEN 8
struct hs_scratch; struct hs_scratch;
struct HWLM; struct HWLM;

View File

@ -42,9 +42,6 @@
namespace ue2 { namespace ue2 {
/** \brief Max length of the literal passed to HWLM. */
#define HWLM_LITERAL_MAX_LEN 8
/** \brief Max length of the hwlmLiteral::msk and hwlmLiteral::cmp vectors. */ /** \brief Max length of the hwlmLiteral::msk and hwlmLiteral::cmp vectors. */
#define HWLM_MASKLEN 8 #define HWLM_MASKLEN 8

View File

@ -380,7 +380,8 @@ hwlm_error_t noodExecStreaming(const struct noodTable *n, const u8 *hbuf,
if (hlen) { if (hlen) {
assert(hbuf); assert(hbuf);
u8 ALIGN_DIRECTIVE temp_buf[16]; // HWLM_LITERAL_MAX_LEN * 2 u8 ALIGN_DIRECTIVE temp_buf[HWLM_LITERAL_MAX_LEN * 2];
memset(temp_buf, 0, sizeof(temp_buf));
size_t tl1 = MIN(n->len - 1, hlen); size_t tl1 = MIN(n->len - 1, hlen);
size_t tl2 = MIN(n->len - 1, len); size_t tl2 = MIN(n->len - 1, len);