diff options
author | Andy Polyakov <appro@openssl.org> | 2005-04-06 09:45:42 +0000 |
---|---|---|
committer | Andy Polyakov <appro@openssl.org> | 2005-04-06 09:45:42 +0000 |
commit | 81ee80ab88941658d7d427c76e1a6c94debfb4a3 (patch) | |
tree | 3f99212b4e9f845b8838098f816ccb73ebf04e67 | |
parent | 7d727231b735750c0876089204fe46c058e3f675 (diff) |
+45% RC4 performance boost on Intel EM64T core. Unrolled loop providing
further +35% will follow...
Submitted by: Zou Nanhai
-rwxr-xr-x | crypto/rc4/asm/rc4-amd64.pl | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/crypto/rc4/asm/rc4-amd64.pl b/crypto/rc4/asm/rc4-amd64.pl index 9e0da8af99..2d3dedde03 100755 --- a/crypto/rc4/asm/rc4-amd64.pl +++ b/crypto/rc4/asm/rc4-amd64.pl @@ -181,7 +181,7 @@ $code.=<<___; .align 16 .LRC4_CHAR: - inc $XX#b + add \$1,$XX#b movzb `&PTR("BYTE:[$dat+$XX]")`,$TX#d add $TX#b,$YY#b movzb `&PTR("BYTE:[$dat+$YY]")`,$TY#d @@ -191,9 +191,9 @@ $code.=<<___; movzb `&PTR("BYTE:[$dat+$TY]")`,$TY#d xorb `&PTR("BYTE:[$inp]")`,$TY#b movb $TY#b,`&PTR("BYTE:[$out]")` - inc $inp - inc $out - dec $len + lea 1($inp),$inp + lea 1($out),$out + sub \$1,$len jnz .LRC4_CHAR jmp .Lexit ___ |