diff options
author | Andy Polyakov <appro@openssl.org> | 2010-01-19 12:24:59 +0000 |
---|---|---|
committer | Andy Polyakov <appro@openssl.org> | 2010-01-19 12:24:59 +0000 |
commit | 91fdacb2c34e05f0a31fd3b51b4cb59538157682 (patch) | |
tree | 5a93d149d14cc5d69b8fe88fb9677b6b7c2f8e06 /crypto/sha/asm | |
parent | d582c98d8f3b1c953a990305ba00201c8c122a55 (diff) |
s390x assembler update: add support for run-time facility detection.
Diffstat (limited to 'crypto/sha/asm')
-rw-r--r-- | crypto/sha/asm/sha1-s390x.pl | 5 | ||||
-rw-r--r-- | crypto/sha/asm/sha512-s390x.pl | 5 |
2 files changed, 10 insertions, 0 deletions
diff --git a/crypto/sha/asm/sha1-s390x.pl b/crypto/sha/asm/sha1-s390x.pl index eb6f8dfc82..4b17848287 100644 --- a/crypto/sha/asm/sha1-s390x.pl +++ b/crypto/sha/asm/sha1-s390x.pl @@ -143,6 +143,10 @@ Ktable: .long 0x5a827999,0x6ed9eba1,0x8f1bbcdc,0xca62c1d6 sha1_block_data_order: ___ $code.=<<___ if ($kimdfunc); + larl %r1,OPENSSL_s390xcap_P + lg %r0,0(%r1) + tmhl %r0,0x4000 # check for message-security assist + jz .Lsoftware lghi %r0,0 la %r1,16($sp) .long 0xb93e0002 # kimd %r0,%r2 @@ -213,6 +217,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,8,8 ___ $code =~ s/\`([^\`]*)\`/eval $1/gem; diff --git a/crypto/sha/asm/sha512-s390x.pl b/crypto/sha/asm/sha512-s390x.pl index 5811d74d09..e7ef2d5a9f 100644 --- a/crypto/sha/asm/sha512-s390x.pl +++ b/crypto/sha/asm/sha512-s390x.pl @@ -214,6 +214,10 @@ $code.=<<___; $Func: ___ $code.=<<___ if ($kimdfunc); + larl %r1,OPENSSL_s390xcap_P + lg %r0,0(%r1) + tmhl %r0,0x4000 # check for message-security assist + jz .Lsoftware lghi %r0,0 la %r1,16($sp) .long 0xb93e0002 # kimd %r0,%r2 @@ -286,6 +290,7 @@ $code.=<<___; br %r14 .size $Func,.-$Func .string "SHA${label} block transform for s390x, CRYPTOGAMS by <appro\@openssl.org>" +.comm OPENSSL_s390xcap_P,8,8 ___ $code =~ s/\`([^\`]*)\`/eval $1/gem; |