From 3e719c99f588095568c6cd83098c4b1364f2d8e2 Mon Sep 17 00:00:00 2001 From: Andy Polyakov Date: Tue, 19 Jan 2010 21:40:58 +0000 Subject: s390x assembler update: add support for run-time facility detection [from HEAD]. --- crypto/sha/asm/sha1-s390x.pl | 5 +++++ crypto/sha/asm/sha512-s390x.pl | 5 +++++ 2 files changed, 10 insertions(+) (limited to 'crypto/sha') 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 " +.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 " +.comm OPENSSL_s390xcap_P,8,8 ___ $code =~ s/\`([^\`]*)\`/eval $1/gem; -- cgit v1.2.3