]> git.ipfire.org Git - thirdparty/nettle.git/commitdiff
* x86/arcfour-crypt.asm: Reduced inner loop by one instruction, by
authorNiels Möller <nisse@lysator.liu.se>
Wed, 20 Oct 2004 16:28:18 +0000 (18:28 +0200)
committerNiels Möller <nisse@lysator.liu.se>
Wed, 20 Oct 2004 16:28:18 +0000 (18:28 +0200)
precomputing the offset between src and dst.

Rev: src/nettle/x86/arcfour-crypt.asm:1.9

x86/arcfour-crypt.asm

index 7056c50b588c5aa1c669e668e349dc24c18e3617..43e4f7d304efc0e09a891ac19aeb111a9e4685c0 100644 (file)
@@ -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