Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Openssl
提交
c85c5c40
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看板
体验新版 GitCode,发现更多精彩内容 >>
提交
c85c5c40
编写于
9月 09, 2004
作者:
A
Andy Polyakov
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
x86 assembler updates: more instructions, new OPENSSL_instrument_halt
[for DJGPP]...
上级
2c1677d7
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
46 addition
and
6 deletion
+46
-6
crypto/perlasm/x86ms.pl
crypto/perlasm/x86ms.pl
+4
-2
crypto/perlasm/x86nasm.pl
crypto/perlasm/x86nasm.pl
+4
-2
crypto/perlasm/x86unix.pl
crypto/perlasm/x86unix.pl
+4
-2
crypto/x86cpuid.pl
crypto/x86cpuid.pl
+34
-0
未找到文件。
crypto/perlasm/x86ms.pl
浏览文件 @
c85c5c40
...
...
@@ -133,6 +133,7 @@ sub main'xorb { &out2("xor",@_); }
sub
main
'add {
&out2
("
add
",
@
_
);
}
sub
main
'adc {
&out2
("
adc
",
@
_
);
}
sub
main
'sub {
&out2
("
sub
",
@
_
);
}
sub
main
'sbb {
&out2
("
sbb
",
@
_
);
}
sub
main
'rotl {
&out2
("
rol
",
@
_
);
}
sub
main
'rotr {
&out2
("
ror
",
@
_
);
}
sub
main
'exch {
&out2
("
xchg
",
@
_
);
}
...
...
@@ -160,8 +161,8 @@ sub main'jne { &out1("jne",@_); }
sub
main
'jno {
&out1
("
jno
",
@
_
);
}
sub
main
'push {
&out1
("
push
",
@
_
);
$stack
+=
4
;
}
sub
main
'pop {
&out1
("
pop
",
@
_
);
$stack
-=
4
;
}
sub
main
'pushf {
&out0
("
pushf
");
$stack
+=
4
;
}
sub
main
'popf {
&out0
("
popf
");
$stack
-=
4
;
}
sub
main
'pushf {
&out0
("
pushf
d
");
$stack
+=
4
;
}
sub
main
'popf {
&out0
("
popf
d
");
$stack
-=
4
;
}
sub
main
'bswap {
&out1
("
bswap
",
@
_
);
&using486
();
}
sub
main
'not {
&out1
("
not
",
@
_
);
}
sub
main
'call {
&out1
("
call
",(
$_
[
0
]
=~
/^\$L/
?'':'
_
')
.
$_
[
0
]);
}
...
...
@@ -172,6 +173,7 @@ sub main'bt { &out2("bt",@_); }
sub
main
'leave {
&out0
("
leave
");
}
sub
main
'cpuid {
&out0
("
DW
\t
0A20Fh
");
}
sub
main
'rdtsc {
&out0
("
DW
\t
0310Fh
");
}
sub
main
'halt {
&out0
("
hlt
");
}
# SSE2
sub
main
'emms {
&out0
("
emms
");
}
...
...
crypto/perlasm/x86nasm.pl
浏览文件 @
c85c5c40
...
...
@@ -147,6 +147,7 @@ sub main'xorb { &out2("xor",@_); }
sub
main
'add {
&out2
("
add
",
@
_
);
}
sub
main
'adc {
&out2
("
adc
",
@
_
);
}
sub
main
'sub {
&out2
("
sub
",
@
_
);
}
sub
main
'sbb {
&out2
("
sbb
",
@
_
);
}
sub
main
'rotl {
&out2
("
rol
",
@
_
);
}
sub
main
'rotr {
&out2
("
ror
",
@
_
);
}
sub
main
'exch {
&out2
("
xchg
",
@
_
);
}
...
...
@@ -178,8 +179,8 @@ sub main'jno { &out1("jno $near",@_); }
sub
main
'push {
&out1
("
push
",
@
_
);
$stack
+=
4
;
}
sub
main
'pop {
&out1
("
pop
",
@
_
);
$stack
-=
4
;
}
sub
main
'pushf {
&out0
("
pushf
");
$stack
+=
4
;
}
sub
main
'popf {
&out0
("
popf
");
$stack
-=
4
;
}
sub
main
'pushf {
&out0
("
pushf
d
");
$stack
+=
4
;
}
sub
main
'popf {
&out0
("
popf
d
");
$stack
-=
4
;
}
sub
main
'bswap {
&out1
("
bswap
",
@
_
);
&using486
();
}
sub
main
'not {
&out1
("
not
",
@
_
);
}
sub
main
'call {
&out1
("
call
",(
$_
[
0
]
=~
/^\@L/
?'':
$under
)
.
$_
[
0
]);
}
...
...
@@ -190,6 +191,7 @@ sub main'bt { &out2("bt",@_); }
sub
main
'leave {
&out0
("
leave
");
}
sub
main
'cpuid {
&out0
("
cpuid
");
}
sub
main
'rdtsc {
&out0
("
rdtsc
");
}
sub
main
'halt {
&out0
("
hlt
");
}
# SSE2
sub
main
'emms {
&out0
("
emms
");
}
...
...
crypto/perlasm/x86unix.pl
浏览文件 @
c85c5c40
...
...
@@ -164,6 +164,7 @@ sub main'xorb { &out2("xorb",@_); }
sub
main
'add {
&out2
("
addl
",
@
_
);
}
sub
main
'adc {
&out2
("
adcl
",
@
_
);
}
sub
main
'sub {
&out2
("
subl
",
@
_
);
}
sub
main
'sbb {
&out2
("
sbbl
",
@
_
);
}
sub
main
'rotl {
&out2
("
roll
",
@
_
);
}
sub
main
'rotr {
&out2
("
rorl
",
@
_
);
}
sub
main
'exch {
&out2
("
xchg
",
@
_
);
}
...
...
@@ -191,8 +192,8 @@ sub main'dec { &out1("decl",@_); }
sub
main
'inc {
&out1
("
incl
",
@
_
);
}
sub
main
'push {
&out1
("
pushl
",
@
_
);
$stack
+=
4
;
}
sub
main
'pop {
&out1
("
popl
",
@
_
);
$stack
-=
4
;
}
sub
main
'pushf {
&out0
("
pushf
");
$stack
+=
4
;
}
sub
main
'popf {
&out0
("
popf
");
$stack
-=
4
;
}
sub
main
'pushf {
&out0
("
pushf
l
");
$stack
+=
4
;
}
sub
main
'popf {
&out0
("
popf
l
");
$stack
-=
4
;
}
sub
main
'not {
&out1
("
notl
",
@
_
);
}
sub
main
'call {
my
$pre
=
$under
;
foreach
$i
(
%label
)
...
...
@@ -206,6 +207,7 @@ sub main'bt { &out2("btl",@_); }
sub
main
'leave {
&out0
("
leave
");
}
sub
main
'cpuid {
&out0
("
.word
\t
0xa20f
");
}
sub
main
'rdtsc {
&out0
("
.word
\t
0x310f
");
}
sub
main
'halt {
&out0
("
hlt
");
}
# SSE2
sub
main
'emms {
&out0
("
emms
");
}
...
...
crypto/x86cpuid.pl
浏览文件 @
c85c5c40
...
...
@@ -38,6 +38,40 @@ require "x86asm.pl";
&ret
();
&function_end_B
("
OPENSSL_rdtsc
");
# This works in Ring 0 only [read DJGPP+MS-DOS+privileged DPMI host],
# but it's safe to call it on any [supported] 32-bit platform...
# Just check for [non-]zero return value...
&function_begin_B
("
OPENSSL_instrument_halt
","
EXTRN
\t
_OPENSSL_ia32cap_P:DWORD
");
&picmeup
("
ecx
","
OPENSSL_ia32cap_P
");
&bt
(
&DWP
(
0
,"
ecx
"),
4
);
&jnc
(
&label
("
nohalt
"));
# no TSC
&data_word
(
0x9058900e
);
# push %cs; pop %eax
&and
("
eax
",
3
);
&jnz
(
&label
("
nohalt
"));
# not enough privileges
&pushf
();
&pop
("
eax
")
&bt
("
eax
",
9
);
&jnc
(
&label
("
nohalt
"));
# interrupts are disabled
&rdtsc
();
&push
("
edx
");
&push
("
eax
");
&halt
();
&rdtsc
();
&sub
("
eax
",
&DWP
(
0
,"
esp
"));
&sbb
("
edx
",
&DWP
(
4
,"
esp
"));
&add
("
esp
",
8
);
&ret
();
&set_label
("
nohalt
");
&xor
("
eax
","
eax
");
&xor
("
edx
","
edx
");
&ret
();
&function_end_B
("
OPENSSL_instrument_halt
");
&initseg
("
OPENSSL_cpuid_setup
");
&asm_finish
();
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录