diff options
author | Andy Polyakov <appro@openssl.org> | 2016-04-15 16:39:22 +0200 |
---|---|---|
committer | Andy Polyakov <appro@openssl.org> | 2016-04-25 11:54:38 +0200 |
commit | 0b48a24ce993d1a4409d7bde26295f6df0d173cb (patch) | |
tree | 95b845ef2fb7db4dfae6e4ff964ed94940953501 /crypto/sha | |
parent | 2442382e11c022aaab4fdc6975bd15d5a75c4db2 (diff) |
s390x assembly pack: cache capability query results.
IBM argues that in certain scenarios capability query is really
expensive. At the same time it's asserted that query results can
be safely cached, because disabling CPACF is incompatible with
reboot-free operation.
Reviewed-by: Tim Hudson <tjh@openssl.org>
(cherry picked from commit 670ad0fbf6ebcf113e278d8174081a7e2d2fa44c)
Diffstat (limited to 'crypto/sha')
-rw-r--r-- | crypto/sha/asm/sha1-s390x.pl | 7 | ||||
-rw-r--r-- | crypto/sha/asm/sha512-s390x.pl | 7 |
2 files changed, 4 insertions, 10 deletions
diff --git a/crypto/sha/asm/sha1-s390x.pl b/crypto/sha/asm/sha1-s390x.pl index 9193dda45e..d5cf1640a1 100644 --- a/crypto/sha/asm/sha1-s390x.pl +++ b/crypto/sha/asm/sha1-s390x.pl @@ -167,10 +167,7 @@ $code.=<<___ if ($kimdfunc); lg %r0,0(%r1) tmhl %r0,0x4000 # check for message-security assist jz .Lsoftware - lghi %r0,0 - la %r1,`2*$SIZE_T`($sp) - .long 0xb93e0002 # kimd %r0,%r2 - lg %r0,`2*$SIZE_T`($sp) + lg %r0,16(%r1) # check kimd capabilities tmhh %r0,`0x8000>>$kimdfunc` jz .Lsoftware lghi %r0,$kimdfunc @@ -237,7 +234,7 @@ $code.=<<___; br %r14 .size sha1_block_data_order,.-sha1_block_data_order .string "SHA1 block transform for s390x, CRYPTOGAMS by <appro\@openssl.org>" -.comm OPENSSL_s390xcap_P,16,8 +.comm OPENSSL_s390xcap_P,80,8 ___ $code =~ s/\`([^\`]*)\`/eval $1/gem; diff --git a/crypto/sha/asm/sha512-s390x.pl b/crypto/sha/asm/sha512-s390x.pl index 079a3fc78a..9c10e4e9ee 100644 --- a/crypto/sha/asm/sha512-s390x.pl +++ b/crypto/sha/asm/sha512-s390x.pl @@ -240,10 +240,7 @@ $code.=<<___ if ($kimdfunc); lg %r0,0(%r1) tmhl %r0,0x4000 # check for message-security assist jz .Lsoftware - lghi %r0,0 - la %r1,`2*$SIZE_T`($sp) - .long 0xb93e0002 # kimd %r0,%r2 - lg %r0,`2*$SIZE_T`($sp) + lg %r0,16(%r1) # check kimd capabilities tmhh %r0,`0x8000>>$kimdfunc` jz .Lsoftware lghi %r0,$kimdfunc @@ -311,7 +308,7 @@ $code.=<<___; br %r14 .size $Func,.-$Func .string "SHA${label} block transform for s390x, CRYPTOGAMS by <appro\@openssl.org>" -.comm OPENSSL_s390xcap_P,16,8 +.comm OPENSSL_s390xcap_P,80,8 ___ $code =~ s/\`([^\`]*)\`/eval $1/gem; |