#define gf_mul(x,y) gf_mul_table[x][y]
/* Compute x % GF_SIZE without a slow divide. */
-static inline unsigned char modnn(int x)
+__a_const static inline unsigned char modnn(int x)
{
while (x >= GF_SIZE) {
x -= GF_SIZE;
static void addmul(unsigned char *dst1, const unsigned char *src1,
unsigned char c, int sz)
{
+ unsigned char *dst, *lim, *col;
+ const unsigned char *src = src1;
+
if (c == 0)
return;
- unsigned char *dst = dst1, *lim = &dst[sz - UNROLL + 1],
- *col = gf_mul_table[c];
- const unsigned char *src = src1;
+
+ dst = dst1;
+ lim = &dst[sz - UNROLL + 1];
+ col = gf_mul_table[c];
for (; dst < lim; dst += UNROLL, src += UNROLL) {
dst[0] ^= col[src[0]];