Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Openssl
提交
93c4ba07
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看板
提交
93c4ba07
编写于
11月 14, 2008
作者:
A
Andy Polyakov
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
x86_64-xlate.pl update, engage x86_64 assembler in mingw64.
上级
36d46234
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
39 addition
and
24 deletion
+39
-24
Configure
Configure
+8
-1
TABLE
TABLE
+8
-8
crypto/bn/asm/x86_64-gcc.c
crypto/bn/asm/x86_64-gcc.c
+5
-1
crypto/perlasm/x86_64-xlate.pl
crypto/perlasm/x86_64-xlate.pl
+18
-14
未找到文件。
Configure
浏览文件 @
93c4ba07
...
...
@@ -492,7 +492,14 @@ my %table=(
# MinGW
"mingw", "gcc:-mno-cygwin -DL_ENDIAN -fomit-frame-pointer -O3 -march=i486 -Wall:::MINGW32:-lws2_32 -lgdi32:BN_LLONG ${x86_gcc_des} ${x86_gcc_opts} EXPORT_VAR_AS_FN:${x86_asm}:coff:win32:cygwin-shared:-D_WINDLL -DOPENSSL_USE_APPLINK:-mno-cygwin:.dll.a",
"mingw64", "gcc:-mno-cygwin -DL_ENDIAN -O3 -Wall -DWIN32_LEAN_AND_MEAN -DUNICODE -D_UNICODE:::MINGW64:-lws2_32 -lgdi32:SIXTY_FOUR_BIT RC4_CHUNK_LL DES_INT EXPORT_VAR_AS_FN:${no_asm}:win32:cygwin-shared:-D_WINDLL:-mno-cygwin:.dll.a",
# As for OPENSSL_USE_APPLINK. Applink makes it possible to use .dll
# compiled with one compiler with application compiled with another
# compiler. It's possible to engage Applink support in mingw64 build,
# but it's not done, because till mingw64 supports structured exception
# handling, one can't seriously consider its binaries for using with
# non-mingw64 run-time environment. And as mingw64 is always consistent
# with itself, Applink is never engaged and can as well be omitted.
"mingw64", "gcc:-mno-cygwin -DL_ENDIAN -O3 -Wall -DWIN32_LEAN_AND_MEAN -DUNICODE -D_UNICODE:::MINGW64:-lws2_32 -lgdi32:SIXTY_FOUR_BIT RC4_CHUNK_LL DES_INT EXPORT_VAR_AS_FN:${x86_64_asm}:mingw64:win32:cygwin-shared:-D_WINDLL:-mno-cygwin:.dll.a",
# UWIN
"UWIN", "cc:-DTERMIOS -DL_ENDIAN -O -Wall:::UWIN::BN_LLONG ${x86_gcc_des} ${x86_gcc_opts}:${no_asm}:win32",
...
...
TABLE
浏览文件 @
93c4ba07
...
...
@@ -3608,20 +3608,20 @@ $thread_cflag =
$sys_id = MINGW64
$lflags = -lws2_32 -lgdi32
$bn_ops = SIXTY_FOUR_BIT RC4_CHUNK_LL DES_INT EXPORT_VAR_AS_FN
$cpuid_obj =
$bn_obj =
$cpuid_obj =
x86_64cpuid.o
$bn_obj =
x86_64-gcc.o x86_64-mont.o
$des_obj =
$aes_obj =
$aes_obj =
aes-x86_64.o
$bf_obj =
$md5_obj =
$sha1_obj =
$md5_obj =
md5-x86_64.o
$sha1_obj =
sha1-x86_64.o sha256-x86_64.o sha512-x86_64.o
$cast_obj =
$rc4_obj =
$rc4_obj =
rc4-x86_64.o
$rmd160_obj =
$rc5_obj =
$wp_obj =
$wp_obj =
wp-x86_64.o
$cmll_obj =
$perlasm_scheme =
void
$perlasm_scheme =
mingw64
$dso_scheme = win32
$shared_target= cygwin-shared
$shared_cflag = -D_WINDLL
...
...
crypto/bn/asm/x86_64-gcc.c
浏览文件 @
93c4ba07
#if
def __SUNPRO_C
#if
!(defined(__GNUC__) && __GNUC__>=2)
# include "../bn_asm.c"
/* kind of dirty hack for Sun Studio */
#else
/*
...
...
@@ -54,7 +54,11 @@
* machine.
*/
#ifdef _WIN64
#define BN_ULONG unsigned long long
#else
#define BN_ULONG unsigned long
#endif
/*
* "m"(a), "+m"(r) is the way to favor DirectPath -code;
...
...
crypto/perlasm/x86_64-xlate.pl
浏览文件 @
93c4ba07
...
...
@@ -71,6 +71,7 @@ my $gas=1; $gas=0 if ($output =~ /\.asm$/);
my
$elf
=
1
;
$elf
=
0
if
(
!
$gas
);
my
$win64
=
0
;
my
$prefix
=
"";
my
$decor
=
"
.L
";
my
$masmref
=
8
+
50727
*
2
**-
32
;
# 8.00.50727 shipped with VS2005
my
$masm
=
0
;
...
...
@@ -80,9 +81,9 @@ my $nasmref=2.03;
my
$nasm
=
0
;
if
(
$flavour
eq
"
mingw64
")
{
$gas
=
1
;
$elf
=
0
;
$win64
=
1
;
$prefix
=
"
_
";
}
elsif
(
$flavour
eq
"
macosx
")
{
$gas
=
1
;
$elf
=
0
;
$prefix
=
"
_
";
}
elsif
(
$flavour
eq
"
masm
")
{
$gas
=
0
;
$elf
=
0
;
$masm
=
$masmref
;
$win64
=
1
;
}
elsif
(
$flavour
eq
"
nasm
")
{
$gas
=
0
;
$elf
=
0
;
$nasm
=
$nasmref
;
$win64
=
1
;
$PTR
=
"";
}
elsif
(
$flavour
eq
"
macosx
")
{
$gas
=
1
;
$elf
=
0
;
$prefix
=
"
_
";
$decor
=
"
L
\$
";
}
elsif
(
$flavour
eq
"
masm
")
{
$gas
=
0
;
$elf
=
0
;
$masm
=
$masmref
;
$win64
=
1
;
$decor
=
"
\$
L
\$
";
}
elsif
(
$flavour
eq
"
nasm
")
{
$gas
=
0
;
$elf
=
0
;
$nasm
=
$nasmref
;
$win64
=
1
;
$
decor
=
"
\$
L
\$
";
$
PTR
=
"";
}
elsif
(
!
$gas
)
{
if
(
$ENV
{
ASM
}
=~
m/nasm/
&&
`
nasm -v
`
=~
m/version ([0-9]+)\.([0-9]+)/i
)
{
$nasm
=
$
1
+
$
2
*
0.01
;
$PTR
=
"";
}
...
...
@@ -91,6 +92,7 @@ elsif (!$gas)
die
"
no assembler found on %PATH
"
if
(
!
(
$nasm
||
$masm
));
$win64
=
1
;
$elf
=
0
;
$decor
=
"
\$
L
\$
";
}
my
$current_segment
;
...
...
@@ -228,6 +230,7 @@ my %globals;
my
$sz
=
shift
;
$self
->
{
label
}
=~
s/([_a-z][_a-z0-9]*)/$globals{$1} or $1/g
ei
;
$self
->
{
label
}
=~
s/\.L/$decor/g
;
# Silently convert all EAs to 64-bit. This is required for
# elder GNU assembler and results in more compact code,
...
...
@@ -240,7 +243,7 @@ my %globals;
# in $self->{label}
$self
->
{
label
}
=~
s/(?<![0-9a-f])(0[x0-9a-f]+)/oct($1)/
egi
;
$self
->
{
label
}
=~
s/([0-9]+\s*[\*\/\%]\s*[0-9]+)/eval($1)/
eg
;
$self
->
{
label
}
=~
s/
\.L/L\$/g
if
(
!
$elf
);
$self
->
{
label
}
=~
s/
^___imp_/__imp__/
if
(
$flavour
eq
"
mingw64
"
);
if
(
defined
(
$self
->
{
index
}))
{
sprintf
"
%s%s(%%%s,%%%s,%d)
",
$self
->
{
asterisk
},
...
...
@@ -252,7 +255,6 @@ my %globals;
}
else
{
%szmap
=
(
b
=>
"
BYTE
$PTR
",
w
=>
"
WORD
$PTR
",
l
=>
"
DWORD
$PTR
",
q
=>
"
QWORD
$PTR
"
);
$self
->
{
label
}
=~
s/\.L/\$L\$/g
;
$self
->
{
label
}
=~
s/\./\$/g
;
$self
->
{
label
}
=~
s/0x([0-9a-f]+)/0$1h/ig
;
$self
->
{
label
}
=
"
(
$self
->{label})
"
if
(
$self
->
{
label
}
=~
/[\*\+\-\/]/
);
...
...
@@ -322,8 +324,7 @@ my %globals;
$ret
=
$self
;
$line
=
substr
(
$line
,
@
+
[
0
]);
$line
=~
s/^\s+//
;
$self
->
{
value
}
=~
s/\.L/\$L\$/
if
(
!
$gas
);
$self
->
{
value
}
=~
s/\.L/L\$/
if
(
!
$elf
);
$self
->
{
value
}
=~
s/^\.L/$decor/
;
}
$ret
;
}
...
...
@@ -339,7 +340,7 @@ my %globals;
$func
.=
"
movq %rdi,8(%rsp)
\n
";
$func
.=
"
movq %rsi,16(%rsp)
\n
";
$func
.=
"
movq %rsp,%rax
\n
";
$func
.=
"
.L
SEH_begin_
$current_function
->{name}:
\n
";
$func
.=
"
${decor}
SEH_begin_
$current_function
->{name}:
\n
";
my
$narg
=
$current_function
->
{
narg
};
$narg
=
6
if
(
!
defined
(
$narg
));
$func
.=
"
movq %rcx,%rdi
\n
"
if
(
$narg
>
0
);
...
...
@@ -360,7 +361,7 @@ my %globals;
$func
.=
"
mov QWORD
${PTR}
[8+rsp],rdi
\t
;WIN64 prologue
\n
";
$func
.=
"
mov QWORD
${PTR}
[16+rsp],rsi
\n
";
$func
.=
"
mov rax,rsp
\n
";
$func
.=
"
\$
L
\$
SEH_begin_
$current_function
->{name}:
";
$func
.=
"
${decor}
SEH_begin_
$current_function
->{name}:
";
$func
.=
"
:
"
if
(
$masm
);
$func
.=
"
\n
";
my
$narg
=
$current_function
->
{
narg
};
...
...
@@ -391,8 +392,7 @@ my %globals;
$self
->
{
value
}
=~
s/\@PLT//
if
(
!
$elf
);
$self
->
{
value
}
=~
s/([_a-z][_a-z0-9]*)/$globals{$1} or $1/g
ei
;
$self
->
{
value
}
=~
s/\.L/\$L\$/g
if
(
!
$gas
);
$self
->
{
value
}
=~
s/\.L/L\$/g
if
(
!
$elf
);
$self
->
{
value
}
=~
s/\.L/$decor/g
;
}
$ret
;
}
...
...
@@ -461,6 +461,11 @@ my %globals;
}
last
;
};
/\.rva|\.long|\.quad/
&&
do
{
$line
=~
s/([_a-z][_a-z0-9]*)/$globals{$1} or $1/g
ei
;
$line
=~
s/\.L/$decor/g
;
last
;
};
}
if
(
$gas
)
{
...
...
@@ -477,7 +482,7 @@ my %globals;
}
elsif
(
!
$elf
&&
$dir
=~
/\.size/
)
{
$self
->
{
value
}
=
"";
if
(
defined
(
$current_function
))
{
$self
->
{
value
}
.=
"
.L
SEH_end_
$current_function
->{name}:
"
$self
->
{
value
}
.=
"
${decor}
SEH_end_
$current_function
->{name}:
"
if
(
$win64
&&
$current_function
->
{
abi
}
eq
"
svr4
");
undef
$current_function
;
}
...
...
@@ -555,7 +560,7 @@ my %globals;
/\.size/
&&
do
{
if
(
defined
(
$current_function
))
{
undef
$self
->
{
value
};
if
(
$current_function
->
{
abi
}
eq
"
svr4
")
{
$self
->
{
value
}
=
"
\$
L
\$
SEH_end_
$current_function
->{name}:
";
$self
->
{
value
}
=
"
${decor}
SEH_end_
$current_function
->{name}:
";
$self
->
{
value
}
.=
"
:
\n
"
if
(
$masm
);
}
$self
->
{
value
}
.=
"
$current_function
->{name}
\t
ENDP
"
if
(
$masm
);
...
...
@@ -570,7 +575,6 @@ my %globals;
my
$last
=
pop
(
@arr
);
my
$conv
=
sub
{
my
$var
=
shift
;
$var
=~
s/0x([0-9a-f]+)/0$1h/ig
;
$var
=~
s/\.L/\$L\$/g
;
if
(
$sz
eq
"
D
"
&&
(
$current_segment
=~
/.[px]data/
||
$dir
eq
"
.rva
"))
{
$var
=~
s/([_a-z\$\@][_a-z0-9\$\@]*)/$nasm?"$1 wrt ..imagebase":"imagerel $1"/
egi
;
}
$var
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录