Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Openssl
提交
0b0896cd
T
Third Party Openssl
项目概览
OpenHarmony
/
Third Party Openssl
1 年多 前同步成功
通知
10
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看板
提交
0b0896cd
编写于
1月 25, 2007
作者:
A
Andy Polyakov
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Minor optimization for sha1-armv4 module.
上级
2d3e956a
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
14 addition
and
11 deletion
+14
-11
crypto/sha/asm/sha1-armv4-large.pl
crypto/sha/asm/sha1-armv4-large.pl
+14
-11
未找到文件。
crypto/sha/asm/sha1-armv4-large.pl
浏览文件 @
0b0896cd
...
...
@@ -7,7 +7,7 @@
# details see http://www.openssl.org/~appro/cryptogams/.
# ====================================================================
# sha1_block pr
e
cedure for ARMv4.
# sha1_block pr
o
cedure for ARMv4.
#
# January 2007.
...
...
@@ -16,10 +16,10 @@
# impl size in bytes comp cycles[*] measured performance
# ====================================================================
# thumb 304 3212 4420
# armv4-small 392/+29% 1958/+64% 22
90/+93
%
# armv4-compact 740/+89% 1552/+26% 1
910/+20
%
# armv4-large 1420/+92% 1307/+19% 1
630/+17
%
# full unroll ~5100/+260% ~1260/+4% ~1
600/+2
%
# armv4-small 392/+29% 1958/+64% 22
50/+96
%
# armv4-compact 740/+89% 1552/+26% 1
840/+22
%
# armv4-large 1420/+92% 1307/+19% 1
500/+23
%
# full unroll ~5100/+260% ~1260/+4% ~1
500/+0
%
# ====================================================================
# thumb = same as 'small' but in Thumb instructions[**] and
# with recurring code in two private functions;
...
...
@@ -64,15 +64,16 @@ $code.=<<___;
add $e,$K,$e,ror#2 @ E+=K_00_19
orr $t0,$t1,$t0,lsl#8
ldrb $t1,[$inp,#-1]
add $e,$e,$a,ror#27 @ E+=ROR(A,27)
orr $t0,$t2,$t0,lsl#8
add $e,$e,$a,ror#27 @ E+=ROR(A,27)
orr $t0,$t1,$t0,lsl#8
add $e,$e,$t0 @ E+=X[i]
eor $t1,$c,$d @ F_xx_xx
str $t0,[$Xi,#-4]!
___
}
sub
Xupdate
{
my
(
$a
,
$b
,
$c
,
$d
,
$e
)
=
@_
;
my
(
$a
,
$b
,
$c
,
$d
,
$e
,
$flag
)
=
@_
;
$code
.=
<<___;
ldr $t0,[$Xi,#15*4]
ldr $t1,[$Xi,#13*4]
...
...
@@ -83,6 +84,11 @@ $code.=<<___;
add $e,$e,$a,ror#27 @ E+=ROR(A,27)
eor $t0,$t0,$t2
eor $t0,$t0,$t1
___
$code
.=<<
___
if
(
!
defined
(
$flag
));
eor
$t1
,
$c
,
$d
@
F_xx_xx
,
but
not
in
40_59
___
$code
.=
<<___;
mov $t0,$t0,ror#31
add $e,$e,$t0 @ E+=X[i]
str $t0,[$Xi,#-4]!
...
...
@@ -93,7 +99,6 @@ sub BODY_00_15 {
my
(
$a
,
$b
,
$c
,
$d
,
$e
)
=
@_
;
&Xload
(
@
_
);
$code
.=
<<___;
eor $t1,$c,$d
and $t1,$b,$t1,ror#2
eor $t1,$t1,$d,ror#2 @ F_00_19(B,C,D)
add $e,$e,$t1 @ E+=F_00_19(B,C,D)
...
...
@@ -104,7 +109,6 @@ sub BODY_16_19 {
my
(
$a
,
$b
,
$c
,
$d
,
$e
)
=
@_
;
&Xupdate
(
@
_
);
$code
.=
<<___;
eor $t1,$c,$d
and $t1,$b,$t1,ror#2
eor $t1,$t1,$d,ror#2 @ F_00_19(B,C,D)
add $e,$e,$t1 @ E+=F_00_19(B,C,D)
...
...
@@ -115,7 +119,6 @@ sub BODY_20_39 {
my
(
$a
,
$b
,
$c
,
$d
,
$e
)
=
@_
;
&Xupdate
(
@
_
);
$code
.=
<<___;
eor $t1,$c,$d
eor $t1,$b,$t1,ror#2 @ F_20_39(B,C,D)
add $e,$e,$t1 @ E+=F_20_39(B,C,D)
___
...
...
@@ -123,7 +126,7 @@ ___
sub
BODY_40_59
{
my
(
$a
,
$b
,
$c
,
$d
,
$e
)
=
@_
;
&Xupdate
(
@
_
);
&Xupdate
(
@
_
,
1
);
$code
.=
<<___;
and $t1,$b,$c,ror#2
orr $t2,$b,$c,ror#2
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录