salsa20-xmm6int: don't hardcode the number of rounds

This commit is contained in:
Frank Denis
2017-02-26 19:04:34 +01:00
parent 78330822cb
commit 5ccf9c2f46
3 changed files with 3 additions and 3 deletions
@@ -13,7 +13,7 @@ if (bytes > 0) {
uint32_t in9;
a0 = diag1;
for (i = 0; i < 20; i += 4) {
for (i = 0; i < ROUNDS; i += 4) {
a0 = _mm_add_epi32(a0, diag0);
a1 = diag0;
b0 = a0;
@@ -11,7 +11,7 @@ while (bytes >= 64) {
int i;
a0 = diag1;
for (i = 0; i < 20; i += 4) {
for (i = 0; i < ROUNDS; i += 4) {
a0 = _mm_add_epi32(a0, diag0);
a1 = diag0;
b0 = a0;
@@ -96,7 +96,7 @@ if (bytes >= 256) {
z4 = orig4;
z8 = orig8;
for (i = 0; i < 20; i += 2) {
for (i = 0; i < ROUNDS; i += 2) {
/* the inner loop is a direct translation (regexp search/replace)
* from the amd64-xmm6 ASM */
__m128i r0, r1, r2, r3, r4, r5, r6, r7, r8, r9, r10, r11, r12, r13,