diff options
author | nbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2012-09-24 15:23:57 +0000 |
---|---|---|
committer | nbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2012-09-24 15:23:57 +0000 |
commit | 5c3390ff78ca01fcbadf1804c3fd6264d966dfd9 (patch) | |
tree | 474c4a4a8a0866e5b9fc0214614b3d3e0fe76459 /package/openssl/patches/210-fix_aes_mips.patch | |
parent | be48e375d2979338c466460018c710f8b3003054 (diff) |
openssl: use asm SHA1, SHA256, AES on MIPS.
On a lightly loaded 24Kc, as measured by 'openssl speed sha1', shows between
27% and 120% speedup depending on block size.
SHA1 is notably used in Transmission for piece verification.
Patch by Catalin Patulea
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@33531 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/openssl/patches/210-fix_aes_mips.patch')
-rw-r--r-- | package/openssl/patches/210-fix_aes_mips.patch | 64 |
1 files changed, 64 insertions, 0 deletions
diff --git a/package/openssl/patches/210-fix_aes_mips.patch b/package/openssl/patches/210-fix_aes_mips.patch new file mode 100644 index 0000000000..bbfc63a41e --- /dev/null +++ b/package/openssl/patches/210-fix_aes_mips.patch @@ -0,0 +1,64 @@ +--- a/crypto/aes/asm/aes-mips.pl ++++ b/crypto/aes/asm/aes-mips.pl +@@ -1036,9 +1036,9 @@ _mips_AES_set_encrypt_key: + nop + .end _mips_AES_set_encrypt_key + +-.globl AES_set_encrypt_key +-.ent AES_set_encrypt_key +-AES_set_encrypt_key: ++.globl private_AES_set_encrypt_key ++.ent private_AES_set_encrypt_key ++private_AES_set_encrypt_key: + .frame $sp,$FRAMESIZE,$ra + .mask $SAVED_REGS_MASK,-$SZREG + .set noreorder +@@ -1060,7 +1060,7 @@ $code.=<<___ if ($flavour =~ /nubi/i); # + ___ + $code.=<<___ if ($flavour !~ /o32/i); # non-o32 PIC-ification + .cplocal $Tbl +- .cpsetup $pf,$zero,AES_set_encrypt_key ++ .cpsetup $pf,$zero,private_AES_set_encrypt_key + ___ + $code.=<<___; + .set reorder +@@ -1083,7 +1083,7 @@ ___ + $code.=<<___; + jr $ra + $PTR_ADD $sp,$FRAMESIZE +-.end AES_set_encrypt_key ++.end private_AES_set_encrypt_key + ___ + + my ($head,$tail)=($inp,$bits); +@@ -1091,9 +1091,9 @@ my ($tp1,$tp2,$tp4,$tp8,$tp9,$tpb,$tpd,$ + my ($m,$x80808080,$x7f7f7f7f,$x1b1b1b1b)=($at,$t0,$t1,$t2); + $code.=<<___; + .align 5 +-.globl AES_set_decrypt_key +-.ent AES_set_decrypt_key +-AES_set_decrypt_key: ++.globl private_AES_set_decrypt_key ++.ent private_AES_set_decrypt_key ++private_AES_set_decrypt_key: + .frame $sp,$FRAMESIZE,$ra + .mask $SAVED_REGS_MASK,-$SZREG + .set noreorder +@@ -1115,7 +1115,7 @@ $code.=<<___ if ($flavour =~ /nubi/i); # + ___ + $code.=<<___ if ($flavour !~ /o32/i); # non-o32 PIC-ification + .cplocal $Tbl +- .cpsetup $pf,$zero,AES_set_decrypt_key ++ .cpsetup $pf,$zero,private_AES_set_decrypt_key + ___ + $code.=<<___; + .set reorder +@@ -1226,7 +1226,7 @@ ___ + $code.=<<___; + jr $ra + $PTR_ADD $sp,$FRAMESIZE +-.end AES_set_decrypt_key ++.end private_AES_set_decrypt_key + ___ + }}} + |