提交 19308587 编写于 作者: P Patrick Steuer 提交者: Andy Polyakov

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: NPatrick Steuer <patrick.steuer@de.ibm.com>
Reviewed-by: NAndy Polyakov <appro@openssl.org>
Reviewed-by: NRich Salz <rsalz@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/5284)
上级 97d37b85
......@@ -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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册