Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
杨瘦锅
openssl
提交
eb1aa135
O
openssl
项目概览
杨瘦锅
/
openssl
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
O
openssl
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
eb1aa135
编写于
8月 06, 2008
作者:
A
Andy Polyakov
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
sha1-armv4-large.pl performance improvement. On PXA255 it gives +10% on
8KB block, +60% on 1KB, +160% on 256B...
上级
99649b59
变更
1
显示空白变更内容
内联
并排
Showing
1 changed file
with
14 addition
and
12 deletion
+14
-12
crypto/sha/asm/sha1-armv4-large.pl
crypto/sha/asm/sha1-armv4-large.pl
+14
-12
未找到文件。
crypto/sha/asm/sha1-armv4-large.pl
浏览文件 @
eb1aa135
...
...
@@ -18,8 +18,8 @@
# thumb 304 3212 4420
# armv4-small 392/+29% 1958/+64% 2250/+96%
# armv4-compact 740/+89% 1552/+26% 1840/+22%
# armv4-large 1420/+92% 1307/+19% 1
500/+23%
# full unroll ~5100/+260% ~1260/+4% ~1
500/+0
%
# armv4-large 1420/+92% 1307/+19% 1
370/+34%[***]
# full unroll ~5100/+260% ~1260/+4% ~1
300/+5
%
# ====================================================================
# thumb = same as 'small' but in Thumb instructions[**] and
# with recurring code in two private functions;
...
...
@@ -37,6 +37,7 @@
# modes are limited. As result it takes more instructions to do
# the same job in Thumb, therefore the code is never twice as
# small and always slower.
# [***] which is also ~35% better than compiler generated code.
$output
=
shift
;
open
STDOUT
,"
>
$output
";
...
...
@@ -50,9 +51,10 @@ $c="r5";
$d
=
"
r6
";
$e
=
"
r7
";
$K
=
"
r8
";
$t0
=
"
r10
";
$t1
=
"
r11
";
$t2
=
"
r12
";
$t0
=
"
r9
";
$t1
=
"
r10
";
$t2
=
"
r11
";
$t3
=
"
r12
";
$Xi
=
"
r14
";
@V
=
(
$a
,
$b
,
$c
,
$d
,
$e
);
...
...
@@ -64,14 +66,14 @@ $code.=<<___;
ldrb $t0,[$inp],#4
ldrb $t1,[$inp,#-3]
ldrb $t2,[$inp,#-2]
ldrb $t3,[$inp,#-1]
add $e,$K,$e,ror#2 @ E+=K_00_19
orr $t0,$t1,$t0,lsl#8
ldrb $t1,[$inp,#-1]
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]
orr $t0,$t2,$t0,lsl#8
eor $t1,$c,$d @ F_xx_xx
orr $t0,$t3,$t0,lsl#8
add $e,$e,$t0 @ E+=X[i]
str $t0,[$Xi,#-4]!
___
}
...
...
@@ -81,12 +83,12 @@ $code.=<<___;
ldr $t0,[$Xi,#15*4]
ldr $t1,[$Xi,#13*4]
ldr $t2,[$Xi,#7*4]
ldr $t3,[$Xi,#2*4]
add $e,$K,$e,ror#2 @ E+=K_xx_xx
eor $t0,$t0,$t1
ldr $t1,[$Xi,#2*4]
add $e,$e,$a,ror#27 @ E+=ROR(A,27)
eor $t0,$t0,$t2
eor $t0,$t0,$t1
eor $t0,$t0,$t3
add $e,$e,$a,ror#27 @ E+=ROR(A,27)
___
$code
.=<<
___
if
(
!
defined
(
$flag
));
eor
$t1
,
$c
,
$d
@
F_xx_xx
,
but
not
in
40_59
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录