Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Third Party Openssl
提交
bd227733
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,发现更多精彩内容 >>
提交
bd227733
编写于
5月 04, 2014
作者:
A
Andy Polyakov
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
C64x+ assembly pack: make it work with older toolchain.
上级
9250a306
变更
8
隐藏空白更改
内联
并排
Showing
8 changed file
with
63 addition
and
29 deletion
+63
-29
crypto/aes/asm/aes-c64xplus.pl
crypto/aes/asm/aes-c64xplus.pl
+22
-18
crypto/bn/asm/bn-c64xplus.asm
crypto/bn/asm/bn-c64xplus.asm
+4
-0
crypto/bn/asm/c64xplus-gf2m.pl
crypto/bn/asm/c64xplus-gf2m.pl
+4
-0
crypto/c64xpluscpuid.pl
crypto/c64xpluscpuid.pl
+4
-0
crypto/modes/asm/ghash-c64xplus.pl
crypto/modes/asm/ghash-c64xplus.pl
+4
-0
crypto/sha/asm/sha1-c64xplus.pl
crypto/sha/asm/sha1-c64xplus.pl
+4
-0
crypto/sha/asm/sha256-c64xplus.pl
crypto/sha/asm/sha256-c64xplus.pl
+10
-5
crypto/sha/asm/sha512-c64xplus.pl
crypto/sha/asm/sha512-c64xplus.pl
+11
-6
未找到文件。
crypto/aes/asm/aes-c64xplus.pl
浏览文件 @
bd227733
...
@@ -44,6 +44,10 @@ open STDOUT,">$output";
...
@@ -44,6 +44,10 @@ open STDOUT,">$output";
$code
=
<<___;
$code
=
<<___;
.text
.text
.if .ASSEMBLER_VERSION<7000000
.asg 0,__TI_EABI__
.endif
.if __TI_EABI__
.if __TI_EABI__
.nocmp
.nocmp
.asg AES_encrypt,_AES_encrypt
.asg AES_encrypt,_AES_encrypt
...
@@ -85,18 +89,18 @@ _AES_encrypt:
...
@@ -85,18 +89,18 @@ _AES_encrypt:
__encrypt:
__encrypt:
.if __TI_EABI__
.if __TI_EABI__
[B2] LDNDW *INP++,A9:A8 ; load input
[B2] LDNDW *INP++,A9:A8 ; load input
|| MVKL \$PCR_OFFSET(AES_Te,_
AES
_encrypt),$TEA
|| MVKL \$PCR_OFFSET(AES_Te,__encrypt),$TEA
|| ADDKPC _
AES
_encrypt,B0
|| ADDKPC __encrypt,B0
[B2] LDNDW *INP++,B9:B8
[B2] LDNDW *INP++,B9:B8
|| MVKH \$PCR_OFFSET(AES_Te,_
AES
_encrypt),$TEA
|| MVKH \$PCR_OFFSET(AES_Te,__encrypt),$TEA
|| ADD 0,KEY,$KPA
|| ADD 0,KEY,$KPA
|| ADD 4,KEY,$KPB
|| ADD 4,KEY,$KPB
.else
.else
[B2] LDNDW *INP++,A9:A8 ; load input
[B2] LDNDW *INP++,A9:A8 ; load input
|| MVKL (AES_Te-_
AES
_encrypt),$TEA
|| MVKL (AES_Te-__encrypt),$TEA
|| ADDKPC _
AES
_encrypt,B0
|| ADDKPC __encrypt,B0
[B2] LDNDW *INP++,B9:B8
[B2] LDNDW *INP++,B9:B8
|| MVKH (AES_Te-_
AES
_encrypt),$TEA
|| MVKH (AES_Te-__encrypt),$TEA
|| ADD 0,KEY,$KPA
|| ADD 0,KEY,$KPA
|| ADD 4,KEY,$KPB
|| ADD 4,KEY,$KPB
.endif
.endif
...
@@ -297,18 +301,18 @@ _AES_decrypt:
...
@@ -297,18 +301,18 @@ _AES_decrypt:
__decrypt:
__decrypt:
.if __TI_EABI__
.if __TI_EABI__
[B2] LDNDW *INP++,A9:A8 ; load input
[B2] LDNDW *INP++,A9:A8 ; load input
|| MVKL \$PCR_OFFSET(AES_Td,_
AES
_decrypt),$TEA
|| MVKL \$PCR_OFFSET(AES_Td,__decrypt),$TEA
|| ADDKPC _
AES
_decrypt,B0
|| ADDKPC __decrypt,B0
[B2] LDNDW *INP++,B9:B8
[B2] LDNDW *INP++,B9:B8
|| MVKH \$PCR_OFFSET(AES_Td,_
AES
_decrypt),$TEA
|| MVKH \$PCR_OFFSET(AES_Td,__decrypt),$TEA
|| ADD 0,KEY,$KPA
|| ADD 0,KEY,$KPA
|| ADD 4,KEY,$KPB
|| ADD 4,KEY,$KPB
.else
.else
[B2] LDNDW *INP++,A9:A8 ; load input
[B2] LDNDW *INP++,A9:A8 ; load input
|| MVKL (AES_Td-_
AES
_decrypt),$TEA
|| MVKL (AES_Td-__decrypt),$TEA
|| ADDKPC _
AES
_decrypt,B0
|| ADDKPC __decrypt,B0
[B2] LDNDW *INP++,B9:B8
[B2] LDNDW *INP++,B9:B8
|| MVKH (AES_Td-_
AES
_decrypt),$TEA
|| MVKH (AES_Td-__decrypt),$TEA
|| ADD 0,KEY,$KPA
|| ADD 0,KEY,$KPA
|| ADD 4,KEY,$KPB
|| ADD 4,KEY,$KPB
.endif
.endif
...
@@ -546,16 +550,16 @@ __set_encrypt_key:
...
@@ -546,16 +550,16 @@ __set_encrypt_key:
.if __TI_EABI__
.if __TI_EABI__
[A0] ADD 0,KEY,$KPA
[A0] ADD 0,KEY,$KPA
|| [A0] ADD 4,KEY,$KPB
|| [A0] ADD 4,KEY,$KPB
|| [A0] MVKL \$PCR_OFFSET(AES_Te4,_
AES
_set_encrypt_key),$TEA
|| [A0] MVKL \$PCR_OFFSET(AES_Te4,__set_encrypt_key),$TEA
|| [A0] ADDKPC _
AES
_set_encrypt_key,B6
|| [A0] ADDKPC __set_encrypt_key,B6
[A0] MVKH \$PCR_OFFSET(AES_Te4,_
AES
_set_encrypt_key),$TEA
[A0] MVKH \$PCR_OFFSET(AES_Te4,__set_encrypt_key),$TEA
[A0] ADD B6,$TEA,$TEA ; AES_Te4
[A0] ADD B6,$TEA,$TEA ; AES_Te4
.else
.else
[A0] ADD 0,KEY,$KPA
[A0] ADD 0,KEY,$KPA
|| [A0] ADD 4,KEY,$KPB
|| [A0] ADD 4,KEY,$KPB
|| [A0] MVKL (AES_Te4-_
AES
_set_encrypt_key),$TEA
|| [A0] MVKL (AES_Te4-__set_encrypt_key),$TEA
|| [A0] ADDKPC _
AES
_set_encrypt_key,B6
|| [A0] ADDKPC __set_encrypt_key,B6
[A0] MVKH (AES_Te4-_
AES
_set_encrypt_key),$TEA
[A0] MVKH (AES_Te4-__set_encrypt_key),$TEA
[A0] ADD B6,$TEA,$TEA ; AES_Te4
[A0] ADD B6,$TEA,$TEA ; AES_Te4
.endif
.endif
NOP
NOP
...
...
crypto/bn/asm/bn-c64xplus.asm
浏览文件 @
bd227733
...
@@ -12,6 +12,10 @@
...
@@ -12,6 +12,10 @@
;; SPLOOPs spin at ... 2*n cycles [plus epilogue].
;; SPLOOPs spin at ... 2*n cycles [plus epilogue].
;;====================================================================
;;====================================================================
.text
.text
.if
.ASSEMBLER_VERSION
<
7000000
.asg
0
,
__TI_EABI__
.endif
.if
__TI_EABI__
.if
__TI_EABI__
.asg
bn_mul_add_words
,
_bn_mul_add_words
.asg
bn_mul_add_words
,
_bn_mul_add_words
.asg
bn_mul_words
,
_bn_mul_words
.asg
bn_mul_words
,
_bn_mul_words
...
...
crypto/bn/asm/c64xplus-gf2m.pl
浏览文件 @
bd227733
...
@@ -107,6 +107,10 @@ ___
...
@@ -107,6 +107,10 @@ ___
}
}
$code
.=
<<___;
$code
.=
<<___;
.text
.text
.if .ASSEMBLER_VERSION<7000000
.asg 0,__TI_EABI__
.endif
.if __TI_EABI__
.if __TI_EABI__
.asg bn_GF2m_mul_2x2,_bn_GF2m_mul_2x2
.asg bn_GF2m_mul_2x2,_bn_GF2m_mul_2x2
.endif
.endif
...
...
crypto/c64xpluscpuid.pl
浏览文件 @
bd227733
...
@@ -6,6 +6,10 @@ open STDOUT,">$output";
...
@@ -6,6 +6,10 @@ open STDOUT,">$output";
$code
.=
<<___;
$code
.=
<<___;
.text
.text
.if .ASSEMBLER_VERSION<7000000
.asg 0,__TI_EABI__
.endif
.if __TI_EABI__
.if __TI_EABI__
.asg OPENSSL_rdtsc,_OPENSSL_rdtsc
.asg OPENSSL_rdtsc,_OPENSSL_rdtsc
.asg OPENSSL_cleanse,_OPENSSL_cleanse
.asg OPENSSL_cleanse,_OPENSSL_cleanse
...
...
crypto/modes/asm/ghash-c64xplus.pl
浏览文件 @
bd227733
...
@@ -35,6 +35,10 @@ open STDOUT,">$output";
...
@@ -35,6 +35,10 @@ open STDOUT,">$output";
$code
.=
<<___;
$code
.=
<<___;
.text
.text
.if .ASSEMBLER_VERSION<7000000
.asg 0,__TI_EABI__
.endif
.if __TI_EABI__
.if __TI_EABI__
.asg gcm_gmult_1bit,_gcm_gmult_1bit
.asg gcm_gmult_1bit,_gcm_gmult_1bit
.asg gcm_gmult_4bit,_gcm_gmult_4bit
.asg gcm_gmult_4bit,_gcm_gmult_4bit
...
...
crypto/sha/asm/sha1-c64xplus.pl
浏览文件 @
bd227733
...
@@ -38,6 +38,10 @@ open STDOUT,">$output";
...
@@ -38,6 +38,10 @@ open STDOUT,">$output";
$code
=
<<___;
$code
=
<<___;
.text
.text
.if .ASSEMBLER_VERSION<7000000
.asg 0,__TI_EABI__
.endif
.if __TI_EABI__
.if __TI_EABI__
.asg sha1_block_data_order,_sha1_block_data_order
.asg sha1_block_data_order,_sha1_block_data_order
.endif
.endif
...
...
crypto/sha/asm/sha256-c64xplus.pl
浏览文件 @
bd227733
...
@@ -38,6 +38,10 @@ open STDOUT,">$output";
...
@@ -38,6 +38,10 @@ open STDOUT,">$output";
$code
.=
<<___;
$code
.=
<<___;
.text
.text
.if .ASSEMBLER_VERSION<7000000
.asg 0,__TI_EABI__
.endif
.if __TI_EABI__
.if __TI_EABI__
.nocmp
.nocmp
.asg sha256_block_data_order,_sha256_block_data_order
.asg sha256_block_data_order,_sha256_block_data_order
...
@@ -54,24 +58,25 @@ $code.=<<___;
...
@@ -54,24 +58,25 @@ $code.=<<___;
.global _sha256_block_data_order
.global _sha256_block_data_order
_sha256_block_data_order:
_sha256_block_data_order:
__sha256_block:
.asmfunc stack_usage(64)
.asmfunc stack_usage(64)
MV $NUM,A0 ; reassign $NUM
MV $NUM,A0 ; reassign $NUM
|| MVK -64,B0
|| MVK -64,B0
[!A0] BNOP RA ; if ($NUM==0) return;
[!A0] BNOP RA ; if ($NUM==0) return;
|| [A0] STW FP,*SP--[16] ; save frame pointer and alloca(64)
|| [A0] STW FP,*SP--[16] ; save frame pointer and alloca(64)
|| [A0] MV SP,FP
|| [A0] MV SP,FP
[A0] ADDKPC _
sha256_block_data_order
,B2
[A0] ADDKPC _
_sha256_block
,B2
|| [A0] AND B0,SP,SP ; align stack at 64 bytes
|| [A0] AND B0,SP,SP ; align stack at 64 bytes
.if __TI_EABI__
.if __TI_EABI__
[A0] MVK 0x00404,B1
[A0] MVK 0x00404,B1
|| [A0] MVKL \$PCR_OFFSET(K256,_
sha256_block_data_order
),$K256
|| [A0] MVKL \$PCR_OFFSET(K256,_
_sha256_block
),$K256
[A0] MVKH 0x50000,B1
[A0] MVKH 0x50000,B1
|| [A0] MVKH \$PCR_OFFSET(K256,_
sha256_block_data_order
),$K256
|| [A0] MVKH \$PCR_OFFSET(K256,_
_sha256_block
),$K256
.else
.else
[A0] MVK 0x00404,B1
[A0] MVK 0x00404,B1
|| [A0] MVKL (K256-_
sha256_block_data_order
),$K256
|| [A0] MVKL (K256-_
_sha256_block
),$K256
[A0] MVKH 0x50000,B1
[A0] MVKH 0x50000,B1
|| [A0] MVKH (K256-_
sha256_block_data_order
),$K256
|| [A0] MVKH (K256-_
_sha256_block
),$K256
.endif
.endif
[A0] MVC B1,AMR ; setup circular addressing
[A0] MVC B1,AMR ; setup circular addressing
|| [A0] MV SP,$Xia
|| [A0] MV SP,$Xia
...
...
crypto/sha/asm/sha512-c64xplus.pl
浏览文件 @
bd227733
...
@@ -46,6 +46,10 @@ open STDOUT,">$output";
...
@@ -46,6 +46,10 @@ open STDOUT,">$output";
$code
.=
<<___;
$code
.=
<<___;
.text
.text
.if .ASSEMBLER_VERSION<7000000
.asg 0,__TI_EABI__
.endif
.if __TI_EABI__
.if __TI_EABI__
.nocmp
.nocmp
.asg sha512_block_data_order,_sha512_block_data_order
.asg sha512_block_data_order,_sha512_block_data_order
...
@@ -65,6 +69,7 @@ $code.=<<___;
...
@@ -65,6 +69,7 @@ $code.=<<___;
.global _sha512_block_data_order
.global _sha512_block_data_order
_sha512_block_data_order:
_sha512_block_data_order:
__sha512_block:
.asmfunc stack_usage(40+128)
.asmfunc stack_usage(40+128)
MV $NUM,A0 ; reassign $NUM
MV $NUM,A0 ; reassign $NUM
|| MVK -128,B0
|| MVK -128,B0
...
@@ -81,15 +86,15 @@ _sha512_block_data_order:
...
@@ -81,15 +86,15 @@ _sha512_block_data_order:
|| [A0] ADD B0,SP,SP ; alloca(128)
|| [A0] ADD B0,SP,SP ; alloca(128)
.if __TI_EABI__
.if __TI_EABI__
[A0] AND B0,SP,SP ; align stack at 128 bytes
[A0] AND B0,SP,SP ; align stack at 128 bytes
|| [A0] ADDKPC _
sha512_block_data_order
,B1
|| [A0] ADDKPC _
_sha512_block
,B1
|| [A0] MVKL \$PCR_OFFSET(K512,_
sha512_block_data_order
),$K512
|| [A0] MVKL \$PCR_OFFSET(K512,_
_sha512_block
),$K512
[A0] MVKH \$PCR_OFFSET(K512,_
sha512_block_data_order
),$K512
[A0] MVKH \$PCR_OFFSET(K512,_
_sha512_block
),$K512
|| [A0] SUBAW SP,2,SP ; reserve two words above buffer
|| [A0] SUBAW SP,2,SP ; reserve two words above buffer
.else
.else
[A0] AND B0,SP,SP ; align stack at 128 bytes
[A0] AND B0,SP,SP ; align stack at 128 bytes
|| [A0] ADDKPC _
sha512_block_data_order
,B1
|| [A0] ADDKPC _
_sha512_block
,B1
|| [A0] MVKL (K512-_
sha512_block_data_order
),$K512
|| [A0] MVKL (K512-_
_sha512_block
),$K512
[A0] MVKH (K512-_
sha512_block_data_order
),$K512
[A0] MVKH (K512-_
_sha512_block
),$K512
|| [A0] SUBAW SP,2,SP ; reserve two words above buffer
|| [A0] SUBAW SP,2,SP ; reserve two words above buffer
.endif
.endif
ADDAW SP,3,$Xilo
ADDAW SP,3,$Xilo
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录