diff options
author | Patrick Steuer <patrick.steuer@de.ibm.com> | 2018-02-07 18:49:29 +0100 |
---|---|---|
committer | Andy Polyakov <appro@openssl.org> | 2018-02-13 20:34:38 +0100 |
commit | 19308587d4a4fd2886b0ca193ccfc6756d867cb1 (patch) | |
tree | 75e3739e66830db3edd0d2d25e501e2a66a811da /crypto | |
parent | 97d37b85d4e1a218fdc61dbe0dff3e7c8ff36121 (diff) |
s390x assembly pack: implement OPENSSL_rdtsc as STCKF
.. if avalable. STCK has an artificial delay to ensure uniqueness
which can result in a performance penalty if used heavily
concurrently.
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/5284)
Diffstat (limited to 'crypto')
-rwxr-xr-x | crypto/s390xcpuid.pl | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/crypto/s390xcpuid.pl b/crypto/s390xcpuid.pl index 5f6ffc66d6..b0ed9e0623 100755 --- a/crypto/s390xcpuid.pl +++ b/crypto/s390xcpuid.pl @@ -129,6 +129,14 @@ OPENSSL_s390x_facilities: .type OPENSSL_rdtsc,\@function .align 16 OPENSSL_rdtsc: + larl %r4,OPENSSL_s390xcap_P + tm S390X_STFLE+3(%r4),0x40 # check for store-clock-fast facility + jz .Lstck + + .long 0xb27cf010 # stckf 16($sp) + lg %r2,16($sp) + br $ra +.Lstck: stck 16($sp) lg %r2,16($sp) br $ra |