From: Niels Möller Date: Wed, 20 Oct 2004 16:28:18 +0000 (+0200) Subject: * x86/arcfour-crypt.asm: Reduced inner loop by one instruction, by X-Git-Tag: nettle_1.11_release_20041026~17 X-Git-Url: http://git.ipfire.org/gitweb/gitweb.cgi?a=commitdiff_plain;h=13070098a3b8bfe64b14eb8d0a005152ade10833;p=thirdparty%2Fnettle.git * 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 --- 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