summaryrefslogtreecommitdiffstats
path: root/crypto/modes/asm/ghash-s390x.pl
diff options
context:
space:
mode:
authorPatrick Steuer <patrick.steuer@de.ibm.com>2017-01-30 12:50:54 +0100
committerAndy Polyakov <appro@openssl.org>2017-10-17 21:55:33 +0200
commitaf1d638730bdfad85a7fa8c3f157b2828eda7c1d (patch)
treefcc8c2ff4da8bea2d5d46990ea3301bf35943c5b /crypto/modes/asm/ghash-s390x.pl
parent4c5100ce7d66ccff48d6435c1761b5e3281de61f (diff)
s390x assembly pack: remove capability double-checking.
An instruction's QUERY function is executed at initialization, iff the required MSA level is installed. Therefore, it is sufficient to check the bits returned by the QUERY functions. The MSA level does not have to be checked at every function call. crypto/aes/asm/aes-s390x.pl: The AES key schedule must be computed if the required KM or KMC function codes are not available. Formally, the availability of a KMC function code does not imply the availability of the corresponding KM function code. Signed-off-by: Patrick Steuer <patrick.steuer@de.ibm.com> Reviewed-by: Andy Polyakov <appro@openssl.org> Reviewed-by: Rich Salz <rsalz@openssl.org> (Merged from https://github.com/openssl/openssl/pull/4501)
Diffstat (limited to 'crypto/modes/asm/ghash-s390x.pl')
-rw-r--r--crypto/modes/asm/ghash-s390x.pl13
1 files changed, 2 insertions, 11 deletions
diff --git a/crypto/modes/asm/ghash-s390x.pl b/crypto/modes/asm/ghash-s390x.pl
index f8b038c708..469aefa7b3 100644
--- a/crypto/modes/asm/ghash-s390x.pl
+++ b/crypto/modes/asm/ghash-s390x.pl
@@ -88,9 +88,6 @@ gcm_gmult_4bit:
___
$code.=<<___ if(!$softonly && 0); # hardware is slow for single block...
larl %r1,OPENSSL_s390xcap_P
- lg %r0,0(%r1)
- tmhl %r0,0x4000 # check for message-security-assist
- jz .Lsoft_gmult
lghi %r0,0
lg %r1,24(%r1) # load second word of kimd capabilities vector
tmhh %r1,0x4000 # check for function 65
@@ -126,14 +123,8 @@ gcm_ghash_4bit:
___
$code.=<<___ if(!$softonly);
larl %r1,OPENSSL_s390xcap_P
- lg %r0,0(%r1)
- tmhl %r0,0x4000 # check for message-security-assist
- jz .Lsoft_ghash
- lghi %r0,0
- la %r1,16($sp)
- .long 0xb93e0004 # kimd %r0,%r4
- lg %r1,24($sp)
- tmhh %r1,0x4000 # check for function 65
+ lg %r0,24(%r1) # load second word of kimd capabilities vector
+ tmhh %r0,0x4000 # check for function 65
jz .Lsoft_ghash
lghi %r0,65 # function 65
la %r1,0($Xi) # H lies right after Xi in gcm128_context