Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
btwise
openssl
提交
91fdacb2
O
openssl
项目概览
btwise
/
openssl
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
O
openssl
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
91fdacb2
编写于
1月 19, 2010
作者:
A
Andy Polyakov
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
s390x assembler update: add support for run-time facility detection.
上级
d582c98d
变更
7
显示空白变更内容
内联
并排
Showing
7 changed file
with
62 addition
and
9 deletion
+62
-9
Configure
Configure
+1
-1
TABLE
TABLE
+1
-1
crypto/aes/asm/aes-s390x.pl
crypto/aes/asm/aes-s390x.pl
+6
-0
crypto/s390xcap.c
crypto/s390xcap.c
+37
-0
crypto/s390xcpuid.S
crypto/s390xcpuid.S
+7
-7
crypto/sha/asm/sha1-s390x.pl
crypto/sha/asm/sha1-s390x.pl
+5
-0
crypto/sha/asm/sha512-s390x.pl
crypto/sha/asm/sha512-s390x.pl
+5
-0
未找到文件。
Configure
浏览文件 @
91fdacb2
...
...
@@ -133,7 +133,7 @@ my $sparcv9_asm="sparcv9cap.o sparccpuid.o:bn-sparcv9.o sparcv9-mont.o sparcv9a-
my $sparcv8_asm=":sparcv8.o:des_enc-sparc.o fcrypt_b.o:::::::::::void";
my $alpha_asm="alphacpuid.o:bn_asm.o alpha-mont.o::::::::::::void";
my $mips3_asm=":bn-mips3.o::::::::::::void";
my $s390x_asm="s390xcpuid.o:bn-s390x.o s390x-mont.o::aes-s390x.o:::sha1-s390x.o sha256-s390x.o sha512-s390x.o::rc4-s390x.o:::::void";
my $s390x_asm="s390xc
ap.o s390xc
puid.o:bn-s390x.o s390x-mont.o::aes-s390x.o:::sha1-s390x.o sha256-s390x.o sha512-s390x.o::rc4-s390x.o:::::void";
my $armv4_asm=":bn_asm.o armv4-mont.o::aes_cbc.o aes-armv4.o:::sha1-armv4-large.o sha256-armv4.o sha512-armv4.o:::::::void";
my $ppc32_asm="ppccpuid.o ppccap.o:bn-ppc.o ppc-mont.o ppc64-mont.o::aes_core.o aes_cbc.o aes-ppc.o:::sha1-ppc.o sha256-ppc.o::::::";
my $ppc64_asm="ppccpuid.o ppccap.o:bn-ppc.o ppc-mont.o ppc64-mont.o::aes_core.o aes_cbc.o aes-ppc.o:::sha1-ppc.o sha256-ppc.o sha512-ppc.o::::::";
...
...
TABLE
浏览文件 @
91fdacb2
...
...
@@ -3728,7 +3728,7 @@ $thread_cflag = -D_REENTRANT
$sys_id =
$lflags = -ldl
$bn_ops = SIXTY_FOUR_BIT_LONG RC4_CHAR RC4_CHUNK DES_INT DES_UNROLL
$cpuid_obj = s390xcpuid.o
$cpuid_obj = s390xc
ap.o s390xc
puid.o
$bn_obj = bn-s390x.o s390x-mont.o
$des_obj =
$aes_obj = aes-s390x.o
...
...
crypto/aes/asm/aes-s390x.pl
浏览文件 @
91fdacb2
...
...
@@ -765,6 +765,11 @@ $code.=<<___ if (!$softonly);
srl
%r5
,
6
ar
%r5
,
%r0
larl
%r1
,
OPENSSL_s390xcap_P
lg
%r0
,
0
(
%r1
)
tmhl
%r0
,
0x4000
# check for message-security assist
jz
.
Lekey_internal
lghi
%r0
,
0
# query capability vector
la
%r1
,
16
(
$sp
)
.
long
0xb92f0042
# kmc %r4,%r2
...
...
@@ -1323,6 +1328,7 @@ $code.=<<___;
4: ex $len,0($s1)
j .Lcbc_dec_exit
.size AES_cbc_encrypt,.-AES_cbc_encrypt
.comm OPENSSL_s390xcap_P,8,8
___
}
$code
.=
<<___;
...
...
crypto/s390xcap.c
0 → 100644
浏览文件 @
91fdacb2
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <setjmp.h>
#include <signal.h>
extern
unsigned
long
OPENSSL_s390xcap_P
;
static
sigjmp_buf
ill_jmp
;
static
void
ill_handler
(
int
sig
)
{
siglongjmp
(
ill_jmp
,
sig
);
}
unsigned
long
OPENSSL_s390x_facilities
(
void
);
void
OPENSSL_cpuid_setup
(
void
)
{
sigset_t
oset
;
struct
sigaction
ill_act
,
oact
;
if
(
OPENSSL_s390xcap_P
)
return
;
memset
(
&
ill_act
,
0
,
sizeof
(
ill_act
));
ill_act
.
sa_handler
=
ill_handler
;
sigfillset
(
&
ill_act
.
sa_mask
);
sigdelset
(
&
ill_act
.
sa_mask
,
SIGILL
);
sigdelset
(
&
ill_act
.
sa_mask
,
SIGTRAP
);
sigprocmask
(
SIG_SETMASK
,
&
ill_act
.
sa_mask
,
&
oset
);
sigaction
(
SIGILL
,
&
ill_act
,
&
oact
);
/* protection against missing store-facility-list-extended */
if
(
sigsetjmp
(
ill_jmp
,
0
)
==
0
)
OPENSSL_s390xcap_P
=
OPENSSL_s390x_facilities
();
else
OPENSSL_s390xcap_P
=
1UL
<<
63
;
sigaction
(
SIGILL
,
&
oact
,
NULL
);
sigprocmask
(
SIG_SETMASK
,
&
oset
,
NULL
);
}
crypto/s390xcpuid.S
浏览文件 @
91fdacb2
.
text
.
globl
OPENSSL_cpuid_setup
.
type
OPENSSL_cpuid_setup
,@
function
.
align
16
OPENSSL_cpuid_setup
:
br
%
r14
#
reserved
for
future
.
size
OPENSSL_cpuid_setup
,.-
OPENSSL_cpuid_setup
.
globl
OPENSSL_s390x_facilities
.
type
OPENSSL_s390x_facilities
,@
function
.
align
16
...
...
@@ -14,6 +7,8 @@ OPENSSL_s390x_facilities:
lghi
%
r0
,
0
.
long
0xb2b0f010
#
stfle
16
(%
r15
)
lg
%
r2
,
16
(%
r15
)
larl
%
r1
,
OPENSSL_s390xcap_P
stg
%
r2
,
0
(%
r1
)
br
%
r14
.
size
OPENSSL_s390x_facilities
,.-
OPENSSL_s390x_facilities
...
...
@@ -88,3 +83,8 @@ OPENSSL_cleanse:
jnz
.
Little
br
%
r14
.
size
OPENSSL_cleanse
,.-
OPENSSL_cleanse
.
section
.
init
brasl
%
r14
,
OPENSSL_cpuid_setup
.
comm
OPENSSL_s390xcap_P
,8,8
crypto/sha/asm/sha1-s390x.pl
浏览文件 @
91fdacb2
...
...
@@ -143,6 +143,10 @@ Ktable: .long 0x5a827999,0x6ed9eba1,0x8f1bbcdc,0xca62c1d6
sha1_block_data_order:
___
$code
.=<<
___
if
(
$kimdfunc
);
larl
%r1
,
OPENSSL_s390xcap_P
lg
%r0
,
0
(
%r1
)
tmhl
%r0
,
0x4000
# check for message-security assist
jz
.
Lsoftware
lghi
%r0
,
0
la
%r1
,
16
(
$sp
)
.
long
0xb93e0002
# kimd %r0,%r2
...
...
@@ -213,6 +217,7 @@ $code.=<<___;
br %r14
.size sha1_block_data_order,.-sha1_block_data_order
.string "SHA1 block transform for s390x, CRYPTOGAMS by <appro\@openssl.org>"
.comm OPENSSL_s390xcap_P,8,8
___
$code
=~
s/\`([^\`]*)\`/eval $1/g
em
;
...
...
crypto/sha/asm/sha512-s390x.pl
浏览文件 @
91fdacb2
...
...
@@ -214,6 +214,10 @@ $code.=<<___;
$Func:
___
$code
.=<<
___
if
(
$kimdfunc
);
larl
%r1
,
OPENSSL_s390xcap_P
lg
%r0
,
0
(
%r1
)
tmhl
%r0
,
0x4000
# check for message-security assist
jz
.
Lsoftware
lghi
%r0
,
0
la
%r1
,
16
(
$sp
)
.
long
0xb93e0002
# kimd %r0,%r2
...
...
@@ -286,6 +290,7 @@ $code.=<<___;
br %r14
.size $Func,.-$Func
.string "SHA${label} block transform for s390x, CRYPTOGAMS by <appro\@openssl.org>"
.comm OPENSSL_s390xcap_P,8,8
___
$code
=~
s/\`([^\`]*)\`/eval $1/g
em
;
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录