From 13070098a3b8bfe64b14eb8d0a005152ade10833 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niels=20M=C3=B6ller?= <nisse@lysator.liu.se> Date: Wed, 20 Oct 2004 18:28:18 +0200 Subject: [PATCH] * x86/arcfour-crypt.asm: Reduced inner loop by one instruction, by precomputing the offset between src and dst. Rev: src/nettle/x86/arcfour-crypt.asm:1.9 --- x86/arcfour-crypt.asm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/x86/arcfour-crypt.asm b/x86/arcfour-crypt.asm index 7056c50b..43e4f7d3 100644 --- a/x86/arcfour-crypt.asm +++ b/x86/arcfour-crypt.asm @@ -59,6 +59,7 @@ C Register usage: movzbl 256(%ebp), %eax C i movzbl 257(%ebp), %ebx C j + subl %esi, %edi .Lloop: C incb %al incl %eax @@ -75,9 +76,8 @@ C addb %cl, %bl C for indexing. movb (%ebp, %ecx), %cl xorb (%esi), %cl + movb %cl, (%esi,%edi) incl %esi - movb %cl, (%edi) - incl %edi cmpl %esi, %edx jne .Lloop -- GitLab