Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Openssl
提交
9c4fe782
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看板
提交
9c4fe782
编写于
9月 20, 2005
作者:
A
Andy Polyakov
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
MD5 x86_64 assembler update.
Submitted by: Marc Bevand and Charles Liu
上级
60dd0857
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
17 addition
and
11 deletion
+17
-11
crypto/md5/asm/md5-x86_64.pl
crypto/md5/asm/md5-x86_64.pl
+17
-11
未找到文件。
crypto/md5/asm/md5-x86_64.pl
浏览文件 @
9c4fe782
...
...
@@ -15,7 +15,7 @@ my $code;
# dst = x + ((dst + F(x,y,z) + X[k] + T_i) <<< s)
# %r10d = X[k_next]
# %r11d = z' (copy of z for the next step)
# Each round1_step() takes about 5.
71 clocks (9 instructions, 1.58
IPC)
# Each round1_step() takes about 5.
3 clocks (9 instructions, 1.7
IPC)
sub
round1_step
{
my
(
$pos
,
$dst
,
$x
,
$y
,
$z
,
$k_next
,
$T_i
,
$s
)
=
@_
;
...
...
@@ -37,22 +37,26 @@ EOF
# round2_step() does:
# dst = x + ((dst + G(x,y,z) + X[k] + T_i) <<< s)
# %r10d = X[k_next]
# %r11d = y' (copy of y for the next step)
# Each round2_step() takes about 6.22 clocks (9 instructions, 1.45 IPC)
# %r11d = z' (copy of z for the next step)
# %r12d = z' (copy of z for the next step)
# Each round2_step() takes about 5.4 clocks (11 instructions, 2.0 IPC)
sub
round2_step
{
my
(
$pos
,
$dst
,
$x
,
$y
,
$z
,
$k_next
,
$T_i
,
$s
)
=
@_
;
$code
.=
"
mov 1*4(%rsi), %r10d /* (NEXT STEP) X[1] */
\n
"
if
(
$pos
==
-
1
);
$code
.=
"
mov %ecx, %r11d /* (NEXT STEP) y' = %ecx */
\n
"
if
(
$pos
==
-
1
);
$code
.=
"
mov %edx, %r11d /* (NEXT STEP) z' = %edx */
\n
"
if
(
$pos
==
-
1
);
$code
.=
"
mov %edx, %r12d /* (NEXT STEP) z' = %edx */
\n
"
if
(
$pos
==
-
1
);
$code
.=
<<EOF;
xor $x, %r11d /* x ^ ...
*/
not %r11d /* not z
*/
lea $T_i($dst,%r10d),$dst /* Const + dst + ... */
and $
z, %r11d /* z & ...
*/
xor $y, %r11d /* y ^ ...
*/
and $
x, %r12d /* x & z
*/
and $y, %r11d /* y & (not z)
*/
mov $k_next*4(%rsi),%r10d /* (NEXT STEP) X[$k_next] */
add %r11d, $dst /* dst += ... */
or %r11d, %r12d /* (y & (not z)) | (x & z) */
mov $y, %r11d /* (NEXT STEP) z' = $y */
add %r12d, $dst /* dst += ... */
mov $y, %r12d /* (NEXT STEP) z' = $y */
rol \$$s, $dst /* dst <<< s */
mov $x, %r11d /* (NEXT STEP) y' = $x */
add $x, $dst /* dst += x */
EOF
}
...
...
@@ -61,7 +65,7 @@ EOF
# dst = x + ((dst + H(x,y,z) + X[k] + T_i) <<< s)
# %r10d = X[k_next]
# %r11d = y' (copy of y for the next step)
# Each round3_step() takes about 4.2
6 clocks (8 instructions, 1.88
IPC)
# Each round3_step() takes about 4.2
clocks (8 instructions, 1.9
IPC)
sub
round3_step
{
my
(
$pos
,
$dst
,
$x
,
$y
,
$z
,
$k_next
,
$T_i
,
$s
)
=
@_
;
...
...
@@ -83,7 +87,7 @@ EOF
# dst = x + ((dst + I(x,y,z) + X[k] + T_i) <<< s)
# %r10d = X[k_next]
# %r11d = not z' (copy of not z for the next step)
# Each round4_step() takes about 5.2
7 clocks (9 instructions, 1.71
IPC)
# Each round4_step() takes about 5.2
clocks (9 instructions, 1.7
IPC)
sub
round4_step
{
my
(
$pos
,
$dst
,
$x
,
$y
,
$z
,
$k_next
,
$T_i
,
$s
)
=
@_
;
...
...
@@ -116,6 +120,7 @@ $code .= <<EOF;
md5_block_asm_host_order:
push %rbp
push %rbx
push %r12
push %r14
push %r15
...
...
@@ -234,6 +239,7 @@ $code .= <<EOF;
pop %r15
pop %r14
pop %r12
pop %rbx
pop %rbp
ret
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录