Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Openssl
提交
26064d7f
T
Third Party Openssl
项目概览
OpenHarmony
/
Third Party Openssl
10 个月 前同步成功
通知
8
Star
18
Fork
1
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
Third Party Openssl
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
前往新版Gitcode,体验更适合开发者的 AI 搜索 >>
提交
26064d7f
编写于
7月 14, 2010
作者:
A
Andy Polyakov
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
aes-s390x.pl: revisit buffer allocation and add performance data.
上级
c981086d
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
22 addition
and
13 deletion
+22
-13
crypto/aes/asm/aes-s390x.pl
crypto/aes/asm/aes-s390x.pl
+22
-13
未找到文件。
crypto/aes/asm/aes-s390x.pl
浏览文件 @
26064d7f
...
...
@@ -44,7 +44,7 @@
# Unlike previous version hardware support detection takes place only
# at the moment of key schedule setup, which is denoted in key->rounds.
# This is done, because deferred key setup can't be made MT-safe, not
# for key
lengthe
s longer than 128 bits.
# for keys longer than 128 bits.
#
# Add AES_cbc_encrypt, which gives incredible performance improvement,
# it was measured to be ~6.6x. It's less than previously mentioned 8x,
...
...
@@ -52,7 +52,13 @@
# May 2010.
#
# Add AES_ctr32_encrypt.
# Add AES_ctr32_encrypt. If hardware-assisted, it provides up to 4.3x
# performance improvement over "generic" counter mode routine relying
# on single-block, also hardware-assisted, AES_encrypt. "Up to" refers
# to the fact that exact throughput value depends on current stack
# frame alignment within 4KB page. In worst case you get ~75% of the
# maximum, but *on average* it would be as much as ~98%. Meaning that
# worst case is unlike, it's like hitting ravine on plateau.
while
((
$output
=
shift
)
&&
(
$output
!~
/^\w[\w\-]*\.\w+$/
))
{}
open
STDOUT
,"
>
$output
";
...
...
@@ -1367,24 +1373,27 @@ $code.=<<___ if (!$softonly);
lg
$iv0
,
0
(
$ivp
)
# load ivec
lg
$ivp
,
8
(
$ivp
)
# prepare and allocate stack frame
lghi
$s0
,
-
272
# guarantee at least 256-bytes buffer
# prepare and allocate stack frame at the top of 4K page
# with 1K reserved for eventual signal handling
lghi
$s0
,
-
1024
-
256
-
16
# guarantee at least 256-bytes buffer
lghi
$s1
,
-
4096
lgr
$fp
,
$sp
algr
$s0
,
$sp
lgr
$fp
,
$sp
ngr
$s0
,
$s1
# align at page boundary
la
$sp
,
0
(
$s0
)
# alloca
stg
$fp
,
0
(
$s0
)
# back-chain
# calculate resultant buffer size
la
$s0
,
16
(
$s0
)
# buffer starts at offset of 16
slgr
$fp
,
$s0
srlg
$fp
,
$fp
,
4
# $fp is buffer length in blocks, minimum 16
slgr
$fp
,
$s0
# total buffer size
lgr
$s2
,
$sp
lghi
$s1
,
1024
+
16
# sl[g]fi is extended-immediate facility
slgr
$fp
,
$s1
# deduct reservation to get usable buffer size
# buffer size is at lest 256 and at most 3072+256-16
la
$sp
,
1024
(
$s0
)
# alloca
srlg
$fp
,
$fp
,
4
# convert bytes to blocks, minimum 16
stg
$s2
,
0
(
$sp
)
# back-chain
stg
$fp
,
8
(
$sp
)
slgr
$len
,
$fp
brc
1
,
.
Lctr32_hw_loop
# not zero, no borrow
algr
$fp
,
$len
algr
$fp
,
$len
# input is shorter than allocated buffer
lghi
$len
,
0
stg
$fp
,
8
(
$sp
)
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录