diff --git a/src/crypto_kem/mlkem/mlkem768/amd64/avx2/kem.jinc b/src/crypto_kem/mlkem/mlkem768/amd64/avx2/kem.jinc index fabb0c62..1dd5472a 100644 --- a/src/crypto_kem/mlkem/mlkem768/amd64/avx2/kem.jinc +++ b/src/crypto_kem/mlkem/mlkem768/amd64/avx2/kem.jinc @@ -106,7 +106,8 @@ fn __crypto_kem_dec_jazz(reg u64 shkp, reg u64 ctp, reg u64 skp) buf[0:MLKEM_INDCPA_MSGBYTES] = __indcpa_dec_1(buf[0:MLKEM_INDCPA_MSGBYTES], ctp, skp); - hp = #LEA(skp + 32); + //hp = #LEA(skp + 32); + hp = skp; hp += 32; hp += 24 * MLKEM_K * MLKEM_N>>3; /* fixme: should loads be 256-bits long? */ diff --git a/src/crypto_kem/mlkem/mlkem768/amd64/ref/kem.jinc b/src/crypto_kem/mlkem/mlkem768/amd64/ref/kem.jinc index bf93777f..4dab50dc 100644 --- a/src/crypto_kem/mlkem/mlkem768/amd64/ref/kem.jinc +++ b/src/crypto_kem/mlkem/mlkem768/amd64/ref/kem.jinc @@ -107,7 +107,8 @@ fn __crypto_kem_dec_jazz(reg u64 shkp, reg u64 ctp, reg u64 skp) buf[0:MLKEM_MSGBYTES] = __indcpa_dec(buf[0:MLKEM_MSGBYTES], ctp, skp); - hp = #LEA(skp + 32); + //hp = #LEA(skp + 32); + hp = skp; hp += 32; hp += 24 * MLKEM_K * MLKEM_N>>3; for i=0 to MLKEM_SYMBYTES/8 diff --git a/src/crypto_kem/mlkem/mlkem768/amd64/ref/poly.jinc b/src/crypto_kem/mlkem/mlkem768/amd64/ref/poly.jinc index 2f0b7901..62ac2a65 100644 --- a/src/crypto_kem/mlkem/mlkem768/amd64/ref/poly.jinc +++ b/src/crypto_kem/mlkem/mlkem768/amd64/ref/poly.jinc @@ -505,10 +505,12 @@ fn _poly_invntt(reg ptr u16[MLKEM_N] rp) -> reg ptr u16[MLKEM_N] zetasctr += 1; j = start; - cmp = #LEA(start + len); + //cmp = #LEA(start + len); + cmp = start; cmp += len; while (j < cmp) { - offset = #LEA(j + len); + //offset = #LEA(j + len); + offset = j; offset += len; s = rp[(int)offset]; t = rp[(int)j]; m = s; m += t; @@ -519,7 +521,8 @@ fn _poly_invntt(reg ptr u16[MLKEM_N] rp) -> reg ptr u16[MLKEM_N] rp[(int)offset] = t; j += 1; } - start = #LEA(j + len); + //start = #LEA(j + len); + start = j; start += len; } len <<= 1; } @@ -563,10 +566,12 @@ fn _poly_ntt(reg ptr u16[MLKEM_N] rp) -> reg ptr u16[MLKEM_N] zetasctr += 1; zeta = zetasp[(int)zetasctr]; j = start; - cmp = #LEA(start + len); + // cmp = #LEA(start + len); + cmp = start; cmp += len; while (j < cmp) { - offset = #LEA(j + len); + //offset = #LEA(j + len); + offset = j; offset += len; t = rp[(int)offset]; t = __fqmul(t, zeta); s = rp[(int)j]; @@ -577,7 +582,8 @@ fn _poly_ntt(reg ptr u16[MLKEM_N] rp) -> reg ptr u16[MLKEM_N] rp[(int)j] = t; j += 1; } - start = #LEA(j + len); + //start = #LEA(j + len); + start = j; start += len; } len >>= 1; }