Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Openssl
提交
e0e53282
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,发现更多精彩内容 >>
提交
e0e53282
编写于
4月 12, 2016
作者:
A
Andy Polyakov
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
PPC assebmly pack: initial POWER9 support tidbits.
Reviewed-by:
N
Richard Levitte
<
levitte@openssl.org
>
上级
b9077d85
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
39 addition
and
0 deletion
+39
-0
crypto/perlasm/ppc-xlate.pl
crypto/perlasm/ppc-xlate.pl
+15
-0
crypto/ppc_arch.h
crypto/ppc_arch.h
+1
-0
crypto/ppccap.c
crypto/ppccap.c
+13
-0
crypto/ppccpuid.pl
crypto/ppccpuid.pl
+10
-0
未找到文件。
crypto/perlasm/ppc-xlate.pl
浏览文件 @
e0e53282
...
@@ -207,6 +207,21 @@ my $mtsle = sub {
...
@@ -207,6 +207,21 @@ my $mtsle = sub {
"
.long
"
.
sprintf
"
0x%X
",(
31
<<
26
)
|
(
$arg
<<
21
)
|
(
147
*
2
);
"
.long
"
.
sprintf
"
0x%X
",(
31
<<
26
)
|
(
$arg
<<
21
)
|
(
147
*
2
);
};
};
# PowerISA 3.0 stuff
my
$maddhdu
=
sub
{
my
(
$f
,
$rt
,
$ra
,
$rb
,
$rc
)
=
@_
;
"
.long
"
.
sprintf
"
0x%X
",(
4
<<
26
)
|
(
$rt
<<
21
)
|
(
$ra
<<
16
)
|
(
$rb
<<
11
)
|
(
$rc
<<
6
)
|
49
;
};
my
$maddld
=
sub
{
my
(
$f
,
$rt
,
$ra
,
$rb
,
$rc
)
=
@_
;
"
.long
"
.
sprintf
"
0x%X
",(
4
<<
26
)
|
(
$rt
<<
21
)
|
(
$ra
<<
16
)
|
(
$rb
<<
11
)
|
(
$rc
<<
6
)
|
51
;
};
my
$darn
=
sub
{
my
(
$f
,
$rt
,
$l
)
=
@_
;
"
.long
"
.
sprintf
"
0x%X
",(
31
<<
26
)
|
(
$rt
<<
21
)
|
(
$l
<<
16
)
|
(
755
<<
1
);
};
while
(
$line
=<>
)
{
while
(
$line
=<>
)
{
$line
=~
s|[#!;].*$||
;
# get rid of asm-style comments...
$line
=~
s|[#!;].*$||
;
# get rid of asm-style comments...
...
...
crypto/ppc_arch.h
浏览文件 @
e0e53282
...
@@ -12,5 +12,6 @@ extern unsigned int OPENSSL_ppccap_P;
...
@@ -12,5 +12,6 @@ extern unsigned int OPENSSL_ppccap_P;
# define PPC_ALTIVEC (1<<1)
# define PPC_ALTIVEC (1<<1)
# define PPC_CRYPTO207 (1<<2)
# define PPC_CRYPTO207 (1<<2)
# define PPC_FPU (1<<3)
# define PPC_FPU (1<<3)
# define PPC_MADD300 (1<<4)
#endif
#endif
crypto/ppccap.c
浏览文件 @
e0e53282
...
@@ -151,6 +151,7 @@ static unsigned long (*getauxval) (unsigned long) = NULL;
...
@@ -151,6 +151,7 @@ static unsigned long (*getauxval) (unsigned long) = NULL;
#define HWCAP2 26
/* AT_HWCAP2 */
#define HWCAP2 26
/* AT_HWCAP2 */
#define HWCAP_VEC_CRYPTO (1U << 25)
#define HWCAP_VEC_CRYPTO (1U << 25)
#define HWCAP_ARCH_3_00 (1U << 23)
# if defined(__GNUC__) && __GNUC__>=2
# if defined(__GNUC__) && __GNUC__>=2
__attribute__
((
constructor
))
__attribute__
((
constructor
))
...
@@ -208,6 +209,9 @@ void OPENSSL_cpuid_setup(void)
...
@@ -208,6 +209,9 @@ void OPENSSL_cpuid_setup(void)
if
(
__power_set
(
0xffffffffU
<<
16
))
/* POWER8 and later */
if
(
__power_set
(
0xffffffffU
<<
16
))
/* POWER8 and later */
OPENSSL_ppccap_P
|=
PPC_CRYPTO207
;
OPENSSL_ppccap_P
|=
PPC_CRYPTO207
;
if
(
__power_set
(
0xffffffffU
<<
17
))
/* POWER9 and later */
OPENSSL_ppccap_P
|=
PPC_MADD300
;
return
;
return
;
# endif
# endif
#endif
#endif
...
@@ -236,6 +240,10 @@ void OPENSSL_cpuid_setup(void)
...
@@ -236,6 +240,10 @@ void OPENSSL_cpuid_setup(void)
OPENSSL_ppccap_P
|=
PPC_CRYPTO207
;
OPENSSL_ppccap_P
|=
PPC_CRYPTO207
;
}
}
if
(
hwcap
&
HWCAP_ARCH_3_00
)
{
OPENSSL_ppccap_P
|=
PPC_MADD300
;
}
return
;
return
;
}
}
...
@@ -285,6 +293,11 @@ void OPENSSL_cpuid_setup(void)
...
@@ -285,6 +293,11 @@ void OPENSSL_cpuid_setup(void)
}
}
}
}
if
(
sigsetjmp
(
ill_jmp
,
1
)
==
0
)
{
OPENSSL_madd300_probe
();
OPENSSL_ppccap_P
|=
PPC_MADD300
;
}
sigaction
(
SIGILL
,
&
ill_oact
,
NULL
);
sigaction
(
SIGILL
,
&
ill_oact
,
NULL
);
sigprocmask
(
SIG_SETMASK
,
&
oset
,
NULL
);
sigprocmask
(
SIG_SETMASK
,
&
oset
,
NULL
);
}
}
crypto/ppccpuid.pl
浏览文件 @
e0e53282
...
@@ -60,6 +60,16 @@ $code=<<___;
...
@@ -60,6 +60,16 @@ $code=<<___;
.byte 0,12,0x14,0,0,0,0,0
.byte 0,12,0x14,0,0,0,0,0
.size .OPENSSL_crypto207_probe,.-.OPENSSL_crypto207_probe
.size .OPENSSL_crypto207_probe,.-.OPENSSL_crypto207_probe
.globl .OPENSSL_madd300_probe
.align 4
.OPENSSL_madd300_probe:
xor r0,r0,r0
maddld r3,r0,r0,r0
maddhdu r3,r0,r0,r0
blr
.long 0
.byte 0,12,0x14,0,0,0,0,0
.globl .OPENSSL_wipe_cpu
.globl .OPENSSL_wipe_cpu
.align 4
.align 4
.OPENSSL_wipe_cpu:
.OPENSSL_wipe_cpu:
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录