Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Openssl
提交
55eab3b7
T
Third Party Openssl
项目概览
OpenHarmony
/
Third Party Openssl
大约 1 年 前同步成功
通知
9
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看板
提交
55eab3b7
编写于
8月 23, 2007
作者:
A
Andy Polyakov
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Make x86_64 modules work under Win64/x64.
上级
dc0fcb98
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
37 addition
and
17 deletion
+37
-17
crypto/aes/asm/aes-x86_64.pl
crypto/aes/asm/aes-x86_64.pl
+16
-11
crypto/perlasm/x86_64-xlate.pl
crypto/perlasm/x86_64-xlate.pl
+12
-3
crypto/sha/asm/sha512-x86_64.pl
crypto/sha/asm/sha512-x86_64.pl
+7
-1
crypto/x86_64cpuid.pl
crypto/x86_64cpuid.pl
+2
-2
未找到文件。
crypto/aes/asm/aes-x86_64.pl
浏览文件 @
55eab3b7
...
...
@@ -626,14 +626,13 @@ AES_encrypt:
call _x86_64_AES_encrypt_compact
lea 16(%rsp),%rsp
pop $out # restore out
mov 16(%rsp),$out # restore out
mov 24(%rsp),%rsp
mov $s0,0($out) # write output vector
mov $s1,4($out)
mov $s2,8($out)
mov $s3,12($out)
mov (%rsp),%rsp
pop %r15
pop %r14
pop %r13
...
...
@@ -1217,19 +1216,18 @@ AES_decrypt:
sub $sbox,%rbp
and \$0x300,%rbp
lea ($sbox,%rbp),$sbox
shr \$3,%rbp
# recall "magic" constants!
shr \$3,%rbp # recall "magic" constants!
add %rbp,$sbox
call _x86_64_AES_decrypt_compact
lea 16(%rsp),%rsp
pop $out # restore out
mov $s0,0($out)
mov 16(%rsp),$out # restore out
mov 24(%rsp),%rsp
mov $s0,0($out)
# write output vector
mov $s1,4($out)
mov $s2,8($out)
mov $s3,12($out)
mov (%rsp),%rsp
pop %r15
pop %r14
pop %r13
...
...
@@ -1275,6 +1273,13 @@ $code.=<<___;
.type AES_set_encrypt_key,\@function,3
.align 16
AES_set_encrypt_key:
call _x86_64_AES_set_encrypt_key
ret
.size AES_set_encrypt_key,.-AES_set_encrypt_key
.type _x86_64_AES_set_encrypt_key,\@abi-omnipotent
.align 16
_x86_64_AES_set_encrypt_key:
push %rbx
push %rbp
...
...
@@ -1461,8 +1466,8 @@ $code.=<<___;
.Lexit:
pop %rbp
pop %rbx
ret
.size
AES_set_encrypt_key,.-
AES_set_encrypt_key
.byte 0xf3,0xc3 # rep
ret
.size
_x86_64_AES_set_encrypt_key,.-_x86_64_
AES_set_encrypt_key
___
sub
deckey_ref
()
...
...
@@ -1527,7 +1532,7 @@ $code.=<<___;
.align 16
AES_set_decrypt_key:
push %rdx # save key schedule
call AES_set_encrypt_key
call
_x86_64_
AES_set_encrypt_key
cmp \$0,%eax
pop %r8 # restore key schedule
jne .Labort
...
...
crypto/perlasm/x86_64-xlate.pl
浏览文件 @
55eab3b7
...
...
@@ -85,6 +85,8 @@ my $current_function;
if
(
$self
->
{
op
}
=~
/(movz)b.*/
)
{
# movz is pain...
$self
->
{
op
}
=
$
1
;
$self
->
{
sz
}
=
"
b
";
}
elsif
(
$self
->
{
op
}
=~
/call/
)
{
$self
->
{
sz
}
=
""
}
elsif
(
$self
->
{
op
}
=~
/([a-z]{3,})([qlwb])/
)
{
$self
->
{
op
}
=
$
1
;
$self
->
{
sz
}
=
$
2
;
...
...
@@ -358,7 +360,7 @@ my $current_function;
$self
->
{
value
}
=
$v
;
last
;
};
/\.extern/
&&
do
{
$self
->
{
value
}
=
"
EXTRN
\t
"
.
$line
;
last
;
};
/\.extern/
&&
do
{
$self
->
{
value
}
=
"
EXTRN
\t
"
.
$line
.
"
:BYTE
"
;
last
;
};
/\.globl/
&&
do
{
$self
->
{
value
}
=
"
PUBLIC
\t
"
.
$line
;
last
;
};
/\.type/
&&
do
{
(
$sym
,
$type
,
$narg
)
=
split
('
,
',
$line
);
if
(
$type
eq
"
\@
function
")
{
...
...
@@ -394,8 +396,15 @@ my $current_function;
last
;
};
/\.asciz/
&&
do
{
if
(
$line
=~
/^"(.*)"$/
)
{
$self
->
{
value
}
=
"
DB
\t
"
.
join
("
,
",
unpack
("
C*
",
$
1
),
0
);
my
@str
=
unpack
("
C*
",
$
1
);
push
@str
,
0
;
while
(
$#str
>
15
)
{
$self
->
{
value
}
.=
"
DB
\t
"
.
join
("
,
",
@str
[
0
..
15
])
.
"
\n
";
foreach
(
0
..
15
)
{
shift
@str
;
}
}
$self
->
{
value
}
.=
"
DB
\t
"
.
join
("
,
",
@str
)
if
(
@str
);
}
last
;
};
...
...
crypto/sha/asm/sha512-x86_64.pl
浏览文件 @
55eab3b7
...
...
@@ -41,7 +41,13 @@
# apparently are not atomic instructions, but implemented in microcode.
$output
=
shift
;
open
STDOUT
,"
| $^X ../perlasm/x86_64-xlate.pl
$output
";
$
0
=~
m/(.*[\/\\])[^\/\\]+$/
;
$dir
=
$
1
;
(
$xlate
=
"
${dir}
x86_64-xlate.pl
"
and
-
f
$xlate
)
or
(
$xlate
=
"
${dir}
../../perlasm/x86_64-xlate.pl
"
and
-
f
$xlate
)
or
die
"
can't locate x86_64-xlate.pl
";
open
STDOUT
,"
| $^X
$xlate
$output
";
if
(
$output
=~
/512/
)
{
$func
=
"
sha512_block_data_order
";
...
...
crypto/x86_64cpuid.pl
浏览文件 @
55eab3b7
...
...
@@ -136,11 +136,11 @@ OPENSSL_ia32_cpuid:
cpuid
cmp \$0,%r9d
jne .Lnotintel
or \$
1<<20,%edx # use reserved
bit to engage RC4_CHAR
or \$
0x00100000,%edx # use reserved 20th
bit to engage RC4_CHAR
and \$15,%ah
cmp \$15,%ah # examine Family ID
je .Lnotintel
or \$
1<<30,%edx
# use reserved bit to skip unrolled loop
or \$
0x40000000,%edx
# use reserved bit to skip unrolled loop
.Lnotintel:
bt \$28,%edx # test hyper-threading bit
jnc .Ldone
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录